class DzenServerObject(dbus.service.Object): def __init__(self, bus, objectPath): dbus.service.Object.__init__(self, bus, objectPath) self.popupManager = PopupManager() @dbus.service.method(common.DZEN_INTERFACE, in_signature='s', out_signature='') def displayPopup(self, message): message = str(message) print('[I] Got new request: %r' % message) self.popupManager.openPopup(message) @dbus.service.method(common.QUIT_INTERFACE, in_signature='', out_signature='') def quit(self): # this should be a separate object, but I'm # showing how one object can have multiple interfaces self.mainloop.quit()
def __init__(self, bus, objectPath): dbus.service.Object.__init__(self, bus, objectPath) self.popupManager = PopupManager()