DBusServer.sync


Description:

[ CCode ( has_construct_function = false ) ]
public DBusServer.sync (string address, DBusServerFlags flags, string guid, DBusAuthObserver? observer = null, Cancellable? cancellable = null) throws Error

Creates a new D-Bus server that listens on the first address in address that works.

Once constructed, you can use get_client_address to get a D-Bus address string that clients can use to connect.

To have control over the available authentication mechanisms and the users that are authorized to connect, it is strongly recommended to provide a non-null DBusAuthObserver.

Connect to the new_connection signal to handle incoming connections.

The returned DBusServer isn't active - you have to start it with start.

DBusServer is used in this example.

This is a synchronous failable constructor. There is currently no asynchronous version.

Parameters:

address

A D-Bus address.

flags

Flags from the DBusServerFlags enumeration.

guid

A D-Bus GUID.

observer

A DBusAuthObserver or null.

cancellable

A Cancellable or null.

Returns:

A DBusServer or null if throws is set. Free with unref.




2022 vala-language.org