Gio.DBusProxy.new
function new(connection: Gio.DBusConnection, flags: Gio.DBusProxyFlags, info: Gio.DBusInterfaceInfo, name: String, object_path: String, interface_name: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void { // Gjs wrapper for g_dbus_proxy_new() }
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.DBusProxyFlags.do_not_load_properties flag is used. Connect to the Gio.DBusProxy::g-properties-changed signal to get notified about property changes.
If the Gio.DBusProxyFlags.do_not_connect_signals flag is not set, also sets up match rules for signals. Connect to the Gio.DBusProxy::g-signal signal to handle signals from the remote object.
If name is a well-known name and the Gio.DBusProxyFlags.do_not_auto_start and Gio.DBusProxyFlags.do_not_auto_start_at_construction flags aren't set and no name owner currently exists, the message bus will be requested to launch a name owner for the name.
This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use Gio.DBusProxy.new_finish to get the result.
See Gio.DBusProxy.new_sync and for a synchronous version of this constructor.
Gio.DBusProxy is used in this [example][gdbus-wellknown-proxy].
Since 2.26
- connection
- flags
Flags used when constructing the proxy.
- info
A Gio.DBusInterfaceInfo specifying the minimal interface that @proxy conforms to or null.
- name
A bus name (well-known or unique) or null if connection is not a message bus connection.
- object_path
An object path.
- interface_name
A D-Bus interface name.
- cancellable
A Gio.Cancellable or null.
- callback
Callback function to invoke when the proxy is ready.