Asynchronously invokes the method_name method on proxy.
Finishes an operation started with gio.dbus_proxy.DBusProxy.call.
Synchronously invokes the method_name method on proxy.
Like gio.dbus_proxy.DBusProxy.call but also takes a #GUnixFDList object.
Finishes an operation started with gio.dbus_proxy.DBusProxy.callWithUnixFdList.
Like gio.dbus_proxy.DBusProxy.callSync but also takes and returns #GUnixFDList objects.
Connect to GPropertiesChanged signal.
Connect to GSignal signal.
Looks up the value for a property from the cache. This call does no blocking IO.
Gets the names of all cached properties on proxy.
Gets the connection proxy is for.
Gets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the gio.dbus_proxy.DBusProxy.call and gio.dbus_proxy.DBusProxy.callSync functions.
Gets the flags that proxy was constructed with.
Returns the #GDBusInterfaceInfo, if any, specifying the interface that proxy conforms to. See the #GDBusProxy:g-interface-info property for more details.
Gets the D-Bus interface name proxy is for.
Gets the name that proxy was constructed for.
The unique name that owns the name that proxy is for or null if no-one currently owns that name. You may connect to the #GObject::notify signal to track changes to the #GDBusProxy:g-name-owner property.
Gets the object path proxy is for.
If value is not null, sets the cached value for the property with name property_name to the value in value.
Sets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the gio.dbus_proxy.DBusProxy.call and gio.dbus_proxy.DBusProxy.callSync functions.
Ensure that interactions with proxy conform to the given interface. See the #GDBusProxy:g-interface-info property for more details.
Finishes creating a #GDBusProxy.
Like gio.dbus_proxy.DBusProxy.new_ but takes a #GBusType instead of a #GDBusConnection.
Finishes creating a #GDBusProxy.
Like gio.dbus_proxy.DBusProxy.newSync but takes a #GBusType instead of a #GDBusConnection.
Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and synchronously loads D-Bus properties unless the gio.types.DBusProxyFlags.DoNotLoadProperties flag is used.
Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and asynchronously loads D-Bus properties unless the gio.types.DBusProxyFlags.DoNotLoadProperties flag is used. Connect to the #GDBusProxy::g-properties-changed signal to get notified about property changes.
Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements #GInitable you can optionally call gio.initable.Initable.init_ instead.
Finishes asynchronous initialization and returns the result. See gio.async_initable.AsyncInitable.initAsync.
Finishes the async construction for the various g_async_initable_new calls, returning the created object or null on error.
Gets the #GDBusObject that interface_ belongs to, if any.
Gets D-Bus introspection information for the D-Bus interface implemented by interface_.
Sets the #GDBusObject for interface_ to object.
Initializes the object implementing the interface.
Set the GObject of a D ObjectG wrapper.
Get a pointer to the underlying C object.
Calls g_object_ref() on a GObject.
Calls g_object_unref() on a GObject.
Get the GType of an object.
GObject GType property.
Convenience method to return this cast to a type. For use in D with statements.
Template to get the D object from a C GObject and cast it to the given D object type.
Connect a D closure to an object signal.
Template for setting a GObject property.
Template for getting a GObject property.
Creates a binding between source_property on source and target_property on target.
Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.
This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectG.refSink.
Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.
Gets a named field from the objects table of associations (see gobject.object.ObjectG.setData).
Gets a property of an object.
This function gets back user data pointers stored via gobject.object.ObjectG.setQdata.
Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.
Checks whether object has a floating[floating-ref] reference.
Emits a "notify" signal for the property property_name on object.
Emits a "notify" signal for the property specified by pspec on object.
Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.
Releases all references to other objects. This can be used to break reference cycles.
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
Sets a property on an object.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
This function gets back user data pointers stored via gobject.object.ObjectG.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:
Reverts the effect of a previous call to gobject.object.ObjectG.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.
This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectG.ref_ and gobject.object.ObjectG.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.
Connect to Notify signal.
Helper function for constructing #GAsyncInitable object. This is similar to gobject.object.ObjectG.newv but also initializes the object asynchronously.
Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements #GInitable you can optionally call gio.initable.Initable.init_ instead.
Finishes asynchronous initialization and returns the result. See gio.async_initable.AsyncInitable.initAsync.
Finishes the async construction for the various g_async_initable_new calls, returning the created object or null on error.
Gets the #GDBusObject that interface_ belongs to, if any.
Gets D-Bus introspection information for the D-Bus interface implemented by interface_.
Sets the #GDBusObject for interface_ to object.
Initializes the object implementing the interface.
gio.dbus_proxy.DBusProxy is a base class used for proxies to access a D-Bus interface on a remote object. A gio.dbus_proxy.DBusProxy can be constructed for both well-known and unique names.
By default, gio.dbus_proxy.DBusProxy will cache all properties (and listen to changes) of the remote object, and proxy all signals that get emitted. This behaviour can be changed by passing suitable gio.types.DBusProxyFlags when the proxy is created. If the proxy is for a well-known name, the property cache is flushed when the name owner vanishes and reloaded when a name owner appears.
The unique name owner of the proxy’s name is tracked and can be read from property@Gio.DBusProxy:g-name-owner. Connect to the gobject.object.ObjectG.notify signal to get notified of changes. Additionally, only signals and property changes emitted from the current name owner are considered and calls are always sent to the current name owner. This avoids a number of race conditions when the name is lost by one owner and claimed by another. However, if no name owner currently exists, then calls will be sent to the well-known name which may result in the message bus launching an owner (unless gio.types.DBusProxyFlags.DoNotAutoStart is set).
If the proxy is for a stateless D-Bus service, where the name owner may be started and stopped between calls, the property@Gio.DBusProxy:g-name-owner tracking of gio.dbus_proxy.DBusProxy will cause the proxy to drop signal and property changes from the service after it has restarted for the first time. When interacting with a stateless D-Bus service, do not use gio.dbus_proxy.DBusProxy — use direct D-Bus method calls and signal connections.
The generic signal@Gio.DBusProxy::g-properties-changed and signal@Gio.DBusProxy::g-signal signals are not very convenient to work with. Therefore, the recommended way of working with proxies is to subclass gio.dbus_proxy.DBusProxy, and have more natural properties and signals in your derived class. This example shows how this can easily be done using the `gdbus-codegen` tool.
A gio.dbus_proxy.DBusProxy instance can be used from multiple threads but note that all signals (e.g. signal@Gio.DBusProxy::g-signal, signal@Gio.DBusProxy::g-properties-changed and gobject.object.ObjectG.notify) are emitted in the thread-default main context (see glib.main_context.MainContext.pushThreadDefault) of the thread where the instance was constructed.
An example using a proxy for a well-known name can be found in `gdbus-example-watch-proxy.c`.