org.fourthline.cling.model.types.UDAServiceType Java Examples
The following examples show how to use
org.fourthline.cling.model.types.UDAServiceType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContentActivity.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
private void initData() { mCounter = 0; if (null == mSaveDirectoryMap) { mSaveDirectoryMap = new HashMap<Integer, ArrayList<ContentItem>>(); } else { mSaveDirectoryMap.clear(); } upnpService = mBaseApplication.upnpService; mTitleView.setText(mBaseApplication.deviceItem.toString()); Device device = mBaseApplication.deviceItem.getDevice(); Service service = device.findService(new UDAServiceType( "ContentDirectory")); upnpService.getControlPoint().execute( new ContentBrowseActionCallback(ContentActivity.this, service, createRootContainer(service), mContentList, mHandler)); mLastDevice = mBaseApplication.deviceItem.toString(); }
Example #2
Source File: UpnpService.java From HPlayer with Apache License 2.0 | 6 votes |
@Override protected AndroidUpnpServiceConfiguration createConfiguration() { return new AndroidUpnpServiceConfiguration() { @Override public int getRegistryMaintenanceIntervalMillis() { return 7000; } @Override public ServiceType[] getExclusiveServiceTypes() { // only care the these service below return new ServiceType[]{ new UDAServiceType(UpnpServiceType.AVTRANSPORT), new UDAServiceType(UpnpServiceType.RENDERING_CONTROL), new UDAServiceType(UpnpServiceType.CONTENT_DIRECTORY), }; } }; }
Example #3
Source File: UpnpService.java From HPlayer with Apache License 2.0 | 6 votes |
@Override protected AndroidUpnpServiceConfiguration createConfiguration() { return new AndroidUpnpServiceConfiguration() { @Override public int getRegistryMaintenanceIntervalMillis() { return 7000; } @Override public ServiceType[] getExclusiveServiceTypes() { // only care the these service below return new ServiceType[]{ new UDAServiceType(UpnpServiceType.AVTRANSPORT), new UDAServiceType(UpnpServiceType.RENDERING_CONTROL), }; } }; }
Example #4
Source File: UpnpService.java From HPlayer with Apache License 2.0 | 6 votes |
@Override protected AndroidUpnpServiceConfiguration createConfiguration() { return new AndroidUpnpServiceConfiguration() { @Override public int getRegistryMaintenanceIntervalMillis() { return 7000; } @Override public ServiceType[] getExclusiveServiceTypes() { // only care the these service below return new ServiceType[]{ new UDAServiceType(UpnpServiceType.CONTENT_DIRECTORY), }; } }; }
Example #5
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
public void setVolume(long paramLong, int paramInt) { if (paramInt == 0) { } Service localService = null; try { localService = this.executeDeviceItem.getDevice().findService( new UDAServiceType("RenderingControl")); if (localService != null) { if (paramInt == CUT_VOC) { if (paramLong >= 0L) { paramLong -= 1L; } else { Toast.makeText(activity, R.string.min_voc, Toast.LENGTH_SHORT).show(); } } else { paramLong += 1L; } this.upnpService.getControlPoint().execute( new SetVolumeCallback(localService, paramLong)); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #6
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
public void setMute(boolean paramBoolean) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("RenderingControl")); if (localService != null) { ControlPoint localControlPoint = this.upnpService .getControlPoint(); localControlPoint.execute(new SetMuteCalllback(localService, paramBoolean, mHandle)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #7
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
public void setAvURL() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { Log.e("set url", "set url" + this.uriString); this.upnpService.getControlPoint().execute( new SetAVTransportURIActionCallback(localService, this.uriString, this.metaData, mHandle, this.controlType)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #8
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
public void seekBarPosition(String paramString) { try { Device localDevice = this.executeDeviceItem.getDevice(); Log.e("control action", "seekBarPosition"); Service localService = localDevice.findService(new UDAServiceType( "AVTransport")); if (localService != null) { Log.e("get seekBarPosition info", "get seekBarPosition info"); this.upnpService.getControlPoint().execute( new SeekCallback(activity, localService, paramString, mHandle)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #9
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
public void getVolume(int paramInt) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("RenderingControl")); if (localService != null) { Log.e("get volume", "get volume"); this.upnpService.getControlPoint().execute( new GetVolumeCallback(this.activity, mHandle, paramInt, localService, this.controlType)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #10
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getPositionInfo() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetPositionInfoCallback(localService, mHandle, this.activity)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #11
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void stop(Boolean paramBoolean) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { this.upnpService.getControlPoint().execute( new StopCallback(localService, mHandle, paramBoolean, this.controlType)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #12
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void play() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { Log.e("start play", "start play"); this.upnpService.getControlPoint().execute( new PlayerCallback(localService, mHandle)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #13
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void pause() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { Log.e("pause", "pause"); this.upnpService.getControlPoint().execute( new PauseCallback(localService)); } else { Log.e("null", "null"); } } catch (Exception localException) { localException.printStackTrace(); } }
Example #14
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getTransportInfo(boolean paramBoolean) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetTransportInfoCallback(localService, mHandle, paramBoolean, this.controlType)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #15
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getProtocolInfos(String paramString) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("ConnectionManager")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetProtocolInfoCallback(localService, this.upnpService.getControlPoint(), paramString, mHandle)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #16
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getMute() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("RenderingControl")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetMuteCallback(localService, mHandle)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #17
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getMediaInfo() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetMediaInfoCallback(localService)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #18
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getDeviceCapability() { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("AVTransport")); if (localService != null) { this.upnpService.getControlPoint().execute( new GetDeviceCapabilitiesCallback(localService)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #19
Source File: DMCControl.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public void getCurrentConnectionInfo(int paramInt) { try { Service localService = this.executeDeviceItem.getDevice() .findService(new UDAServiceType("ConnectionManager")); if (localService != null) { this.upnpService.getControlPoint().execute( new CurrentConnectionInfoCallback(localService, this.upnpService.getControlPoint(), paramInt)); } else { } } catch (Exception localException) { localException.printStackTrace(); } }
Example #20
Source File: UDAServiceTypeHeader.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
@Override public void setString(String s) throws InvalidHeaderException { try { setValue(UDAServiceType.valueOf(s)); } catch (Exception ex) { throw new InvalidHeaderException("Invalid UDA service type header value, " + ex.getMessage()); } }
Example #21
Source File: DlnaSearch.java From HPlayer with Apache License 2.0 | 5 votes |
/** * 根据选择的设备 返回DLNA操作集合 */ public UpnpControlSet createUpnpControlSet(Device device) { if (!hadBindService || mUpnpService == null) { Log.e(TAG, "had no BindService or mUpnpService is null"); return null; } UDAServiceType avTransportServiceType = new UDAServiceType(UpnpServiceType.AVTRANSPORT); Service avTransportService = device.findService(avTransportServiceType); if (avTransportService == null) { Log.e(TAG, "avTransportService is null"); return null; } UDAServiceType renderingControlServiceType = new UDAServiceType(UpnpServiceType.RENDERING_CONTROL); Service renderingControlService = device.findService(renderingControlServiceType); if (renderingControlService == null) { Log.e(TAG, "renderingControlService is null"); return null; } UpnpControlSet upnpControlSet = new UpnpControlSet(mUpnpService, avTransportService, renderingControlService); return upnpControlSet; }
Example #22
Source File: UDAServiceTypeHeader.java From TVRemoteIME with GNU General Public License v2.0 | 5 votes |
@Override public void setString(String s) throws InvalidHeaderException { try { setValue(UDAServiceType.valueOf(s)); } catch (Exception ex) { throw new InvalidHeaderException("Invalid UDA service type header value, " + ex.getMessage()); } }
Example #23
Source File: UDAServiceTypeHeader.java From TVRemoteIME with GNU General Public License v2.0 | 4 votes |
public UDAServiceTypeHeader(UDAServiceType value) { super(value); }
Example #24
Source File: UDAServiceTypeHeader.java From DroidDLNA with GNU General Public License v3.0 | 4 votes |
public UDAServiceTypeHeader(UDAServiceType value) { super(value); }