Ejemplo n.º 1
0
    def Start(self, sender=None):
        with self.lock:
            if self.server:
                return self.server.address

            log.debug('Attempting to create new domain socket server')
            self.server = server.DomainSocketServer(
                object_classes=[DomainSocketRegisterDBusObject], )
            address = self.server.run()
            log.debug('DomainSocketServer created and listening on "%s"',
                      address)
            return address
Ejemplo n.º 2
0
    def Start(self, locale, sender=None):
        locale = dbus_utils.dbus_to_python(locale, expected_type=str)
        Locale.set(locale)

        with self.lock:
            if self.server:
                return self.server.address

            log.debug('Attempting to create new domain socket server')
            self.server = server.DomainSocketServer(
                object_classes=[DomainSocketRegisterDBusObject], )
            address = self.server.run()
            log.debug('DomainSocketServer created and listening on "%s"',
                      address)
            return address
Ejemplo n.º 3
0
    def Start(self, locale, sender=None):
        locale = dbus_utils.dbus_to_python(locale, expected_type=str)
        Locale.set(locale)

        with self.lock:
            if self.server:
                return self.server.address

            log.debug("Attempting to create new domain socket server")
            cmd_line = DBusSender.get_cmd_line(sender)
            self.server = server.DomainSocketServer(
                object_classes=[DomainSocketRegisterDBusObject],
                sender=sender,
                cmd_line=cmd_line)
            address = self.server.run()
            log.debug(
                'DomainSocketServer for sender %s created and listening on "%s"'
                % (sender, address))
            return address