gio.dbus_object_manager_client
Module for DBusObjectManagerClient class
Types 3
gio.dbus_object_manager_client.DBusObjectManagerClient is used to create, monitor and delete object proxies for remote objects exported by a gio.dbus_object_manager_server.DBusObjectManagerServer (or any code implementing the org.freedesktop.DBus.ObjectManager interface).
Once an instance of this type has been created, you can connect to the gio.dbus_object_manager.DBusObjectManager.objectAdded and gio.dbus_object_manager.DBusObjectManager.objectRemoved and inspect the gio.dbus_object_proxy.DBusObjectProxy objects returned by gio.dbus_object_manager.DBusObjectManager.getObjects.
If the name for a gio.dbus_object_manager_client.DBusObjectManagerClient 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 gio.types.DBusObjectManagerClientFlags.DoNotAutoStart 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, gio.dbus_object_manager_client.DBusObjectManagerClient object construction still succeeds but there will be no object proxies (e.g. gio.dbus_object_manager.DBusObjectManager.getObjects returns the empty list) and the gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner property is NULL.
The owner of the requested name can come and go (for example consider a system service being restarted) – gio.dbus_object_manager_client.DBusObjectManagerClient handles this case too; simply connect to the gobject.object.ObjectWrap.notify signal to watch for changes on the gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner property. When the name owner vanishes, the behavior is that gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner is set to NULL (this includes emission of the gobject.object.ObjectWrap.notify signal) and then gio.dbus_object_manager.DBusObjectManager.objectRemoved signals are synthesized for all currently existing object proxies. Since gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner 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 gio.dbus_object_manager.DBusObjectManager. Similarly, when a new name owner appears, gio.dbus_object_manager.DBusObjectManager.objectAdded signals are synthesized while gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner is still NULL. Only when all object proxies have been added, the gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner is set to the new name owner (this includes emission of the gobject.object.ObjectWrap.notify signal). Furthermore, you are guaranteed that gio.dbus_object_manager_client.DBusObjectManagerClient.nameOwner 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, gio.dbus_object_manager_client.DBusObjectManagerClient is used to obtain gio.dbus_proxy.DBusProxy instances. All signals (including the org.freedesktop.DBus.Properties::PropertiesChanged signal) delivered to gio.dbus_proxy.DBusProxy 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 gio.dbus_object_proxy.DBusObjectProxy and gio.dbus_proxy.DBusProxy objects, the gio.dbus_object.DBusObject.interfaceAdded, gio.dbus_object.DBusObject.interfaceRemoved, gio.dbus_proxy.DBusProxy.gPropertiesChanged and gio.dbus_proxy.DBusProxy.gSignal signals are also emitted on the gio.dbus_object_manager_client.DBusObjectManagerClient instance managing these objects. The signals emitted are gio.dbus_object_manager.DBusObjectManager.interfaceAdded, gio.dbus_object_manager.DBusObjectManager.interfaceRemoved, gio.dbus_object_manager_client.DBusObjectManagerClient.interfaceProxyPropertiesChanged and gio.dbus_object_manager_client.DBusObjectManagerClient.interfaceProxySignal.
Note that all callbacks and signals are emitted in the thread-default main context (see glib.main_context.MainContext.pushThreadDefault) that the gio.dbus_object_manager_client.DBusObjectManagerClient object was constructed in. Additionally, the gio.dbus_object_proxy.DBusObjectProxy and gio.dbus_proxy.DBusProxy objects originating from the gio.dbus_object_manager_client.DBusObjectManagerClient object will be created in the same context and, consequently, will deliver signals in the same main loop.
DBusObjectManagerClient self()Returns `this`, for use in `with` statements.DBusObjectManagerClientGidBuilder builder()Get builder for [gio.dbus_object_manager_client.DBusObjectManagerClient] Returns: New builder objectgio.dbus_connection.DBusConnection connection() @propertyGet `connection` property. Returns: The #GDBusConnection to use.gio.types.DBusObjectManagerClientFlags flags() @propertyGet `flags` property. Returns: Flags from the #GDBusObjectManagerClientFlags enumeration.void * getProxyTypeDestroyNotify() @propertyGet `getProxyTypeDestroyNotify` property. Returns: A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.void * getProxyTypeFunc() @propertyGet `getProxyTypeFunc` property. Returns: The #GDBusProxyTypeFunc to use when determining what #GType to use for interface proxies or null.void * getProxyTypeUserData() @propertyGet `getProxyTypeUserData` property. Returns: The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.string name() @propertyGet `name` property. Returns: The well-known name or unique name that the manager is for.string nameOwner() @propertyGet `nameOwner` property. Returns: The unique name that owns #GDBusObjectManagerClient:name or null if no-one is currently owning the name. Connect to the #GObject::notify signal to track changes t...string objectPath() @propertyGet `objectPath` property. Returns: The object path the manager is for.gio.dbus_object_manager_client.DBusObjectManagerClient newFinish(gio.async_result.AsyncResult res)Finishes an operation started with [gio.dbus_object_manager_client.DBusObjectManagerClient.new_].gio.dbus_object_manager_client.DBusObjectManagerClient newForBusFinish(gio.async_result.AsyncResult res)Finishes an operation started with [gio.dbus_object_manager_client.DBusObjectManagerClient.newForBus].gio.dbus_object_manager_client.DBusObjectManagerClient newForBusSync(gio.types.BusType busType, gio.types.DBusObjectManagerClientFlags flags, string name, string objectPath, gio.types.DBusProxyTypeFunc getProxyTypeFunc = null, gio.cancellable.Cancellable cancellable = null)Like [gio.dbus_object_manager_client.DBusObjectManagerClient.newSync] but takes a #GBusType instead of a #GDBusConnection.gio.dbus_object_manager_client.DBusObjectManagerClient newSync(gio.dbus_connection.DBusConnection connection, gio.types.DBusObjectManagerClientFlags flags, string name, string objectPath, gio.types.DBusProxyTypeFunc getProxyTypeFunc = null, gio.cancellable.Cancellable cancellable = null)Creates a new #GDBusObjectManagerClient object.void new_(gio.dbus_connection.DBusConnection connection, gio.types.DBusObjectManagerClientFlags flags, string name, string objectPath, gio.types.DBusProxyTypeFunc getProxyTypeFunc = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously creates a new #GDBusObjectManagerClient object.void newForBus(gio.types.BusType busType, gio.types.DBusObjectManagerClientFlags flags, string name, string objectPath, gio.types.DBusProxyTypeFunc getProxyTypeFunc = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Like [gio.dbus_object_manager_client.DBusObjectManagerClient.new_] but takes a #GBusType instead of a #GDBusConnection.gio.dbus_connection.DBusConnection getConnection()Gets the #GDBusConnection used by manager. Returns: A #GDBusConnection object. Do not free, the object belongs to manager.gio.types.DBusObjectManagerClientFlags getFlags()Gets the flags that manager was constructed with. Returns: Zero of more flags from the #GDBusObjectManagerClientFlags enumeration.string getName()Gets the name that manager is for, or null if not a message bus connection. Returns: A unique or well-known name. Do not free, the string belongs to manager.string getNameOwner()The unique name that owns the name that manager is for or null if no-one currently owns that name. You can connect to the #GObject::notify signal to track changes to the #GDBusObjectManagerClient:n...gulong connectInterfaceProxyPropertiesChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.dbus_object_proxy.DBusObjectProxy)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.dbus_proxy.DBusProxy)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] == glib.variant.Variant)))
&& (Parameters!T.length < 4 || (ParameterStorageClassTuple!T[3] == ParameterStorageClass.none && is(Parameters!T[3] == string[])))
&& (Parameters!T.length < 5 || (ParameterStorageClassTuple!T[4] == ParameterStorageClass.none && is(Parameters!T[4] : gio.dbus_object_manager_client.DBusObjectManagerClient)))
&& Parameters!T.length < 6)Connect to `InterfaceProxyPropertiesChanged` signal.gulong connectInterfaceProxySignal(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.dbus_object_proxy.DBusObjectProxy)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.dbus_proxy.DBusProxy)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] == string)))
&& (Parameters!T.length < 4 || (ParameterStorageClassTuple!T[3] == ParameterStorageClass.none && is(Parameters!T[3] == string)))
&& (Parameters!T.length < 5 || (ParameterStorageClassTuple!T[4] == ParameterStorageClass.none && is(Parameters!T[4] == glib.variant.Variant)))
&& (Parameters!T.length < 6 || (ParameterStorageClassTuple!T[5] == ParameterStorageClass.none && is(Parameters!T[5] : gio.dbus_object_manager_client.DBusObjectManagerClient)))
&& Parameters!T.length < 7)Connect to `InterfaceProxySignal` signal.Fluent builder implementation template for gio.dbus_object_manager_client.DBusObjectManagerClient
T busType(gio.types.BusType propval)Set `busType` property. Params: propval = If this property is not [gio.types.BusType.None], then #GDBusObjectManagerClient:connection must be null and will be set to the #GDBusConnection obtained b...T connection(gio.dbus_connection.DBusConnection propval)Set `connection` property. Params: propval = The #GDBusConnection to use. Returns: Builder instance for fluent chainingT flags(gio.types.DBusObjectManagerClientFlags propval)Set `flags` property. Params: propval = Flags from the #GDBusObjectManagerClientFlags enumeration. Returns: Builder instance for fluent chainingT getProxyTypeDestroyNotify(void * propval)Set `getProxyTypeDestroyNotify` property. Params: propval = A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data. Returns: Builder instance for fluent...T getProxyTypeFunc(void * propval)Set `getProxyTypeFunc` property. Params: propval = The #GDBusProxyTypeFunc to use when determining what #GType to use for interface proxies or null. Returns: Builder instance for fluent chainingT getProxyTypeUserData(void * propval)Set `getProxyTypeUserData` property. Params: propval = The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func. Returns: Builder instance for fluent chainingT name(string propval)Set `name` property. Params: propval = The well-known name or unique name that the manager is for. Returns: Builder instance for fluent chainingT objectPath(string propval)Set `objectPath` property. Params: propval = The object path the manager is for. Returns: Builder instance for fluent chainingFluent builder for gio.dbus_object_manager_client.DBusObjectManagerClient
DBusObjectManagerClient build()Create object from builder. Returns: New object