Gio.DBusConnection.new_for_address

function new_for_address(address: String, flags: Gio.DBusConnectionFlags, observer: Gio.DBusAuthObserver, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for g_dbus_connection_new_for_address()
}
  

Asynchronously connects and sets up a D-Bus client connection for exchanging D-Bus messages with an endpoint specified by address which must be in the D-Bus address format.

This constructor can only be used to initiate client-side connections - use Gio.DBusConnection.new if you need to act as the server. In particular, flags cannot contain the Gio.DBusConnectionFlags.authentication_server or Gio.DBusConnectionFlags.authentication_allow_anonymous flags.

When the operation is finished, callback will be invoked. You can then call Gio.DBusConnection.new_finish to get the result of the operation.

If observer is not null it may be used to control the authentication process.

This is a asynchronous failable constructor. See Gio.DBusConnection.new_for_address_sync for the synchronous version.

Since 2.26

address

a D-Bus address

flags

flags describing how to make the connection

observer

a Gio.DBusAuthObserver or null

cancellable

a Gio.Cancellable or null

callback

a Gio.AsyncReadyCallback to call when the request is satisfied