Example #1
0
    def __init__(self):
        objects.DBusObject.__init__(self, '/org/freedesktop/DBus')
        self.uuid = binascii.hexlify(os.urandom(16))
        self.clients = dict()  # maps unique_bus_id to client connection
        self.busNames = dict()  # maps name to list of queued connections
        self.router = router.MessageRouter()
        self.next_id = 1
        self.obj_handler = objects.DBusObjectHandler(self)

        self.obj_handler.exportObject(self)
Example #2
0
    def connectionAuthenticated(self):
        """
        Called by L{protocol.BasicDBusProtocol} when the DBus authentication
        has completed successfully.
        """
        self.router = router.MessageRouter()
        self.objHandler = objects.DBusObjectHandler(self)
        self._pendingCalls = dict(
        )  # serial_number => (deferred, delayed_timeout_cb | None)
        self._dcCallbacks = list()

        d = self.callRemote('/Hello',
                            'Hello',
                            interface='org.freedesktop.DBus',
                            destination='org.freedesktop.DBus')

        d.addCallbacks(self._cbGotHello, lambda err: self.factory._failed(err))