DBusConnection.for_address_sync


Description:

[ CCode ( has_construct_function = false ) ]
public DBusConnection.for_address_sync (string address, DBusConnectionFlags flags, DBusAuthObserver? observer = null, Cancellable? cancellable = null) throws Error

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 DBusConnection.sync if you need to act as the server. In particular, flags cannot contain the g_dbus_connection_flags_authentication_server, g_dbus_connection_flags_authentication_allow_anonymous or g_dbus_connection_flags_authentication_require_same_user flags.

This is a synchronous failable constructor. See new_for_address for the asynchronous version.

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

Parameters:

address

a D-Bus address

flags

flags describing how to make the connection

observer

a DBusAuthObserver or null

cancellable

a Cancellable or null

Returns:

a DBusConnection or null if throws is set. Free with unref.