cpw.qulogic.msn: d7e83c50: Add support for emblems in MSN protocol....

qulogic at pidgin.im qulogic at pidgin.im
Sun Jun 15 04:26:13 EDT 2008


-----------------------------------------------------------------
Revision: d7e83c50d97d35178be4000d030af5eda816301a
Ancestor: b50561476118e3f815612952d2eb768a945bf0e2
Author: qulogic at pidgin.im
Date: 2008-06-15T08:19:46
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/d7e83c50d97d35178be4000d030af5eda816301a

Modified files:
        libpurple/protocols/msn/msn.c

ChangeLog: 

Add support for emblems in MSN protocol. Emblems include bots, mobile 
users (not sure how this is different from current mobile 
designation yet), web clients, and Yahoo buddies.

References #3385.


-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	6f867b546f5a27b833af0dc6c2f2e323271f0157
+++ libpurple/protocols/msn/msn.c	a1af9c94dee88b102448ad17fec112a95f51c47f
@@ -591,6 +591,30 @@ msn_list_icon(PurpleAccount *a, PurpleBu
 	return "msn";
 }
 
+static const char *
+msn_list_emblems(PurpleBuddy *b)
+{
+	MsnUser *user = b->proto_data;
+
+	if (user != NULL) {
+		if (user->clientid & MSN_CLIENT_CAP_BOT)
+			return "bot";
+		if (user->clientid & MSN_CLIENT_CAP_WIN_MOBILE)
+			return "hiptop"; /* XXX: Rename to Mobile / Use different icon? */
+#if 0
+		/* XXX: Since we don't support this, there's no point in showing it just yet */
+		if (user->clientid & MSN_CLIENT_CAP_SCHANNEL)
+			return "secure";
+#endif
+		if (user->clientid & MSN_CLIENT_CAP_WEBMSGR)
+			return "web";
+		if (user->networkid == MSN_NETWORK_YAHOO)
+			return "yahoo";
+	}
+
+	return NULL;
+}
+
 /*
  * Set the User status text
  */
@@ -2419,7 +2443,7 @@ static PurplePluginProtocolInfo prpl_inf
 	NULL,					/* protocol_options */
 	{"png", 0, 0, 96, 96, 0, PURPLE_ICON_SCALE_SEND},	/* icon_spec */
 	msn_list_icon,			/* list_icon */
-	NULL,				/* list_emblems */
+	msn_list_emblems,		/* list_emblems */
 	msn_status_text,		/* status_text */
 	msn_tooltip_text,		/* tooltip_text */
 	msn_status_types,		/* away_states */


More information about the Commits mailing list