comparison libpurple/protocols/jabber/usermood.c @ 17580:7754d39d70c5

Added support for setting the avatar via XEP-0084. Receiving other people's avatar is up next.
author Andreas Monitzer <pidgin@monitzer.com>
date Sun, 17 Jun 2007 01:16:55 +0000
parents af833a3204bb
children f108b91e2fee
comparison
equal deleted inserted replaced
17579:af833a3204bb 17580:7754d39d70c5
132 } 132 }
133 if (moodtext) 133 if (moodtext)
134 g_free(moodtext); 134 g_free(moodtext);
135 } 135 }
136 136
137 static gboolean is_mood_supported(JabberStream *js, const gchar *shortname, const gchar *namespace) {
138 return js->pep;
139 }
140
141 void jabber_mood_init(void) { 137 void jabber_mood_init(void) {
142 jabber_add_feature("mood", "http://jabber.org/protocol/mood", is_mood_supported); 138 jabber_add_feature("mood", "http://jabber.org/protocol/mood", jabber_pep_namespace_only_when_pep_enabled_cb);
143 jabber_pep_register_handler("moodn", "http://jabber.org/protocol/mood", jabber_mood_cb); 139 jabber_pep_register_handler("moodn", "http://jabber.org/protocol/mood", jabber_mood_cb);
144 } 140 }
145 141
146 static void do_mood_set_from_fields(PurpleConnection *gc, PurpleRequestFields *fields) { 142 static void do_mood_set_from_fields(PurpleConnection *gc, PurpleRequestFields *fields) {
147 JabberStream *js = gc->proto_data; 143 JabberStream *js = gc->proto_data;