new_for_address


Description:

[ Version ( deprecated_since = "vala-0.36" , deprecated = true , replacement = "DBusConnection.for_address" ) ]
public static async DBusConnection new_for_address (string address, DBusConnectionFlags flags, DBusAuthObserver? observer = null, Cancellable? cancellable = null) throws Error

Warning: new_for_address is deprecated since "vala-0.36". Use GLib.DBusConnection.DBusConnection.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 @new if you need to act as the server. In particular, flags cannot contain the g_dbus_connection_flags_authentication_server or g_dbus_connection_flags_authentication_allow_anonymous flags.

When the operation is finished, callback will be invoked. You can then call @new.end 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 DBusConnection.for_address_sync for the synchronous version.

Parameters:

address

a D-Bus address

flags

flags describing how to make the connection

observer

a DBusAuthObserver or null

cancellable

a Cancellable or null

callback

a TaskReadyCallback to call when the request is satisfied

user_data

the data to pass to callback