TelepathyGLib.DBusDaemon¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class TelepathyGLib.DBusDaemon(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
- Returns:
a reference to a proxy for signals and method calls on the bus daemon, or
None
- Return type:
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 sameTelepathyGLib.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:
Returns: is enough
New in version 0.7.35.
- list_activatable_names(timeout_ms, callback, user_data, weak_object)¶
- Parameters:
timeout_ms (
int
) – timeout for the callcallback (
TelepathyGLib.DBusDaemonListNamesCb
) – callback to be called on success or failure; must not beNone
user_data (
object
orNone
) – opaque user-supplied data to pass to the callbackweak_object (
GObject.Object
) – if notNone
, aGObject.Object
which will be weakly referenced; if it is destroyed, callback will not be called at all
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:
timeout_ms (
int
) – timeout for the callcallback (
TelepathyGLib.DBusDaemonListNamesCb
) – callback to be called on success or failure; must not beNone
user_data (
object
orNone
) – opaque user-supplied data to pass to the callbackweak_object (
GObject.Object
) – if notNone
, aGObject.Object
which will be weakly referenced; if it is destroyed, callback will not be called at all
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 pathobject (
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:
- Returns:
True
if well_known_name was released, orFalse
and sets error if an error occurred.- Return type:
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:
- Raises:
- Returns:
True
if well_known_name was claimed, orFalse
and sets error if an error occurred.- Return type:
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 withTelepathyGLib.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:
name (
str
) – The name whose ownership is to be watchedcallback (
TelepathyGLib.DBusDaemonNameOwnerChangedCb
) – Callback to call when the ownership is discovered or changesuser_data (
object
orNone
) – Arbitrary data to pass to callback
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.