def deactivate(self, shell): self.info("Coherence UPnP plugin deactivated") if self.coherence is None: return self.coherence.shutdown() try: louie.disconnect( self.detected_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.detected', louie.Any) except louie.error.DispatcherKeyError: pass try: louie.disconnect( self.removed_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.removed', louie.Any) except louie.error.DispatcherKeyError: pass del self.shell del self.coherence for usn, source in self.sources.iteritems(): source.delete_thyself() del self.sources
def deactivate(self, shell): self.info("Coherence UPnP plugin deactivated") if self.coherence is None: return self.coherence.shutdown() try: louie.disconnect(self.detected_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.detected', louie.Any) except louie.error.DispatcherKeyError: pass try: louie.disconnect(self.removed_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.removed', louie.Any) except louie.error.DispatcherKeyError: pass del self.shell del self.coherence for usn, source in self.sources.iteritems(): source.delete_thyself() del self.sources
def shutdown(self): louie.disconnect(self._device_detected, "Coherence.UPnP.Device.detection_completed", louie.Any) louie.disconnect(self._device_removed, "Coherence.UPnP.Device.removed", louie.Any) for _device_id, device in self.devices.iteritems(): device.shutdown() self.devices = {} self.remove_from_connection() self.bus = None
def _release_thyself(self, suicide_mode=True): louie.disconnect(self.variable_changed, "StateVariable.changed", sender=self.service) self.service = None self.dbus_device = None self.remove_from_connection() self.path = None if suicide_mode: del self
def disconnect(self, receiver, signal=louie.signal.All, sender=louie.sender.Any, weak=True): """ wrapper method around louie.disconnect """ louie.disconnect(receiver, signal=signal, sender=sender, weak=weak)
def _release_thyself(self): louie.disconnect(self.variable_changed, 'StateVariable.changed', sender=self.service) self.service = None self.dbus_device = None self.tube = None self.path = None self.remove_from_connection() del self
def _release_thyself(self, suicide_mode=True): louie.disconnect(self.variable_changed, 'StateVariable.changed', sender=self.service) self.service = None self.dbus_device = None self.remove_from_connection() self.path = None if suicide_mode: del self
def shutdown(self): louie.disconnect(self._device_detected, 'Coherence.UPnP.Device.detection_completed', louie.Any) louie.disconnect(self._device_removed, 'Coherence.UPnP.Device.removed', louie.Any) for device_id, device in self.devices.iteritems(): device.shutdown() self.devices = {} self.remove_from_connection() self.bus = None
def deactivate(self, shell): print "coherence UPnP plugin deactivated" if self.coherence is None: return self.coherence.shutdown() louie.disconnect(self.detected_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.detected', louie.Any) louie.disconnect(self.removed_media_server, 'Coherence.UPnP.ControlPoint.MediaServer.removed', louie.Any) del self.shell del self.coherence for usn, source in self.sources.iteritems(): source.delete_thyself() del self.sources
def shutdown(self): louie.disconnect(self.check_device, 'Coherence.UPnP.Device.detection_completed', louie.Any) louie.disconnect(self.remove_client, 'Coherence.UPnP.Device.remove_client', louie.Any) louie.disconnect(self.completed, 'Coherence.UPnP.DeviceClient.detection_completed', louie.Any)
def homecleanup(result): """anything left over""" louie.disconnect(self.create_device, 'Coherence.UPnP.SSDP.new_device', louie.Any) louie.disconnect(self.remove_device, 'Coherence.UPnP.SSDP.removed_device', louie.Any) louie.disconnect(self.add_device, 'Coherence.UPnP.RootDevice.detection_completed', louie.Any) self.ssdp_server.shutdown() if self.ctrl: self.ctrl.shutdown() self.warning('Coherence UPnP framework shutdown') return result
def stop(self, despatch): louie.disconnect(self.new_server, 'Coherence.UPnP.ControlPoint.MediaServer.detected', louie.Any) louie.disconnect(self.new_renderer, 'Coherence.UPnP.ControlPoint.MediaRenderer.detected', louie.Any) louie.disconnect(self.remove_server, 'Coherence.UPnP.ControlPoint.MediaServer.removed', louie.Any) louie.disconnect(self.remove_renderer, 'Coherence.UPnP.ControlPoint.MediaRenderer.removed', louie.Any)
def receive_callback(device): if device == self.device: louie.disconnect(receive_callback, 'Coherence.UPnP.RootDevice.detection_completed') d.callback(device)
def disconnect_variable(service, var_name, callback): signal = 'Coherence.UPnP.StateVariable.%s.changed' % var_name louie.disconnect(service, signal, callback)