ensure_and_observe_channel_async


Description:

[ Version ( since = "0.13.14" ) ]
public async Channel ensure_and_observe_channel_async (string preferred_handler, Cancellable? cancellable) throws Error

Asynchronously calls EnsureChannel on the ChannelDispatcher to create a channel with the properties defined in TpAccountChannelRequest:request and let the ChannelDispatcher dispatch it to an handler.

callback will be called when the channel has been created and dispatched, or the request has failed. You can then call create_channel_async.end to get the result of the operation and a Channel representing the channel which has been created. Note that you are not handling this channel and so should interact with the channel as an Observer. See the Telepathy book for details about how clients should interact with channels.

If a suitable channel already existed, its handler will be notified that the channel was requested again (for instance with re_handled, BaseClientClassHandleChannelsImpl or callback, if it is implemented using Telepathy-GLib), so that it can re-present the window to the user, for example. Otherwise, a new channel will be created and dispatched to a handler.

Parameters:

this

a AccountChannelRequest

preferred_handler

Either the well-known bus name (starting with CLIENT_BUS_NAME_BASE) of the preferred handler for the channel, or null to indicate that any handler would be acceptable.

cancellable

optional Cancellable object, null to ignore

callback

a callback to call when the request is satisfied

user_data

data to pass to callback