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
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