Top |
McpDispatchOperationMcpDispatchOperation — Dispatch operation object, implemented by Mission Control |
This object represents a Telepathy ChannelDispatchOperation object, as used by Approvers. A ChannelDispatchOperation represents a bundle of one or more Telepathy Channels being dispatched to user interfaces or other clients.
The virtual method mcd_dispatch_operation_policy_check()
receives an object
provided by Mission Control that implements this interface. It can be
used to inspect the channels, delay dispatching of the bundle until the
plugin is ready to continue, or close the channels in various ways.
Only Mission Control should implement this interface.
gboolean mcp_dispatch_operation_find_channel_by_type (McpDispatchOperation *self
,TpClientFactory *client_factory
,guint start_from
,TpEntityType entity_type
,GQuark channel_type
,guint *ret_index
,gchar **ret_dup_path
,GVariant **ret_ref_immutable_properties
,TpChannel **ret_ref_channel
);
Attempt to find a channel matching the given entity type and channel type in the bundle. This is an easy way to test whether the bundle contains any channels of interest to a particular plugin.
self |
a dispatch operation |
|
client_factory |
used to construct |
|
start_from |
index at which to start searching, usually 0 |
|
entity_type |
the entity type to match |
|
channel_type |
the channel type to match |
|
ret_index |
if not |
|
ret_dup_path |
if not |
|
ret_ref_immutable_properties |
if
not |
[out][transfer full][allow-none] |
ret_ref_channel |
if not |
TpConnection * mcp_dispatch_operation_ref_connection (McpDispatchOperation *self
,TpClientFactory *client_factory
);
Return a TpConnection object. It is not guaranteed to be prepared;
use tp_proxy_prepare_async()
.
self |
a dispatch operation |
|
client_factory |
the client factory to use to construct the TpConnection |
TpChannel * mcp_dispatch_operation_ref_nth_channel (McpDispatchOperation *self
,TpClientFactory *client_factory
,guint n
);
Return a TpChannel object. It is not guaranteed to be prepared;
use tp_proxy_prepare_async()
.
a reference to a TpChannel, which must be released with
g_object_unref()
by the caller, or NULL
if n
is too large
const gchar *
mcp_dispatch_operation_get_account_path
(McpDispatchOperation *self
);
const gchar *
mcp_dispatch_operation_get_connection_path
(McpDispatchOperation *self
);
const gchar *
mcp_dispatch_operation_get_protocol (McpDispatchOperation *self
);
const gchar *
mcp_dispatch_operation_get_cm_name (McpDispatchOperation *self
);
guint
mcp_dispatch_operation_get_n_channels (McpDispatchOperation *self
);
const gchar * mcp_dispatch_operation_get_nth_channel_path (McpDispatchOperation *self
,guint n
);
the D-Bus object path of the n
'th channel (starting from 0), or
NULL
if n
is greater than or equal to
mcp_dispatch_operation_get_n_channels()
.
The string is owned by self
and must not be freed; it is only valid as
long as a reference to self
is held.
GVariant * mcp_dispatch_operation_ref_nth_channel_properties (McpDispatchOperation *self
,guint n
);
Return the immutable properties of the n
'th channel (starting from 0), or
NULL
if n
is greater than or equal to
mcp_dispatch_operation_get_n_channels()
.
McpDispatchOperationDelay *
mcp_dispatch_operation_start_delay (McpDispatchOperation *self
);
Start to delay the dispatch operation, for instance while waiting for
an asynchronous operation to finish. The returned token must be passed to
mcp_dispatch_operation_end_delay()
exactly once, at which point dispatching
will continue and the token becomes invalid.
This is similar to an Observer delaying the return from ObserveChannel, except that there is no time limit - a dispatch operation policy plugin can delay the dispatch operation indefinitely.
void mcp_dispatch_operation_end_delay (McpDispatchOperation *self
,McpDispatchOperationDelay *delay
);
Stop delaying the dispatch operation, allowing dispatching to proceed.
self |
a dispatch operation |
|
delay |
a token obtained by calling |
void mcp_dispatch_operation_close_channels (McpDispatchOperation *self
,gboolean wait_for_observers
);
Close all channels in this bundle by using the Close D-Bus method.
Plugins that terminate an audio or audio/video call should
use tp_call_channel_hangup_async()
instead.
void mcp_dispatch_operation_destroy_channels (McpDispatchOperation *self
,gboolean wait_for_observers
);
Close all channels in this bundle destructively, by using the Destroy D-Bus method if implemented, or the Close D-Bus method if not.
Plugins that terminate an audio or audio/video call should
use tp_call_channel_hangup_async()
instead.