@new
Description:
[ Version ( deprecated_since = "vala-0.36" , replacement = "DBusConnection" ) ]
public static async DBusConnection @new (IOStream stream, string? guid, DBusConnectionFlags flags, DBusAuthObserver? observer = null, Cancellable? cancellable = null) throws Error
Warning: @new is deprecated since vala-0.36. Use DBusConnection.
Asynchronously sets up a D-Bus connection for exchanging D-Bus messages with the end represented by stream
.
If stream
is a SocketConnection, then the corresponding
Socket will be put into non-blocking mode.
The D-Bus connection will interact with stream
from a worker thread. As a result, the caller should not interact with stream
after this method has been called, except by calling unref on it.
If observer
is not null it may be used to control the authentication process.
When the operation is finished, callback
will be invoked. You can then call @new.end to get the
result of the operation.
This is an asynchronous failable constructor. See DBusConnection.sync for the synchronous version.
Parameters:
stream |
a IOStream |
guid |
the GUID to use if authenticating as a server or null |
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 |