Gio.DBusConnection.new_for_address_sync
function new_for_address_sync(address: String, flags: Gio.DBusConnectionFlags, observer: Gio.DBusAuthObserver, cancellable: Gio.Cancellable): Gio.DBusConnection { // Gjs wrapper for g_dbus_connection_new_for_address_sync() }
Synchronously 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_sync 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.
This is a synchronous failable constructor. See Gio.DBusConnection.new_for_address for the asynchronous version.
If observer is not null it may be used to control the authentication process.
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
- Returns
a Gio.DBusConnection or null if @error is set. Free with GObject.Object.prototype.unref.