summaryrefslogtreecommitdiff
path: root/telepathy-glib/account-channel-request.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-06-24 14:00:21 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-07-08 08:49:21 +0200
commit32ff32749f913893c4708d0e1ea1805ee7565479 (patch)
tree983720d01e058a1e16223d210a58a20319bf4af1 /telepathy-glib/account-channel-request.c
parent96023b36b2f1872cecef1d7660b502837e9e4338 (diff)
downloadtelepathy-glib-32ff32749f913893c4708d0e1ea1805ee7565479.tar.gz
add tp_account_channel_request_set_delegate_to_preferred_handler()
Diffstat (limited to 'telepathy-glib/account-channel-request.c')
-rw-r--r--telepathy-glib/account-channel-request.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index e0a60e1dd..00335255c 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -1573,3 +1573,32 @@ tp_account_channel_request_set_hints (TpAccountChannelRequest *self,
tp_clear_pointer (&self->priv->hints, g_hash_table_unref);
self->priv->hints = g_hash_table_ref (hints);
}
+
+/**
+ * tp_account_channel_request_set_delegate_to_preferred_handler:
+ * @self: a #TpAccountChannelRequest
+ * @delegate: %TRUE to request to delegate channels
+ *
+ * If @delegate is %TRUE, asks to the client currently handling the channels to
+ * delegate them to the preferred handler (passed when calling
+ * tp_account_channel_request_ensure_channel_async() for example).
+ *
+ * This function can't be called once @self has been used to request a
+ * channel.
+ *
+ * Since: 0.15.UNRELEASED
+ */
+void
+tp_account_channel_request_set_delegate_to_preferred_handler (
+ TpAccountChannelRequest *self,
+ gboolean delegate)
+{
+ g_return_if_fail (!self->priv->requested);
+
+ if (self->priv->hints == NULL)
+ self->priv->hints = tp_asv_new (NULL, NULL);
+
+ tp_asv_set_boolean (self->priv->hints,
+ "org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler",
+ delegate);
+}