def get_members(self): devices = [] manager = gnomedvb.DVBManagerClient() for device_path in gnomedvb.DVBDeviceGroupClient.get_members(self): match = self._adapter_pattern.search(device_path) if match != None: adapter = int(match.group(1)) frontend = int(match.group(2)) devname, success = manager.get_name_of_registered_device(adapter, frontend) dev = Device (self._id, devname, adapter, frontend, self._type) dev.group_name = self._name devices.append(dev) return devices
def _on_group_device_added(self, group, adapter, frontend): self._remove_unassigned_device(adapter, frontend) # Iterate over groups for list_group, aiter in self.devicegroups.get_groups(): if group["id"] == list_group["id"]: # Added devtype = group.get_type() devname, success = self._model.get_name_of_registered_device(adapter, frontend) device = Device (group["id"], devname, adapter, frontend, devtype) device.group_name = group["name"] dev_iter = self.devicegroups.append(aiter) self.devicegroups[dev_iter][self.devicegroups.COL_GROUP] = group self.devicegroups[dev_iter][self.devicegroups.COL_DEVICE] = device break
def _on_group_device_added(self, group, adapter, frontend): self._remove_unassigned_device(adapter, frontend) # Iterate over groups for list_group, aiter in self.devicegroups.get_groups(): if group["id"] == list_group["id"]: # Added devtype = group.get_type() devname, success = self._model.get_name_of_registered_device( adapter, frontend) device = Device(group["id"], devname, adapter, frontend, devtype) device.group_name = group["name"] dev_iter = self.devicegroups.append(aiter) self.devicegroups[dev_iter][ self.devicegroups.COL_GROUP] = group self.devicegroups[dev_iter][ self.devicegroups.COL_DEVICE] = device break