diff libpurple/protocols/jabber/buddy.c @ 25836:1d3274111180

Set a value "type" in the ui_info hash table Set client type in resonse to an XMPP XEP-0115 request (client type). Makes Pidgin report itself as "pc", Finch as "console" Display emblems on XMPP buddies corresponding to their client type (if available). Currently there is no emblem for "console"
author Marcus Lundblad <ml@update.uu.se>
date Mon, 09 Feb 2009 21:21:18 +0000
parents d7dcdba13b88
children ae2b4394fbe2
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Sun Feb 08 10:34:31 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Mon Feb 09 21:21:18 2009 +0000
@@ -2526,3 +2526,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;
+}