[telepathy-gabble/master] GabblePresence: add gabble_presence_has_cap()

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


---
 src/presence.c |    9 +++++++++
 src/presence.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/presence.c b/src/presence.c
index 6bd24c3..053f85a 100644
--- a/src/presence.c
+++ b/src/presence.c
@@ -152,6 +152,15 @@ resource_better_than (Resource *a, Resource *b)
     return (a->priority > b->priority);
 }
 
+gboolean
+gabble_presence_has_cap (GabblePresence *presence,
+    const gchar *ns)
+{
+  g_return_val_if_fail (presence != NULL, FALSE);
+
+  return gabble_capability_set_has (presence->priv->cap_set, ns);
+}
+
 GabbleCapabilitySet *
 gabble_presence_get_caps (GabblePresence *presence)
 {
diff --git a/src/presence.h b/src/presence.h
index eb35d0c..9070f02 100644
--- a/src/presence.h
+++ b/src/presence.h
@@ -85,6 +85,7 @@ void gabble_presence_set_capabilities (GabblePresence *presence,
     GabblePresenceCapabilities caps,
     guint serial);
 
+gboolean gabble_presence_has_cap (GabblePresence *presence, const gchar *ns);
 GabbleCapabilitySet *gabble_presence_get_caps (GabblePresence *presence);
 
 const gchar *gabble_presence_pick_resource_by_caps (GabblePresence *presence,
-- 
1.5.6.5




More information about the telepathy-commits mailing list