comparison libpurple/protocols/jabber/pep.c @ 25575:26eabe8e739b

Removing short-names for features and calculating own caps hash.
author Tobias Markmann <tfar@soc.pidgin.im>
date Mon, 16 Jun 2008 13:52:45 +0000
parents 680a3aea5eb6
children 860ebaf275ae
comparison
equal deleted inserted replaced
23353:adda955a8db6 25575:26eabe8e739b
43 /* register the PEP-specific actions */ 43 /* register the PEP-specific actions */
44 jabber_mood_init_action(m); 44 jabber_mood_init_action(m);
45 jabber_nick_init_action(m); 45 jabber_nick_init_action(m);
46 } 46 }
47 47
48 void jabber_pep_register_handler(const char *shortname, const char *xmlns, JabberPEPHandler handlerfunc) { 48 void jabber_pep_register_handler(const char *xmlns, JabberPEPHandler handlerfunc) {
49 gchar *notifyns = g_strdup_printf("%s+notify", xmlns); 49 gchar *notifyns = g_strdup_printf("%s+notify", xmlns);
50 jabber_add_feature(shortname, notifyns, NULL); /* receiving PEPs is always supported */ 50 jabber_add_feature(notifyns, NULL); /* receiving PEPs is always supported */
51 g_free(notifyns); 51 g_free(notifyns);
52 g_hash_table_replace(pep_handlers, g_strdup(xmlns), handlerfunc); 52 g_hash_table_replace(pep_handlers, g_strdup(xmlns), handlerfunc);
53 } 53 }
54 54
55 static void do_pep_iq_request_item_callback(JabberStream *js, xmlnode *packet, gpointer data) { 55 static void do_pep_iq_request_item_callback(JabberStream *js, xmlnode *packet, gpointer data) {
83 jabber_iq_set_callback(iq,do_pep_iq_request_item_callback,(gpointer)cb); 83 jabber_iq_set_callback(iq,do_pep_iq_request_item_callback,(gpointer)cb);
84 84
85 jabber_iq_send(iq); 85 jabber_iq_send(iq);
86 } 86 }
87 87
88 gboolean jabber_pep_namespace_only_when_pep_enabled_cb(JabberStream *js, const gchar *shortname, const gchar *namespace) { 88 gboolean jabber_pep_namespace_only_when_pep_enabled_cb(JabberStream *js, const gchar *namespace) {
89 return js->pep; 89 return js->pep;
90 } 90 }
91 91
92 void jabber_handle_event(JabberMessage *jm) { 92 void jabber_handle_event(JabberMessage *jm) {
93 /* this may be called even when the own server doesn't support pep! */ 93 /* this may be called even when the own server doesn't support pep! */