diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-25 15:45:33 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-26 10:31:07 +0100 |
commit | aa643f1836a732d0b849d465b7777ac3265ef9a4 (patch) | |
tree | 5abcd140118d79241b2601431fe1aa2333185355 /telepathy-glib/account-channel-request.c | |
parent | 5ecb253be2a30f7bbde601aeed65f75acb7476ae (diff) | |
download | telepathy-glib-aa643f1836a732d0b849d465b7777ac3265ef9a4.tar.gz |
add tp_account_channel_request_set_conference_initial_channels()
Diffstat (limited to 'telepathy-glib/account-channel-request.c')
-rw-r--r-- | telepathy-glib/account-channel-request.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c index da71b8741..656cbd100 100644 --- a/telepathy-glib/account-channel-request.c +++ b/telepathy-glib/account-channel-request.c @@ -2546,3 +2546,38 @@ tp_account_channel_request_set_sms_channel (TpAccountChannelRequest *self, g_strdup (TP_PROP_CHANNEL_INTERFACE_SMS_SMS_CHANNEL), tp_g_value_slice_new_boolean (is_sms_channel)); } + +/** + * tp_account_channel_request_set_conference_initial_channels: + * @self: a #TpAccountChannelRequest + * @channels: a #NULL-terminated array of channel paths + * + * Indicate that the channel which is going to be requested using @self + * is an upgrade of the channels whose object paths is listed in @channels. + * + * This function can't be called once @self has been used to request a + * channel. + * + * Since: UNRELEASED + */ +void +tp_account_channel_request_set_conference_initial_channels ( + TpAccountChannelRequest *self, + const gchar * const * channels) +{ + GPtrArray *chans; + guint i; + + g_return_if_fail (TP_IS_ACCOUNT_CHANNEL_REQUEST (self)); + g_return_if_fail (!self->priv->requested); + + chans = g_ptr_array_new (); + for (i = 0; channels != NULL && channels[i] != NULL; i++) + g_ptr_array_add (chans, (gpointer) channels[i]); + + g_hash_table_insert (self->priv->request, + g_strdup (TP_PROP_CHANNEL_INTERFACE_CONFERENCE_INITIAL_CHANNELS), + tp_g_value_slice_new_boxed (TP_ARRAY_TYPE_OBJECT_PATH_LIST, chans)); + + g_ptr_array_unref (chans); +} |