[Telepathy-commits] [telepathy-gabble/master] Location: Update code to the new spec

Alban Crequy alban.crequy at collabora.co.uk
Sun Feb 1 05:23:55 PST 2009


---
 src/conn-location.c |   14 ++++++++------
 src/connection.c    |    5 +++--
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/conn-location.c b/src/conn-location.c
index 6df4f24..71e835f 100644
--- a/src/conn-location.c
+++ b/src/conn-location.c
@@ -137,7 +137,8 @@ FAIL:
 END:
   if (ctx->pending_replies == 0)
     {
-      gabble_svc_location_return_from_request_locations (ctx->call, ctx->results);
+      gabble_svc_connection_interface_location_return_from_get_locations
+        (ctx->call, ctx->results);
       g_hash_table_destroy (ctx->results);
       g_slice_free (struct request_location_ctx, ctx);
     }
@@ -146,7 +147,7 @@ END:
 }
 
 static void
-location_request_locations (GabbleSvcLocation *iface,
+location_get_locations (GabbleSvcConnectionInterfaceLocation *iface,
                         const GArray *contacts,
                         DBusGMethodInvocation *context)
 {
@@ -182,7 +183,7 @@ location_request_locations (GabbleSvcLocation *iface,
 }
 
 static void
-location_set_location (GabbleSvcLocation *iface,
+location_set_location (GabbleSvcConnectionInterfaceLocation *iface,
                        GHashTable *location,
                        DBusGMethodInvocation *context)
 {
@@ -227,10 +228,11 @@ location_set_location (GabbleSvcLocation *iface,
 void
 location_iface_init (gpointer g_iface, gpointer iface_data)
 {
-  GabbleSvcLocationClass *klass = g_iface;
+  GabbleSvcConnectionInterfaceLocationClass *klass = g_iface;
 
-#define IMPLEMENT(x) gabble_svc_location_implement_##x (klass, location_##x)
-  IMPLEMENT(request_locations);
+#define IMPLEMENT(x) gabble_svc_connection_interface_location_implement_##x \
+  (klass, location_##x)
+  IMPLEMENT(get_locations);
   IMPLEMENT(set_location);
 #undef IMPLEMENT
 }
diff --git a/src/connection.c b/src/connection.c
index f6ae00e..476263d 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -102,7 +102,7 @@ G_DEFINE_TYPE_WITH_CODE(GabbleConnection,
       tp_presence_mixin_simple_presence_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
       conn_presence_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_SVC_LOCATION,
+    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_SVC_CONNECTION_INTERFACE_LOCATION,
       location_iface_init);
     G_IMPLEMENT_INTERFACE (GABBLE_TYPE_SVC_OLPC_BUDDY_INFO,
       olpc_buddy_info_iface_init);
@@ -2031,7 +2031,8 @@ connection_disco_cb (GabbleDisco *disco,
   if (conn->features & GABBLE_CONNECTION_FEATURES_PEP)
     {
       const gchar *ifaces[] = { GABBLE_IFACE_OLPC_BUDDY_INFO,
-          GABBLE_IFACE_OLPC_ACTIVITY_PROPERTIES, GABBLE_IFACE_LOCATION, NULL };
+          GABBLE_IFACE_OLPC_ACTIVITY_PROPERTIES,
+          GABBLE_IFACE_CONNECTION_INTERFACE_LOCATION, NULL };
 
       tp_base_connection_add_interfaces ((TpBaseConnection *) conn, ifaces);
     }
-- 
1.5.6.5




More information about the Telepathy-commits mailing list