[telepathy-gabble/master] gabble_presence_get_caps: rename to gabble_presence_dup_caps

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Sep 8 04:10:09 PDT 2009


That's what it does, really.
---
 src/caps-hash.c      |    2 +-
 src/connection.c     |    8 ++++----
 src/presence-cache.c |   12 ++++++------
 src/presence.c       |    2 +-
 src/presence.h       |    2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/caps-hash.c b/src/caps-hash.c
index 2eeb15d..d771345 100644
--- a/src/caps-hash.c
+++ b/src/caps-hash.c
@@ -377,7 +377,7 @@ caps_hash_compute_from_self_presence (GabbleConnection *self)
   /* Gabble does not use dataforms, let 'dataforms' be empty */
 
   /* FIXME: somehow allow iteration over this without copying twice */
-  cap_set = gabble_presence_get_caps (presence);
+  cap_set = gabble_presence_dup_caps (presence);
   gabble_capability_set_foreach (cap_set, ptr_array_strdup, features);
   gabble_capability_set_free (cap_set);
 
diff --git a/src/connection.c b/src/connection.c
index 685272d..36cd454 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1712,7 +1712,7 @@ connection_iq_disco_cb (LmMessageHandler *handler,
    * 1.5. */
   /* FIXME: We shouldn't have to copy the sets here */
   if (node == NULL || !tp_strdiff (suffix, caps_hash))
-    features = gabble_presence_get_caps (self->self_presence);
+    features = gabble_presence_dup_caps (self->self_presence);
   else if (!tp_strdiff (suffix, BUNDLE_VOICE_V1))
     features = gabble_capability_set_copy (
         gabble_capabilities_get_bundle_voice_v1 ());
@@ -2357,7 +2357,7 @@ gabble_connection_get_handle_contact_capabilities (GabbleConnection *self,
   else
     p = gabble_presence_cache_get (self->presence_cache, handle);
 
-  caps = gabble_presence_get_caps (p);
+  caps = gabble_presence_dup_caps (p);
 
   tp_base_connection_channel_manager_iter_init (&iter, base_conn);
 
@@ -2494,7 +2494,7 @@ gabble_connection_advertise_capabilities (TpSvcConnectionInterfaceCapabilities *
     }
 
   save_caps = caps = pres->caps;
-  save_set = gabble_presence_get_caps (pres);
+  save_set = gabble_presence_dup_caps (pres);
 
   caps |= add_caps;
   caps ^= (caps & remove_caps);
@@ -2586,7 +2586,7 @@ gabble_connection_set_self_capabilities (
 
   TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
 
-  old_caps = gabble_presence_get_caps (pres);
+  old_caps = gabble_presence_dup_caps (pres);
   new_caps = gabble_capability_set_new ();
 
   for (i = 0; i < caps->len; i++)
diff --git a/src/presence-cache.c b/src/presence-cache.c
index f413597..265124c 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -867,7 +867,7 @@ set_caps_for (DiscoWaiter *waiter,
     return;
 
   save_caps = presence->caps;
-  old_cap_set = gabble_presence_get_caps (presence);
+  old_cap_set = gabble_presence_dup_caps (presence);
 
   DEBUG ("setting caps for %d (thanks to %d %s) to %d (save_caps %d)",
       waiter->handle, responder_handle, responder_jid, caps, save_caps);
@@ -877,7 +877,7 @@ set_caps_for (DiscoWaiter *waiter,
 
   DEBUG ("caps for %d now %d", waiter->handle, presence->caps);
 
-  new_cap_set = gabble_presence_get_caps (presence);
+  new_cap_set = gabble_presence_dup_caps (presence);
 
   emit_capabilities_update (cache, waiter->handle, save_caps, presence->caps,
       old_cap_set, new_cap_set);
@@ -1174,7 +1174,7 @@ _process_caps (GabblePresenceCache *cache,
   if (presence)
     {
       old_caps = presence->caps;
-      old_cap_set = gabble_presence_get_caps (presence);
+      old_cap_set = gabble_presence_dup_caps (presence);
     }
 
   for (i = uris; NULL != i; i = i->next)
@@ -1187,7 +1187,7 @@ _process_caps (GabblePresenceCache *cache,
 
   if (presence)
     {
-      GabbleCapabilitySet *new_cap_set = gabble_presence_get_caps (presence);
+      GabbleCapabilitySet *new_cap_set = gabble_presence_dup_caps (presence);
 
       DEBUG ("Emitting caps update: handle %u, old %u, new %u",
           handle, old_caps, presence->caps);
@@ -1486,12 +1486,12 @@ gabble_presence_cache_do_update (
     presence = _cache_insert (cache, handle);
 
   caps_before = presence->caps;
-  old_cap_set = gabble_presence_get_caps (presence);
+  old_cap_set = gabble_presence_dup_caps (presence);
 
   ret = gabble_presence_update (presence, resource, presence_id,
       status_message, priority);
 
-  new_cap_set = gabble_presence_get_caps (presence);
+  new_cap_set = gabble_presence_dup_caps (presence);
 
   emit_capabilities_update (cache, handle, caps_before, presence->caps,
       old_cap_set, new_cap_set);
diff --git a/src/presence.c b/src/presence.c
index 5c1c5c9..b69c228 100644
--- a/src/presence.c
+++ b/src/presence.c
@@ -162,7 +162,7 @@ gabble_presence_has_cap (GabblePresence *presence,
 }
 
 GabbleCapabilitySet *
-gabble_presence_get_caps (GabblePresence *presence)
+gabble_presence_dup_caps (GabblePresence *presence)
 {
   GabbleCapabilitySet *ret, *tmp;
 
diff --git a/src/presence.h b/src/presence.h
index 22b160f..ca2bc77 100644
--- a/src/presence.h
+++ b/src/presence.h
@@ -86,7 +86,7 @@ void gabble_presence_set_capabilities (GabblePresence *presence,
     guint serial);
 
 gboolean gabble_presence_has_cap (GabblePresence *presence, const gchar *ns);
-GabbleCapabilitySet *gabble_presence_get_caps (GabblePresence *presence);
+GabbleCapabilitySet *gabble_presence_dup_caps (GabblePresence *presence);
 
 const gchar *gabble_presence_pick_resource_by_caps (GabblePresence *presence,
     GabbleCapabilitySetPredicate predicate, gpointer user_data);
-- 
1.5.6.5




More information about the telepathy-commits mailing list