[next] telepathy-glib: TpChannel: use tp_client_factory_upgrade_contacts_async()

Xavier Claessens xclaesse at kemper.freedesktop.org
Fri May 18 09:03:48 PDT 2012


Module: telepathy-glib
Branch: next
Commit: b09102cba2b07d76bbe9026bbab316e8978a6dae
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=b09102cba2b07d76bbe9026bbab316e8978a6dae

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Fri May 18 18:02:42 2012 +0200

TpChannel: use tp_client_factory_upgrade_contacts_async()

---

 telepathy-glib/channel.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 4ff2e67..ee6ded9 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -757,11 +757,12 @@ upgrade_contacts_cb (GObject *object,
     GAsyncResult *result,
     gpointer user_data)
 {
+  TpClientFactory *factory = (TpClientFactory *) object;
   TpChannel *self = user_data;
-  TpConnection *connection = (TpConnection *) object;
   GError *error = NULL;
 
-  if (!tp_connection_upgrade_contacts_finish (connection, result, NULL, &error))
+  if (!tp_client_factory_upgrade_contacts_finish (factory, result, NULL,
+          &error))
     {
       _tp_channel_abort_introspection (self, "Upgrading contacts failed",
           error);
@@ -830,18 +831,11 @@ _tp_channel_create_contacts (TpChannel *self)
   /* Prepare initiator and target contacts */
   if (contacts->len > 0)
     {
-      GArray *features;
-
-      features = tp_client_factory_dup_contact_features (
+      tp_client_factory_upgrade_contacts_async (
           tp_proxy_get_factory (self->priv->connection),
-          self->priv->connection);
-
-      tp_connection_upgrade_contacts_async (self->priv->connection,
+          self->priv->connection,
           contacts->len, (TpContact **) contacts->pdata,
-          (GQuark *) features->data,
           upgrade_contacts_cb, g_object_ref (self));
-
-      g_array_unref (features);
     }
   else
     {



More information about the telepathy-commits mailing list