Package dbus :: Module service :: Class BusName
[hide private]
[frames] | no frames]

Class BusName

source code

object --+
         |
        BusName

A base class for exporting your own Named Services across the Bus.

When instantiated, objects of this class attempt to claim the given well-known name on the given bus for the current process. The name is released when the BusName object becomes unreferenced.

If a well-known name is requested multiple times, multiple references to the same BusName object will be returned.

Caveats



Instance Methods [hide private]
 
__init__(self, *args, **keywords)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__del__(self) source code
 
get_bus(self)
Get the Bus this Service is on
source code
 
get_name(self)
Get the name of this service
source code
 
__repr__(self)
str(x)
source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]
 
__new__(cls, name, bus=None, allow_replacement=False, replace_existing=False, do_not_queue=False)
Constructor, which may either return an existing cached object or a new object.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, name, bus=None, allow_replacement=False, replace_existing=False, do_not_queue=False)
Static Method

source code 
Constructor, which may either return an existing cached object or a new object.
Parameters:
  • name (str) - The well-known name to be advertised
  • bus (dbus.Bus) - A Bus on which this service will be advertised.

    Omitting this parameter or setting it to None has been deprecated since version 0.82.1. For backwards compatibility, if this is done, the global shared connection to the session bus will be used.

  • allow_replacement (bool) - If True, other processes trying to claim the same well-known name will take precedence over this one.
  • replace_existing (bool) - If True, this process can take over the well-known name from other processes already holding it.
  • do_not_queue (bool) - If True, this service will not be placed in the queue of services waiting for the requested name if another service already holds it.
Returns:
a new object with type S, a subtype of T

Overrides: object.__new__

__init__(self, *args, **keywords)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
str(x)
Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)