libpurple/protocols/jabber/buddy.c

branch
cpw.malu.client_type
changeset 27287
d3ececcf09d1
parent 27110
05ca719b901b
parent 27286
f637c4c27815
child 27289
32591a46eb78
--- a/libpurple/protocols/jabber/buddy.c	Wed May 13 20:29:03 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Wed May 13 20:37:46 2009 +0000
@@ -2519,3 +2519,22 @@
 	return jabber_resource_has_capability(jbr, cap);
 }
 
+const gchar *
+jabber_resource_get_identity_category_type(const JabberBuddyResource *jbr,
+	const gchar *category)
+{
+	const GList *iter = NULL;
+	
+	if (jbr->caps.info) {
+		for (iter = jbr->caps.info->identities ; iter ; iter = g_list_next(iter)) {
+			const JabberIdentity *identity = 
+				(JabberIdentity *) iter->data;
+		
+			if (strcmp(identity->category, category) == 0) {
+				return identity->type;
+			}
+		}
+	}
+		
+	return NULL;
+}

mercurial