diff libpurple/protocols/jabber/buddy.c @ 26595:eea396f1583c

propagate from branch 'im.pidgin.pidgin' (head 5ab68ddb0251205f7ef97f4c280e65696cbd5ff2) to branch 'im.pidgin.cpw.malu.client_type' (head 95807e950212e81576cb829cfc6232e5d4159818)
author Marcus Lundblad <ml@update.uu.se>
date Tue, 07 Apr 2009 08:11:26 +0000
parents 00870e5f2e90 d30745b5b574
children 608493e51182
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Tue Apr 07 05:28:58 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Tue Apr 07 08:11:26 2009 +0000
@@ -2622,3 +2622,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) {
+		for (iter = jbr->caps->identities ; iter ; iter = g_list_next(iter)) {
+			const JabberCapsIdentity *identity = 
+				(JabberCapsIdentity *) iter->data;
+		
+			if (strcmp(identity->category, category) == 0) {
+				return identity->type;
+			}
+		}
+	}
+		
+	return NULL;
+}