Ejemplo n.º 1
0
 public void searchAll() {
   if (m_isServiceReady) {
     Log.d(TAG, "Search invoke");
     m_upnpService.getRegistry().removeAllRemoteDevices();
     m_upnpService.getControlPoint().search();
   }
 }
Ejemplo n.º 2
0
  @Override
  public RemoteDevice getRemoteDevice(String UDN) {
    for (RemoteDevice device : m_upnpService.getRegistry().getRemoteDevices()) {
      if (device.getIdentity().getUdn().toString().equals(UDN)) return device;
    }

    return null;
  }
Ejemplo n.º 3
0
 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");
     }
   }
 }
Ejemplo n.º 4
0
 @Override
 public void searchDMR() {
   if (m_isServiceReady) {
     Log.d(TAG, "SearchDMR invoke");
     DeviceType type = new DeviceType(DMR_NAMESPACE, DMR_TYPE, 1);
     if (m_upnpService != null) {
       // m_upnpService.getRegistry().removeAllRemoteDevices();
       m_upnpService.getControlPoint().search(new DeviceTypeHeader(type));
     } else {
       Log.w(TAG, "UPnP Service is null");
     }
   }
 }
Ejemplo n.º 5
0
  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;
  }
Ejemplo n.º 6
0
  @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;
  }
Ejemplo n.º 7
0
 public Collection<RemoteDevice> getRemoteDevices() {
   if (m_upnpService != null) return m_upnpService.getRegistry().getRemoteDevices();
   return null;
 }
Ejemplo n.º 8
0
 public ControlPoint getControlPoint() {
   return m_upnpService.getControlPoint(); // yhcha, DMR 선택 시 여기에서 문제 발생함.
 }