Exemplo n.º 1
0
    def __init__(self, path, member, interface, destination=None,
                 signature=None, body=None):
        """
        @param path: C{str} DBus object path of the object sending the signal
        @param member: C{str} Member name
        @param interface: C{str} DBus interface name or None
        @param destination: C{str} DBus bus name for message destination or
                            None
        @param signature: C{str} DBus signature string for encoding
                          C{self.body}
        @param body: C{list} of python objects to encode. Objects must match
                     the C{self.signature}
        """
        marshal.validateMemberName(member)
        marshal.validateInterfaceName(interface)

        if destination:
            marshal.validateBusName(destination)

        self.path = path
        self.member = member
        self.interface = interface
        self.destination = destination
        self.signature = signature
        self.body = body

        self._marshal()
Exemplo n.º 2
0
    def __init__(self, path, member, interface, destination=None,
                 signature=None, body=None):
        """
        @param path: C{str} DBus object path of the object sending the signal
        @param member: C{str} Member name
        @param interface: C{str} DBus interface name or None
        @param destination: C{str} DBus bus name for message destination or
                            None
        @param signature: C{str} DBus signature string for encoding
                          C{self.body}
        @param body: C{list} of python objects to encode. Objects must match
                     the C{self.signature}
        """
        marshal.validateMemberName(member)
        marshal.validateInterfaceName(interface)

        if destination:
            marshal.validateBusName(destination)

        self.path = path
        self.member = member
        self.interface = interface
        self.destination = destination
        self.signature = signature
        self.body = body

        self._marshal()
Exemplo n.º 3
0
    def __init__(self,
                 path,
                 member,
                 interface=None,
                 destination=None,
                 signature=None,
                 body=None,
                 expectReply=True,
                 autoStart=True,
                 oobFDs=None):
        """
        @param path: C{str} DBus object path
        @param member: C{str} Member name
        @param interface: C{str} DBus interface name or None
        @param destination: C{str} DBus bus name for message destination or
                            None
        @param signature: C{str} DBus signature string for encoding
                          C{self.body}
        @param body: C{list} of python objects to encode. Objects must match
                     the C{self.signature}
        @param expectReply: True if a Method Return message should be sent
                            in reply to this message
        @param autoStart: True if the Bus should auto-start a service to handle
                          this message if the service is not already running.
        """

        marshal.validateMemberName(member)

        if interface:
            marshal.validateInterfaceName(interface)

        if destination:
            marshal.validateBusName(destination)

        if path == '/org/freedesktop/DBus/Local':
            raise error.MarshallingError(
                '/org/freedesktop/DBus/Local is a reserved path')

        self.path = path
        self.member = member
        self.interface = interface
        self.destination = destination
        self.signature = signature
        self.body = body
        self.expectReply = expectReply
        self.autoStart = autoStart
        self.oobFDs = oobFDs

        self._marshal(oobFDs=oobFDs)
Exemplo n.º 4
0
    def __init__(
        self,
        path,
        member,
        interface=None,
        destination=None,
        signature=None,
        body=None,
        expectReply=True,
        autoStart=True,
    ):
        """
        @param path: C{str} DBus object path
        @param member: C{str} Member name
        @param interface: C{str} DBus interface name or None
        @param destination: C{str} DBus bus name for message destination or
                            None
        @param signature: C{str} DBus signature string for encoding
                          C{self.body}
        @param body: C{list} of python objects to encode. Objects must match
                     the C{self.signature}
        @param expectReply: True if a Method Return message should be sent
                            in reply to this message
        @param autoStart: True if the Bus should auto-start a service to handle
                          this message if the service is not already running.
        """

        marshal.validateMemberName(member)

        if interface:
            marshal.validateInterfaceName(interface)

        if destination:
            marshal.validateBusName(destination)

        if path == "/org/freedesktop/DBus/Local":
            raise error.MarshallingError("/org/freedesktop/DBus/Local is a reserved path")

        self.path = path
        self.member = member
        self.interface = interface
        self.destination = destination
        self.signature = signature
        self.body = body
        self.expectReply = expectReply
        self.autoStart = autoStart

        self._marshal()