Beispiel #1
0
    def _watch(self):
        """Watch the service name on DBus."""
        bus = DBus.get_connection()
        num = bus.watch_name(self.service_name, DBUS_FLAG_NONE,
                             self._service_name_appeared_callback,
                             self._service_name_vanished_callback)

        self._watched_id = num
Beispiel #2
0
 def _unwatch(self):
     """Stop to watch the service name on DBus."""
     bus = DBus.get_connection()
     bus.unwatch_name(self._watched_id)
     self._watched_id = None