TelepathyGLib.DBusDaemon

g GObject.Object GObject.Object TelepathyGLib.Proxy TelepathyGLib.Proxy GObject.Object->TelepathyGLib.Proxy TelepathyGLib.DBusDaemon TelepathyGLib.DBusDaemon TelepathyGLib.Proxy->TelepathyGLib.DBusDaemon

Subclasses:

None

Methods

Inherited:

TelepathyGLib.Proxy (11), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

dup ()

class

init_known_interfaces ()

get_unique_name ()

list_activatable_names (timeout_ms, callback, user_data, weak_object)

list_names (timeout_ms, callback, user_data, weak_object)

register_object (object_path, object)

release_name (well_known_name)

request_name (well_known_name, idempotent)

unregister_object (object)

watch_name_owner (name, callback, *user_data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

TelepathyGLib.Proxy (5)

Signals

Inherited:

TelepathyGLib.Proxy (2), GObject.Object (1)

Fields

Inherited:

TelepathyGLib.Proxy (2), GObject.Object (1)

Class Details

class TelepathyGLib.DBusDaemon(**kwargs)
Bases:

TelepathyGLib.Proxy

Abstract:

No

Structure:

TelepathyGLib.DBusDaemonClass

A subclass of TelepathyGLib.Proxy that represents the D-Bus daemon. It mainly provides functionality to manage well-known names on the bus.

New in version 0.7.1.

classmethod dup()
Raises:

GLib.Error

Returns:

a reference to a proxy for signals and method calls on the bus daemon, or None

Return type:

TelepathyGLib.DBusDaemon

Returns a proxy for signals and method calls on the D-Bus daemon on which this process was activated (if it was launched by D-Bus service activation), or the session bus (otherwise).

If it is not possible to connect to the appropriate bus, raise an error and return None.

The returned TelepathyGLib.DBusDaemon is cached; the same TelepathyGLib.DBusDaemon object will be returned by this function repeatedly, as long as at least one reference exists.

New in version 0.7.26.

classmethod init_known_interfaces()

Ensure that the known interfaces for TelepathyGLib.DBusDaemon have been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling tp_proxy_or_subclass_hook_on_interface_add() with first argument %TP_TYPE_DBUS_DAEMON.

New in version 0.7.32.

get_unique_name()
Returns:

the unique name of this connection to the bus, which is valid for as long as this TelepathyGLib.DBusDaemon is

Return type:

str

Returns: is enough

New in version 0.7.35.

list_activatable_names(timeout_ms, callback, user_data, weak_object)
Parameters:

Call the ListActivatableNames method on the bus daemon, asynchronously. The callback will be called from the main loop with a list of all the well-known names that are available for service-activation on the bus.

In versions of telepathy-glib that have it, this should be preferred instead of calling tp_cli_dbus_daemon_call_list_activatable_names(), since that function will result in wakeups for every NameOwnerChanged signal.

New in version 0.7.35.

list_names(timeout_ms, callback, user_data, weak_object)
Parameters:

Call the ListNames method on the bus daemon, asynchronously. The callback will be called from the main loop with a list of all the names (either unique or well-known) that exist on the bus.

In versions of telepathy-glib that have it, this should be preferred instead of calling tp_cli_dbus_daemon_call_list_names(), since that function will result in wakeups for every NameOwnerChanged signal.

New in version 0.7.35.

register_object(object_path, object)
Parameters:
  • object_path (str) – an object path

  • object (GObject.Object) – an object to export

Export object at object_path. This is a convenience wrapper around dbus_g_connection_register_g_object(), and behaves similarly.

New in version 0.11.3.

release_name(well_known_name)
Parameters:

well_known_name (str) – a well-known name owned by this process to release

Raises:

GLib.Error

Returns:

True if well_known_name was released, or False and sets error if an error occurred.

Return type:

bool

Release the given well-known name. This makes a synchronous call to the bus daemon.

New in version 0.7.30.

request_name(well_known_name, idempotent)
Parameters:
  • well_known_name (str) – a well-known name to acquire

  • idempotent (bool) – whether to consider it to be a success if this process already owns the name

Raises:

GLib.Error

Returns:

True if well_known_name was claimed, or False and sets error if an error occurred.

Return type:

bool

Claim the given well-known name without queueing, allowing replacement or replacing an existing name-owner. This makes a synchronous call to the bus daemon.

New in version 0.7.30.

unregister_object(object)
Parameters:

object (GObject.Object) – an object previously exported with TelepathyGLib.DBusDaemon.register_object()

Stop exporting object on D-Bus. This is a convenience wrapper around dbus_g_connection_unregister_g_object(), and behaves similarly.

New in version 0.11.3.

watch_name_owner(name, callback, *user_data)
Parameters:

Arrange for callback to be called with the owner of name as soon as possible (which might even be before this function returns!), then again every time the ownership of name changes.

If multiple watches are registered for the same name, they will be called in the order they were registered.

New in version 0.7.1.