dasbus.client.handler module

class AbstractClientObjectHandler(message_bus, service_name, object_path)[source]

Bases: object

The abstract handler of a remote DBus object.

create_member(interface_name, member_name)[source]

Create a member of the DBus object.

Parameters
  • interface_name – a name of the interface

  • member_name – a name of the member

Returns

a signal, a method or a property

abstract disconnect_members()[source]

Disconnect members of the DBus object.

Unsubscribe from DBus signals and disconnect all registered callbacks of the proxy signals.

property object_path

DBus object path.

Returns

a DBus path

property service_name

DBus service name.

Returns

a DBus name

property specification

DBus specification.

class ClientObjectHandler(message_bus, service_name, object_path, error_mapper=None, client=<class 'dasbus.client.handler.GLibClient'>, signal_factory=<class 'dasbus.signal.Signal'>)[source]

Bases: AbstractClientObjectHandler

The client handler of a DBus object.

disconnect_members()[source]

Disconnect members of the DBus object.

class GLibClient[source]

Bases: object

The low-level DBus client library based on GLib.

DBUS_TIMEOUT_NONE = 2147483647
classmethod async_call(connection, service_name, object_path, interface_name, method_name, parameters, reply_type, callback, callback_args=(), flags=0, timeout=2147483647)[source]

Asynchronously call a DBus method.

classmethod get_remote_error_message(error)[source]

Get a message of the remote DBus error.

classmethod get_remote_error_name(error)[source]

Get a DBus name of the remote DBus error.

classmethod is_remote_error(error)[source]

Is it a remote DBus error?

classmethod is_timeout_error(error)[source]

Is it a timeout error?

classmethod subscribe_signal(connection, service_name, object_path, interface_name, signal_name, callback, callback_args=(), flags=0)[source]

Subscribe to a signal.

Returns

a callback to unsubscribe

classmethod sync_call(connection, service_name, object_path, interface_name, method_name, parameters, reply_type, flags=0, timeout=2147483647)[source]

Synchronously call a DBus method.

Returns

a result of the DBus call