Пример #1
0
    def __init__(self):
        self._interfaces = set([
            CLIENT, CLIENT_HANDLER, CLIENT_INTERFACE_REQUESTS,
            PROPERTIES_IFACE, CLIENT_APPROVER
        ])

        bus = dbus.Bus()
        bus_name = dbus.service.BusName(SUGAR_CLIENT_SERVICE, bus=bus)

        dbus.service.Object.__init__(self, bus_name, SUGAR_CLIENT_PATH)
        DBusProperties.__init__(self)

        self._implement_property_get(
            CLIENT, {
                'Interfaces': lambda: list(self._interfaces),
            })
        self._implement_property_get(
            CLIENT_HANDLER, {
                'HandlerChannelFilter': self.__get_filters_cb,
            })
        self._implement_property_get(
            CLIENT_APPROVER, {
                'ApproverChannelFilter': self.__get_filters_cb,
            })

        self.got_channel = dispatch.Signal()
        self.got_dispatch_operation = dispatch.Signal()
Пример #2
0
    def __init__(self):
        self._interfaces = set([CLIENT, CLIENT_HANDLER, CLIENT_INTERFACE_REQUESTS, PROPERTIES_IFACE, CLIENT_APPROVER])

        bus = dbus.Bus()
        bus_name = dbus.service.BusName(SUGAR_CLIENT_SERVICE, bus=bus)

        dbus.service.Object.__init__(self, bus_name, SUGAR_CLIENT_PATH)
        DBusProperties.__init__(self)

        self._implement_property_get(CLIENT, {"Interfaces": lambda: list(self._interfaces)})
        self._implement_property_get(CLIENT_HANDLER, {"HandlerChannelFilter": self.__get_filters_handler_cb})
        self._implement_property_get(CLIENT_APPROVER, {"ApproverChannelFilter": self.__get_filters_approver_cb})

        self.got_channel = dispatch.Signal()
        self.got_dispatch_operation = dispatch.Signal()
Пример #3
0
    def __init__(self, bundle_id, got_channel_cb):
        self._interfaces = set([CLIENT, CLIENT_HANDLER, PROPERTIES_IFACE])
        self._got_channel_cb = got_channel_cb

        bus = dbus.Bus()
        name = CLIENT + '.' + bundle_id
        bus_name = dbus.service.BusName(name, bus=bus)

        path = '/' + name.replace('.', '/')
        dbus.service.Object.__init__(self, bus_name, path)
        DBusProperties.__init__(self)

        self._implement_property_get(CLIENT, {
            'Interfaces': lambda: list(self._interfaces),
        })
        self._implement_property_get(CLIENT_HANDLER, {
            'HandlerChannelFilter': self.__get_filters_cb,
        })
Пример #4
0
    def __init__(self, bundle_id, got_channel_cb):
        self._interfaces = set([CLIENT, CLIENT_HANDLER, PROPERTIES_IFACE])
        self._got_channel_cb = got_channel_cb

        bus = dbus.Bus()
        name = CLIENT + '.' + bundle_id
        bus_name = dbus.service.BusName(name, bus=bus)

        path = '/' + name.replace('.', '/')
        dbus.service.Object.__init__(self, bus_name, path)
        DBusProperties.__init__(self)

        self._implement_property_get(CLIENT, {
            'Interfaces': lambda: list(self._interfaces),
        })
        self._implement_property_get(CLIENT_HANDLER, {
            'HandlerChannelFilter': self.__get_filters_cb,
        })