public void searchAll() { if (m_isServiceReady) { Log.d(TAG, "Search invoke"); m_upnpService.getRegistry().removeAllRemoteDevices(); m_upnpService.getControlPoint().search(); } }
@Override public RemoteDevice getRemoteDevice(String UDN) { for (RemoteDevice device : m_upnpService.getRegistry().getRemoteDevices()) { if (device.getIdentity().getUdn().toString().equals(UDN)) return device; } return null; }
public void ClearAll() { if (m_isServiceReady) { Log.d(TAG, "SearchDMR invoke"); if (m_upnpService != null) { m_upnpService.getRegistry().removeAllRemoteDevices(); // m_upnpService.getControlPoint().search(new DeviceTypeHeader(type)); } else { Log.w(TAG, "UPnP Service is null"); } } }
public LocalDevice getLocalDevice(String UDN) { for (LocalDevice device : m_upnpService.getRegistry().getLocalDevices()) { Log.i( TAG, "Local device:" + device.getDetails().getFriendlyName() + "," + device.getIdentity().getUdn().toString()); if (device.getIdentity().getUdn().toString().compareTo(UDN) == 0) return device; } return null; }
@SuppressWarnings("rawtypes") public Collection<RemoteDevice> getRemoteDMR() { DeviceType dmrtype = new DeviceType(DMR_NAMESPACE, DMR_TYPE, 1); if (m_upnpService == null) return null; Collection<Device> devices = m_upnpService.getRegistry().getDevices(dmrtype); if (devices == null) return null; ArrayList<RemoteDevice> remoteDev = new ArrayList<RemoteDevice>(); for (Device dev : devices) { if (dev instanceof RemoteDevice) remoteDev.add((RemoteDevice) dev); } return remoteDev; }
public Collection<RemoteDevice> getRemoteDevices() { if (m_upnpService != null) return m_upnpService.getRegistry().getRemoteDevices(); return null; }