diff options
author | Marcus Lundblad <malu@pidgin.im> | 2010-03-04 22:14:03 +0000 |
---|---|---|
committer | Marcus Lundblad <malu@pidgin.im> | 2010-03-04 22:14:03 +0000 |
commit | b5e9d4d75917802c9fc74d047744ced4feb3ae58 (patch) | |
tree | d4f3a7257eeed39e4c59072cc6cbd9aa982b475e | |
parent | 92188fdab43f24acad29f2ff314b92a5e5528cb5 (diff) | |
download | pidgin-b5e9d4d75917802c9fc74d047744ced4feb3ae58.tar.gz |
Added PurpleConnection flags to determine support for moods and mood messages.
Mood messages is yet to be implemented in the UI (and replacing the current
account-specific mood setting for XMPP).
-rw-r--r-- | libpurple/connection.h | 5 | ||||
-rw-r--r-- | libpurple/protocols/jabber/disco.c | 6 | ||||
-rw-r--r-- | libpurple/protocols/oscar/oscar.c | 1 | ||||
-rw-r--r-- | pidgin/gtkblist.c | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/libpurple/connection.h b/libpurple/connection.h index 8fa4be17a8..1eb7c15173 100644 --- a/libpurple/connection.h +++ b/libpurple/connection.h @@ -44,8 +44,9 @@ typedef enum PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ - PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100 /**< Connection supports sending and receiving custom smileys */ - + PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */ + PURPLE_CONNECTION_SUPPORT_MOODS = 0x0200, /**< Connection supports setting moods */ + PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES = 0x0400 /**< Connection supports setting a message on moods */ } PurpleConnectionFlags; typedef enum diff --git a/libpurple/protocols/jabber/disco.c b/libpurple/protocols/jabber/disco.c index d52deda687..8a3ae80bcb 100644 --- a/libpurple/protocols/jabber/disco.c +++ b/libpurple/protocols/jabber/disco.c @@ -517,8 +517,12 @@ jabber_disco_server_info_result_cb(JabberStream *js, const char *from, const char *category, *type, *name; category = xmlnode_get_attrib(child, "category"); type = xmlnode_get_attrib(child, "type"); - if(category && type && !strcmp(category, "pubsub") && !strcmp(type,"pep")) + if(category && type && !strcmp(category, "pubsub") && !strcmp(type,"pep")) { + PurpleConnection *gc = js->gc; js->pep = TRUE; + gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS | + PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES; + } if (!category || strcmp(category, "server")) continue; if (!type || strcmp(type, "im")) diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c index 7174b6c6b4..63f6f7fdad 100644 --- a/libpurple/protocols/oscar/oscar.c +++ b/libpurple/protocols/oscar/oscar.c @@ -1573,6 +1573,7 @@ oscar_login(PurpleAccount *account) if (oscar_util_valid_name_icq((purple_account_get_username(account)))) { od->icq = TRUE; + gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS; } else { gc->flags |= PURPLE_CONNECTION_HTML; gc->flags |= PURPLE_CONNECTION_AUTO_RESP; diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c index 6637e6e03e..9fc01be206 100644 --- a/pidgin/gtkblist.c +++ b/pidgin/gtkblist.c @@ -8017,7 +8017,7 @@ pidgin_blist_update_accounts_menu(void) (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) || PURPLE_PLUGIN_HAS_ACTIONS(plugin))) { if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) && - prpl_info->get_moods(account) != NULL) { + gc->flags & PURPLE_CONNECTION_SUPPORT_MOODS) { GList *types; for (types = purple_account_get_status_types(account); |