connect


Description:

[ Version ( since = "3.8" ) ]
public static async Client? connect (Source source, ClientSourceType source_type, uint32 wait_for_connected_seconds, Cancellable? cancellable) throws Error

Asynchronously creates a new Client for source and source_type.

The wait_for_connected_seconds argument had been added since 3.16, to let the caller decide how long to wait for the backend to fully connect to its (possibly remote) data store. This is required due to a change in the authentication process, which is fully asynchronous and done on the client side, while not every client is supposed to response to authentication requests. In case the backend will not connect within the set interval, then it is opened in an offline mode. A special value -1 can be used to not wait for the connected state at all.

Unlike with Client, there is no need to call open after obtaining the Client.

When the operation is finished, callback will be called. You can then call connect.end to get the result of the operation.

Parameters:

source

an Source

source_type

source tpe of the calendar

wait_for_connected_seconds

timeout, in seconds, to wait for the backend to be fully connected

cancellable

optional Cancellable object, or null

callback

a TaskReadyCallback to call when the request is satisfied

user_data

data to pass to the callback function




2022 vala-language.org