ensure_and_handle_channel_async


Description:

public async Channel? ensure_and_handle_channel_async (Cancellable? cancellable, out HandleChannelsContext context) throws Error

Asynchronously calls EnsureChannel on the ChannelDispatcher to create a channel with the properties defined in TpAccountChannelRequest:request that you are going to handle yourself.

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

If the channel already exists and is already being handled, or if a newly created channel is sent to a different handler, this operation will fail with the error NOT_YOURS. The other handler will be notified that the channel was requested again (for instance with re_handled, BaseClientClassHandleChannelsImpl or callback), and can move its window to the foreground, if applicable.

(Behind the scenes, this works by creating a temporary BaseClient, then acting like ensure_channel_async with the temporary BaseClient as the preferred_handler.)

Parameters:

this

a AccountChannelRequest

cancellable

optional Cancellable object, null to ignore

callback

a callback to call when the request is satisfied

user_data

data to pass to callback




2022 vala-language.org