public Device findDevice(String udn, Device dev) {
/*
* look for the device if it exist, starting from the root on
* cyberlink struct
*/
DeviceList devList = dev.getDeviceList();
Device aux = null;
for (int i = 0; i < devList.size(); i++) {
if (devList.getDevice(i).getUDN().equals(udn)) {
return devList.getDevice(i);
} else {
if((aux = findDevice(udn, devList.getDevice(i))) != null)
return aux;
}
}
return null;
}