[Telepathy-commits] [telepathy-gabble/master] Hook conn-olpc the new presences-updated signal

Sjoerd Simons sjoerd at luon.net
Tue Aug 19 10:54:08 PDT 2008


20080721151058-93b9a-f7481c15e127ee4ded5966b83547caa1ce4a803f.gz
---
 src/conn-olpc.c |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 9c7bf3f..9bf771a 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -2533,7 +2533,7 @@ muc_factory_new_channel_cb (GabbleMucFactory *fac,
 }
 
 static void
-connection_presence_update_cb (GabblePresenceCache *cache,
+connection_presence_do_update (GabblePresenceCache *cache,
                                TpHandle handle,
                                GabbleConnection *conn)
 {
@@ -2575,6 +2575,22 @@ connection_presence_update_cb (GabblePresenceCache *cache,
     }
 }
 
+static void
+connection_presences_updated_cb (GabblePresenceCache *cache,
+                                 GArray *handles,
+                                 GabbleConnection *conn)
+{
+  guint i;
+
+  for (i = 0; i < handles->len ; i++)
+    {
+      TpHandle handle;
+
+      handle = g_array_index (handles, TpHandle, i);
+      connection_presence_do_update (cache, handle, conn);
+    }
+}
+
 void
 conn_olpc_activity_properties_init (GabbleConnection *conn)
 {
@@ -2609,8 +2625,8 @@ conn_olpc_activity_properties_init (GabbleConnection *conn)
   g_signal_connect (conn->muc_factory, "new-channel",
       G_CALLBACK (muc_factory_new_channel_cb), conn);
 
-  g_signal_connect (conn->presence_cache, "presence-update",
-      G_CALLBACK (connection_presence_update_cb), conn);
+  g_signal_connect (conn->presence_cache, "presences-updated",
+      G_CALLBACK (connection_presences_updated_cb), conn);
 }
 
 void
-- 
1.5.6.3




More information about the Telepathy-commits mailing list