It derives from <GObject>.
<GDBusObjectManagerClient> is used
to create, monitor and delete object proxies for remote objects exported
by a <GDBusObjectManagerServer>
(or any code implementing the
org.freedesktop.DBus.ObjectManager
interface).
Once an instance of this type has been created, you can connect to the
dbus-object-manager:object-added and
[signal@Gio.DBusObjectManager::object-removed signals] and inspect the
<GDBusObjectProxy> objects returned by
dbus-object-manager:get-objects.
If the name for a
<GDBusObjectManagerClient> is not
owned by anyone at object construction time, the default behavior is to
request the message bus to launch an owner for the name. This behavior
can be disabled using the
do-not-auto-start flag. It’s
also worth noting that this only works if the name of interest is
activatable in the first place. E.g. in some cases it is not possible
to launch an owner for the requested name. In this case,
<GDBusObjectManagerClient> object
construction still succeeds but there will be no object proxies (e.g.
dbus-object-manager:get-objects returns the empty list)
and the dbus-object-manager-client:name-owner property is
NULL.
The owner of the requested name can come and go (for example consider a
system service being restarted) –
<GDBusObjectManagerClient> handles
this case too; simply connect to the object:notify signal to watch for changes on the
dbus-object-manager-client:name-owner property. When the
name owner vanishes, the behavior is that
dbus-object-manager-client:name-owner is set to
NULL (this includes emission of the object:notify signal) and then
dbus-object-manager:object-removed signals are
synthesized for all currently existing object proxies. Since
dbus-object-manager-client:name-owner is NULL when
this happens, you can use this information to disambiguate a synthesized
signal from a genuine signal caused by object removal on the remote
<GDBusObjectManager>. Similarly, when a
new name owner appears, dbus-object-manager:object-added signals are synthesized
while dbus-object-manager-client:name-owner is still
NULL. Only when all object proxies have been added, the
dbus-object-manager-client:name-owner is set to the new
name owner (this includes emission of the object:notify signal). Furthermore, you are
guaranteed that dbus-object-manager-client:name-owner will alternate
between a name owner (e.g. :1.42) and NULL even in the
case where the name of interest is atomically replaced
Ultimately,
<GDBusObjectManagerClient> is used
to obtain <GDBusProxy> instances. All signals
(including the org.freedesktop.DBus.Properties::PropertiesChanged
signal) delivered to <GDBusProxy> instances are
guaranteed to originate from the name owner. This guarantee along with
the behavior described above, means that certain race conditions
including the “half the proxy is from the old owner and the other half
is from the new owner” problem cannot happen.
To avoid having the application connect to signals on the returned
<GDBusObjectProxy> and
<GDBusProxy> objects, the dbus-object:interface-added,
dbus-object:interface-removed, dbus-proxy:g-properties-changed and
dbus-proxy:g-signal signals are
also emitted on the
<GDBusObjectManagerClient>
instance managing these objects. The signals emitted are
dbus-object-manager:interface-added,
dbus-object-manager:interface-removed,
dbus-object-manager-client:interface-proxy-properties-changed
and dbus-object-manager-client:interface-proxy-signal.
Note that all callbacks and signals are emitted in the thread-default
main context (see main-context:push-thread-default) that the
<GDBusObjectManagerClient> object
was constructed in. Additionally, the
<GDBusObjectProxy> and
<GDBusProxy> objects originating from the
<GDBusObjectManagerClient> object
will be created in the same context and, consequently, will deliver
signals in the same main loop.
If this property is not none, then
dbus-object-manager-client:connection must be #f
and will be set to the <GDBusConnection>
obtained by calling bus-get with the value of this
property.
Its value is a <GBusType>, or one of its symbols.
It can only be set when the object is made, with #:bus-type. It
cannot be read.
The <GDBusConnection> to use.
Its value is a <GDBusConnection>, or
#f.
It can only be set when the object is made, with #:connection.
Flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Its value is a
<GDBusObjectManagerClientFlags>
(or, to set it, a list of its symbols, or one of them).
It can only be set when the object is made, with #:flags.
A GDestroyNotify for the
gpointer user_data in dbus-object-manager-client:get-proxy-type-user-data.
Its value is a foreign pointer (or, to set it, a bytevector).
It can only be set when the object is made, with
#:get-proxy-type-destroy-notify.
The GDBusProxyTypeFunc to use when
determining what GType to use for interface proxies or #f.
Its value is a foreign pointer (or, to set it, a bytevector).
It can only be set when the object is made, with
#:get-proxy-type-func.
The gpointer user_data to pass to
dbus-object-manager-client:get-proxy-type-func.
Its value is a foreign pointer (or, to set it, a bytevector).
It can only be set when the object is made, with
#:get-proxy-type-user-data.
The well-known name or unique name that the manager is for.
Its value is a string, or #f.
It can only be set when the object is made, with #:name.
The unique name that owns dbus-object-manager-client:name or #f if no-one is
currently owning the name. Connect to the object:notify signal to track changes to this
property.
Its value is a string, or #f.
It is read only.
The object path the manager is for.
Its value is a string, or #f.
It can only be set when the object is made, with #:object-path.
Gets the <GDBusConnection> used by
self.
Passed: a
<GDBusObjectManagerClient>.
Returned: a <GDBusConnection>.
A <GDBusConnection> object. Do not free,
the object belongs to self.
Gets the flags that self was constructed with.
Passed: a
<GDBusObjectManagerClient>.
Returned: a
<GDBusObjectManagerClientFlags>.
Zero of more flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Gets the name that self is for, or #f if not a message bus
connection.
Passed: a
<GDBusObjectManagerClient>.
Returned: a string.
A unique or well-known name. Do not free, the string belongs to self.
The unique name that owns the name that self is for or #f
if no-one currently owns that name. You can connect to the
object:notify signal to track
changes to the dbus-object-manager-client:name-owner property.
Passed: a
<GDBusObjectManagerClient>.
Returned: a string, or #f.
The name owner or #f if no name owner exists. Free with
byte-array:free.
Asynchronously creates a new
<GDBusObjectManagerClient> object.
This is an asynchronous failable constructor. When the result is ready,
callback will be invoked in the thread-default main context (see
main-context:push-thread-default) of the
thread you are calling this method from. You can then call
dbus-object-manager-client:new-finish to get the result.
See dbus-object-manager-client:new-sync for the synchronous
version.
Passed: a <GDBusConnection>.
Passed: a
<GDBusObjectManagerClientFlags>,
or a list of its symbols, or one of them.
Zero or more flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Passed: a string.
The owner of the control object (unique or well-known name).
Passed: a string.
The object path of the control object.
Passed, or left out: a procedure, or #f.
A GDBusProxyTypeFunc function or
#f to always construct <GDBusProxy>
proxies.
See GDBusProxyTypeFunc for how it is
called.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f
Passed, or left out: a procedure, or #f.
A GAsyncReadyCallback to call when the
request is satisfied.
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
User data to pass to get-proxy-type-func.
Not passed: guile-gi supplies it.
Free function for get-proxy-type-user-data or #f.
See GDestroyNotify for how it is
called.
Not passed: guile-gi supplies it.
The data to pass to callback.
Finishes an operation started with dbus-object-manager-client:new.
Passed: a <GAsyncResult>.
A <GAsyncResult> obtained from the
GAsyncReadyCallback passed to
dbus-object-manager-client:new.
Returned: a
<GDBusObjectManagerClient>.
A <GDBusObjectManagerClient>
object or #f if error is set. Free with object:unref.
Like dbus-object-manager-client:new but takes a
<GBusType> instead of a
<GDBusConnection>.
This is an asynchronous failable constructor. When the result is ready,
callback will be invoked in the thread-default main context (see
main-context:push-thread-default) of the
thread you are calling this method from. You can then call
dbus-object-manager-client:new-for-bus-finish to
get the result. See dbus-object-manager-client:new-for-bus-sync for the
synchronous version.
Passed: a <GBusType>, or one of its symbols.
A <GBusType>.
Passed: a
<GDBusObjectManagerClientFlags>,
or a list of its symbols, or one of them.
Zero or more flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Passed: a string.
The owner of the control object (unique or well-known name).
Passed: a string.
The object path of the control object.
Passed, or left out: a procedure, or #f.
A GDBusProxyTypeFunc function or
#f to always construct <GDBusProxy>
proxies.
See GDBusProxyTypeFunc for how it is
called.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f
Passed, or left out: a procedure, or #f.
A GAsyncReadyCallback to call when the
request is satisfied.
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
User data to pass to get-proxy-type-func.
Not passed: guile-gi supplies it.
Free function for get-proxy-type-user-data or #f.
See GDestroyNotify for how it is
called.
Not passed: guile-gi supplies it.
The data to pass to callback.
Finishes an operation started with dbus-object-manager-client:new-for-bus.
Passed: a <GAsyncResult>.
A <GAsyncResult> obtained from the
GAsyncReadyCallback passed to
dbus-object-manager-client:new-for-bus.
Returned: a
<GDBusObjectManagerClient>.
A <GDBusObjectManagerClient>
object or #f if error is set. Free with object:unref.
Like dbus-object-manager-client:new-sync but takes a
<GBusType> instead of a
<GDBusConnection>.
This is a synchronous failable constructor - the calling thread is
blocked until a reply is received. See
dbus-object-manager-client:new-for-bus for the
asynchronous version.
Passed: a <GBusType>, or one of its symbols.
A <GBusType>.
Passed: a
<GDBusObjectManagerClientFlags>,
or a list of its symbols, or one of them.
Zero or more flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Passed: a string.
The owner of the control object (unique or well-known name).
Passed: a string.
The object path of the control object.
Passed, or left out: a procedure, or #f.
A GDBusProxyTypeFunc function or
#f to always construct <GDBusProxy>
proxies.
See GDBusProxyTypeFunc for how it is
called.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f
Returned: a
<GDBusObjectManagerClient>.
A <GDBusObjectManagerClient>
object or #f if error is set. Free with object:unref.
Not passed: guile-gi supplies it.
User data to pass to get-proxy-type-func.
Not passed: guile-gi supplies it.
Free function for get-proxy-type-user-data or #f.
See GDestroyNotify for how it is
called.
Creates a new
<GDBusObjectManagerClient> object.
This is a synchronous failable constructor - the calling thread is
blocked until a reply is received. See
dbus-object-manager-client:new
for the asynchronous version.
Passed: a <GDBusConnection>.
Passed: a
<GDBusObjectManagerClientFlags>,
or a list of its symbols, or one of them.
Zero or more flags from the
<GDBusObjectManagerClientFlags>
enumeration.
Passed: a string, or #f.
The owner of the control object (unique or well-known name), or
#f when not using a message bus connection.
Passed: a string.
The object path of the control object.
Passed, or left out: a procedure, or #f.
A GDBusProxyTypeFunc function or
#f to always construct <GDBusProxy>
proxies.
See GDBusProxyTypeFunc for how it is
called.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f
Returned: a
<GDBusObjectManagerClient>.
A <GDBusObjectManagerClient>
object or #f if error is set. Free with object:unref.
Not passed: guile-gi supplies it.
User data to pass to get-proxy-type-func.
Not passed: guile-gi supplies it.
Free function for get-proxy-type-user-data or #f.
See GDestroyNotify for how it is
called.
Connect a handler with (connect object
dbus-object-manager-client:interface-proxy-properties-changed handler).
It is called as (handler self object-proxy interface-proxy
changed-properties invalidated-properties).
Emitted when one or more D-Bus properties on proxy changes. The local
cache has already been updated when this signal fires. Note that both
changed-properties and invalidated-properties are guaranteed
to never be #f (either may be empty though).
This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.
This signal is emitted in the thread-default main context (see
main-context:push-thread-default) that
manager was constructed in.
Passed: a
<GDBusObjectManagerClient>.
Passed: a <GDBusObjectProxy>.
The <GDBusObjectProxy> on which an
interface has properties that are changing.
Passed: a <GDBusProxy>.
The <GDBusProxy> that has properties that are
changing.
Passed: a <GVariant>.
A <GVariant> containing the properties that
changed (type: a{sv}).
Passed: a vector, each a string.
A #f terminated array of properties that were invalidated.
Connect a handler with (connect object
dbus-object-manager-client:interface-proxy-signal handler). It is
called as (handler self object-proxy interface-proxy sender-name
signal-name parameters).
Emitted when a D-Bus signal is received on interface-proxy.
This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.
This signal is emitted in the thread-default main context (see
main-context:push-thread-default) that
manager was constructed in.
Passed: a
<GDBusObjectManagerClient>.
Passed: a <GDBusObjectProxy>.
The <GDBusObjectProxy> on which an
interface is emitting a D-Bus signal.
Passed: a <GDBusProxy>.
The <GDBusProxy> that is emitting a D-Bus
signal.
Passed: a string.
The sender of the signal or NULL if the connection is not a bus connection.
Passed: a string.
The signal name.
Passed: a <GVariant>.
A <GVariant> tuple with parameters for the
signal.
Signal class handler for the dbus-object-manager-client:interface-proxy-properties-changed
signal.
To override it in a new class, give register-type #:vfuncs
`((interface-proxy-properties-changed . ,procedure)). The procedure
is called as (procedure self object-proxy interface-proxy
changed-properties invalidated-properties).
Passed: the class whose implementation to call:
<GDBusObjectManagerClient>, or a
class that derives from it, or its GType number.
Passed: a
<GDBusObjectManagerClient>.
Passed: a <GDBusObjectProxy>.
Passed: a <GDBusProxy>.
Passed: a <GVariant>.
Passed: a string.
Signal class handler for the dbus-object-manager-client:interface-proxy-signal
signal.
To override it in a new class, give register-type #:vfuncs
`((interface-proxy-signal . ,procedure)). The procedure is called as
(procedure self object-proxy interface-proxy sender-name
signal-name parameters).
Passed: the class whose implementation to call:
<GDBusObjectManagerClient>, or a
class that derives from it, or its GType number.
Passed: a
<GDBusObjectManagerClient>.
Passed: a <GDBusObjectProxy>.
Passed: a <GDBusProxy>.
Passed: a string.
Passed: a string.
Passed: a <GVariant>.