Mercurial > pidgin.yaz
changeset 28893:96ba7fd24177
jabber: Use purple_connection_get_prpl() instead of jabber_plugin.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 06 Nov 2009 09:13:28 +0000 |
parents | cfcdf15459a5 |
children | 46fd79aa46c5 |
files | libpurple/protocols/jabber/iq.c libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/jabber.h libpurple/protocols/jabber/libxmpp.c libpurple/protocols/jabber/message.c libpurple/protocols/jabber/presence.c |
diffstat | 6 files changed, 12 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/iq.c Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/iq.c Fri Nov 06 09:13:28 2009 +0000 @@ -342,7 +342,7 @@ return; } - signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, + signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_connection_get_prpl(js->gc), "jabber-receiving-iq", js->gc, iq_type, id, from, packet)); if (signal_return) return; @@ -367,7 +367,7 @@ g_free(key); if (signal_ref > 0) { - signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, "jabber-watched-iq", + signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_connection_get_prpl(js->gc), "jabber-watched-iq", js->gc, iq_type, id, from, child)); if (signal_return) return;
--- a/libpurple/protocols/jabber/jabber.c Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Fri Nov 06 09:13:28 2009 +0000 @@ -68,10 +68,9 @@ #include "jingle/jingle.h" #include "jingle/rtp.h" -PurplePlugin *jabber_plugin = NULL; GList *jabber_features = NULL; GList *jabber_identities = NULL; -GSList *jabber_cmds = NULL; +static GSList *jabber_cmds = NULL; static void jabber_unregister_account_cb(JabberStream *js); static void try_srv_connect(JabberStream *js); @@ -255,7 +254,7 @@ { const char *xmlns; - purple_signal_emit(jabber_plugin, "jabber-receiving-xmlnode", js->gc, packet); + purple_signal_emit(purple_connection_get_prpl(js->gc), "jabber-receiving-xmlnode", js->gc, packet); /* if the signal leaves us with a null packet, we're done */ if(NULL == *packet) @@ -419,7 +418,7 @@ /* If we've got a security layer, we need to encode the data, * splitting it on the maximum buffer length negotiated */ - purple_signal_emit(jabber_plugin, "jabber-sending-text", js->gc, &data); + purple_signal_emit(purple_connection_get_prpl(js->gc), "jabber-sending-text", js->gc, &data); if (data == NULL) return; @@ -489,7 +488,7 @@ void jabber_send(JabberStream *js, xmlnode *packet) { - purple_signal_emit(jabber_plugin, "jabber-sending-xmlnode", js->gc, &packet); + purple_signal_emit(purple_connection_get_prpl(js->gc), "jabber-sending-xmlnode", js->gc, &packet); } static gboolean jabber_keepalive_timeout(PurpleConnection *gc) @@ -3405,8 +3404,6 @@ unspecified */ const gchar *ui_name = NULL; - jabber_plugin = plugin; - ui_type = ui_info ? g_hash_table_lookup(ui_info, "client_type") : NULL; if (ui_type) { if (strcmp(ui_type, "pc") == 0 || @@ -3496,9 +3493,9 @@ } void -jabber_uninit_plugin(void) +jabber_uninit_plugin(PurplePlugin *plugin) { - purple_plugin_ipc_unregister_all(jabber_plugin); + purple_plugin_ipc_unregister_all(plugin); jabber_features_destroy(); jabber_identities_destroy();
--- a/libpurple/protocols/jabber/jabber.h Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.h Fri Nov 06 09:13:28 2009 +0000 @@ -81,8 +81,6 @@ /* Index into attention_types list */ #define JABBER_BUZZ 0 -extern PurplePlugin *jabber_plugin; - typedef enum { JABBER_STREAM_OFFLINE, JABBER_STREAM_CONNECTING, @@ -384,6 +382,6 @@ void jabber_unregister_commands(void); void jabber_init_plugin(PurplePlugin *plugin); -void jabber_uninit_plugin(void); +void jabber_uninit_plugin(PurplePlugin *plugin); #endif /* PURPLE_JABBER_H_ */
--- a/libpurple/protocols/jabber/libxmpp.c Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Fri Nov 06 09:13:28 2009 +0000 @@ -227,7 +227,7 @@ jabber_unregister_commands(); /* Stay on target...stay on target... Almost there... */ - jabber_uninit_plugin(); + jabber_uninit_plugin(plugin); return TRUE; }
--- a/libpurple/protocols/jabber/message.c Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Fri Nov 06 09:13:28 2009 +0000 @@ -545,7 +545,7 @@ to = xmlnode_get_attrib(packet, "to"); type = xmlnode_get_attrib(packet, "type"); - signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, + signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_connection_get_prpl(js->gc), "jabber-receiving-message", js->gc, type, id, from, to, packet)); if (signal_return) return;
--- a/libpurple/protocols/jabber/presence.c Fri Nov 06 09:07:46 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Fri Nov 06 09:13:28 2009 +0000 @@ -518,7 +518,7 @@ jb = jabber_buddy_find(js, from, TRUE); g_return_if_fail(jb != NULL); - signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, + signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_connection_get_prpl(js->gc), "jabber-receiving-presence", js->gc, type, from, packet)); if (signal_return) return;