Search in sources :

Example 1 with ControlPoint

use of org.cybergarage.upnp.ControlPoint in project felix by apache.

the class MyCtrlPoint method findDeviceCtrl.

public Device findDeviceCtrl(ControlPoint ctrl, String udn) {
    /* 
		 * this return the device looking in all the struct
		 */
    DeviceList devList = getDeviceList();
    Device dev = null;
    int i = 0;
    while (i < devList.size() && (dev == null)) {
        if (devList.getDevice(i).getUDN().equals(udn)) {
            dev = devList.getDevice(i);
            return dev;
        }
        dev = findDevice(udn, devList.getDevice(i));
        i++;
    }
    return dev;
}
Also used : UPnPDevice(org.osgi.service.upnp.UPnPDevice) Device(org.cybergarage.upnp.Device) DeviceList(org.cybergarage.upnp.DeviceList) ControlPoint(org.cybergarage.upnp.ControlPoint)

Aggregations

ControlPoint (org.cybergarage.upnp.ControlPoint)1 Device (org.cybergarage.upnp.Device)1 DeviceList (org.cybergarage.upnp.DeviceList)1 UPnPDevice (org.osgi.service.upnp.UPnPDevice)1