コード例 #1
0
ファイル: server.py プロジェクト: Quent42340/dotfiles
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()
コード例 #2
0
ファイル: server.py プロジェクト: Quent42340/dotfiles
 def __init__(self, bus, objectPath):
     dbus.service.Object.__init__(self, bus, objectPath)
     self.popupManager = PopupManager()