summaryrefslogtreecommitdiff
path: root/telepathy-glib
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-25 16:10:28 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-26 10:31:07 +0100
commit747174e71576e91f756a3dc56dd5a4f5d59042c1 (patch)
tree7dedc444620797d27bdc441b1713af4e7146201a /telepathy-glib
parentbf0b1ee111621247fdd83025d02cf42ab67aba5e (diff)
downloadtelepathy-glib-747174e71576e91f756a3dc56dd5a4f5d59042c1.tar.gz
add tp_account_channel_request_set_initial_invitees
Diffstat (limited to 'telepathy-glib')
-rw-r--r--telepathy-glib/account-channel-request.c41
-rw-r--r--telepathy-glib/account-channel-request.h5
2 files changed, 46 insertions, 0 deletions
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index b8b127e23..8c3bb9584 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -2608,3 +2608,44 @@ tp_account_channel_request_set_initial_invitee_ids (
g_strdup (TP_PROP_CHANNEL_INTERFACE_CONFERENCE_INITIAL_INVITEE_IDS),
tp_g_value_slice_new_boxed (G_TYPE_STRV, ids));
}
+
+/**
+ * tp_account_channel_request_set_initial_invitees:
+ * @self: a #TpAccountChannelRequest
+ * @contacts: (element-type TelepathyGLib.Contact): a #GPtrArray of #TpContact
+ *
+ * Indicate that the contacts listed in @contacts have to be invited to the
+ * conference represented by the channel which is going to be requested
+ * using @self.
+ *
+ * This function can't be called once @self has been used to request a
+ * channel.
+ *
+ * Since: UNRELEASED
+ */
+void
+tp_account_channel_request_set_initial_invitees (
+ TpAccountChannelRequest *self,
+ GPtrArray *contacts)
+{
+ guint i;
+ GPtrArray *ids;
+
+ g_return_if_fail (contacts != NULL);
+
+ ids = g_ptr_array_new ();
+
+ for (i = 0; i < contacts->len; i++)
+ {
+ TpContact *contact = g_ptr_array_index (contacts, i);
+
+ g_ptr_array_add (ids, (gchar *) tp_contact_get_identifier (contact));
+ }
+
+ g_ptr_array_add (ids, NULL);
+
+ tp_account_channel_request_set_initial_invitee_ids (self,
+ (const gchar * const *) ids->pdata);
+
+ g_ptr_array_unref (ids);
+}
diff --git a/telepathy-glib/account-channel-request.h b/telepathy-glib/account-channel-request.h
index f414e888f..45eea63bc 100644
--- a/telepathy-glib/account-channel-request.h
+++ b/telepathy-glib/account-channel-request.h
@@ -188,6 +188,11 @@ void tp_account_channel_request_set_initial_invitee_ids (
TpAccountChannelRequest *self,
const gchar * const * ids);
+_TP_AVAILABLE_IN_0_24
+void tp_account_channel_request_set_initial_invitees (
+ TpAccountChannelRequest *self,
+ GPtrArray *contacts);
+
/* Channel target (shared between all channel types) */
_TP_AVAILABLE_IN_0_20