DBusConnection.sync


Description:

[ CCode ( has_construct_function = false ) ]
public DBusConnection.sync (IOStream stream, string? guid, DBusConnectionFlags flags, DBusAuthObserver? observer = null, Cancellable? cancellable = null) throws Error

Synchronously 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.

This is a synchronous failable constructor. See @new for the asynchronous 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

Returns:

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