Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/b/l/blueman-HEAD/blueman/bluez/PropertiesBlueZInterface.py   blueman(Download)
    def _unhandle_signal(self, handler, signal, interface, obj_path, **kwargs):
        self.get_bus().remove_signal_receiver(
            handler, signal, self.get_interface_name(), 'org.bluez',
            self.get_object_path(), **kwargs
        )
    def handle_signal(self, handler, signal, **kwargs):
        if signal == 'PropertyChanged':
            if self.__class__.get_interface_version()[0] < 5:
                self._handle_signal(
                    handler, 'PropertyChanged', self.get_interface_name(), self.get_object_path(), **kwargs
                interface = 'org.freedesktop.DBus.Properties'
 
                self._handle_signal(wrapper, 'PropertiesChanged', interface, self.get_object_path(), **kwargs)
        else:
            raise Exception('Unknown signal: %s' % signal)
 
    def unhandle_signal(self, handler, signal, **kwargs):
        if signal == 'PropertyChanged':
            if self.__class__.get_interface_version()[0] < 5:
                self._unhandle_signal(handler, signal, self.get_interface_name(), self.get_object_path(), **kwargs)
            else:
                self._unhandle_signal(self._handler_wrappers[handler], 'PropertiesChanged',
                                      'org.freedesktop.DBus.Properties', self.get_object_path(), **kwargs)
        else:
            raise Exception('Unknown signal: %s' % signal)