dasbus.server.handler module
- class AbstractServerObjectHandler(message_bus, object_path, obj)[source]
Bases:
object
The abstract handler of a published object.
- abstract connect_object()[source]
Connect the object to DBus.
Handle emitted signals of the object with the _emit_signal method and handle incoming DBus calls with the _handle_call method.
- abstract disconnect_object()[source]
Disconnect the object from DBus.
Unregister the object and disconnect all signals.
- property specification
DBus specification.
- class GLibServer[source]
Bases:
object
The low-level DBus server library based on GLib.
- classmethod emit_signal(connection, object_path, interface_name, signal_name, parameters, destination=None)[source]
Emit a DBus signal.
- classmethod get_call_info(invocation)[source]
Get information about the DBus call.
Supported items:
sender str: The bus name that invoked the method
There can be more supported items in the future.
- Parameters
invocation – an invocation of a DBus call
- Returns
a dictionary of information about the DBus call
- classmethod register_object(connection, object_path, object_xml, callback, callback_args=())[source]
Register an object on DBus.
- class ServerObjectHandler(message_bus, object_path, obj, error_mapper=None, server=<class 'dasbus.server.handler.GLibServer'>, signal_factory=<class 'dasbus.signal.Signal'>)[source]
Bases:
AbstractServerObjectHandler
The handler of an object published on DBus.