summaryrefslogtreecommitdiff
path: root/src/capability-set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/capability-set.c')
-rw-r--r--src/capability-set.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/capability-set.c b/src/capability-set.c
index ffdb0f36..f8632691 100644
--- a/src/capability-set.c
+++ b/src/capability-set.c
@@ -38,6 +38,7 @@ struct _Feature
enum {
FEATURE_FIXED,
FEATURE_OPTIONAL,
+ FEATURE_OLPC
} feature_type;
gchar *ns;
};
@@ -69,6 +70,11 @@ static const Feature self_advertised_features[] =
{ FEATURE_OPTIONAL, NS_JINGLE_RTP_AUDIO },
{ FEATURE_OPTIONAL, NS_JINGLE_RTP_VIDEO },
+ { FEATURE_OLPC, NS_OLPC_BUDDY_PROPS "+notify" },
+ { FEATURE_OLPC, NS_OLPC_ACTIVITIES "+notify" },
+ { FEATURE_OLPC, NS_OLPC_CURRENT_ACTIVITY "+notify" },
+ { FEATURE_OLPC, NS_OLPC_ACTIVITY_PROPS "+notify" },
+
{ FEATURE_OPTIONAL, NS_GEOLOC "+notify" },
{ 0, NULL }
@@ -91,6 +97,7 @@ static GabbleCapabilitySet *any_jingle_av_caps = NULL;
static GabbleCapabilitySet *any_transport_caps = NULL;
static GabbleCapabilitySet *fixed_caps = NULL;
static GabbleCapabilitySet *geoloc_caps = NULL;
+static GabbleCapabilitySet *olpc_caps = NULL;
const GabbleCapabilitySet *
gabble_capabilities_get_legacy (void)
@@ -164,6 +171,12 @@ gabble_capabilities_get_geoloc_notify (void)
return geoloc_caps;
}
+const GabbleCapabilitySet *
+gabble_capabilities_get_olpc_notify (void)
+{
+ return olpc_caps;
+}
+
static gboolean
omits_content_creators (WockyNode *identity)
{
@@ -279,6 +292,14 @@ gabble_capabilities_init (gpointer conn)
geoloc_caps = gabble_capability_set_new ();
gabble_capability_set_add (geoloc_caps, NS_GEOLOC "+notify");
+
+ olpc_caps = gabble_capability_set_new ();
+
+ for (feat = self_advertised_features; feat->ns != NULL; feat++)
+ {
+ if (feat->feature_type == FEATURE_OLPC)
+ gabble_capability_set_add (olpc_caps, feat->ns);
+ }
}
g_assert (feature_handles != NULL);
@@ -305,6 +326,7 @@ gabble_capabilities_finalize (gpointer conn)
gabble_capability_set_free (any_transport_caps);
gabble_capability_set_free (fixed_caps);
gabble_capability_set_free (geoloc_caps);
+ gabble_capability_set_free (olpc_caps);
legacy_caps = NULL;
share_v1_caps = NULL;
@@ -318,6 +340,7 @@ gabble_capabilities_finalize (gpointer conn)
any_transport_caps = NULL;
fixed_caps = NULL;
geoloc_caps = NULL;
+ olpc_caps = NULL;
tp_clear_object (&feature_handles);
}