Mercurial > pidgin.yaz
diff pidgin/plugins/raw.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Mon, 19 Mar 2007 07:01:17 +0000 |
| parents | 535f002e7b0f |
| children | 66dff3dfdea6 |
line wrap: on
line diff
--- a/pidgin/plugins/raw.c Mon Mar 19 06:11:46 2007 +0000 +++ b/pidgin/plugins/raw.c Mon Mar 19 07:01:17 2007 +0000 @@ -1,7 +1,7 @@ /* - * Gaim - Send raw data across the connections of some protocols. + * Purple - Send raw data across the connections of some protocols. * - * Gaim is the legal property of its developers, whose names are too numerous + * Purple is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -43,13 +43,13 @@ #define RAW_PLUGIN_ID "gtk-raw" static GtkWidget *window = NULL; -static GaimAccount *account = NULL; -static GaimPlugin *my_plugin = NULL; +static PurpleAccount *account = NULL; +static PurplePlugin *my_plugin = NULL; static int window_closed_cb() { - gaim_plugin_unload(my_plugin); + purple_plugin_unload(my_plugin); return FALSE; } @@ -58,19 +58,19 @@ text_sent_cb(GtkEntry *entry) { const char *txt; - GaimConnection *gc; + PurpleConnection *gc; const char *prpl_id; if (account == NULL) return; - gc = gaim_account_get_connection(account); + gc = purple_account_get_connection(account); txt = gtk_entry_get_text(entry); - prpl_id = gaim_account_get_protocol_id(account); + prpl_id = purple_account_get_protocol_id(account); - gaim_debug_misc("raw", "prpl_id = %s\n", prpl_id); + purple_debug_misc("raw", "prpl_id = %s\n", prpl_id); if (strcmp(prpl_id, "prpl-toc") == 0) { int *a = (int *)gc->proto_data; @@ -80,7 +80,7 @@ write(*a, &seqno, 2); write(*a, &len, 2); write(*a, txt, ntohs(len)); - gaim_debug(GAIM_DEBUG_MISC, "raw", "TOC C: %s\n", txt); + purple_debug(PURPLE_DEBUG_MISC, "raw", "TOC C: %s\n", txt); } else if (strcmp(prpl_id, "prpl-msn") == 0) { MsnSession *session = gc->proto_data; @@ -92,27 +92,27 @@ } else if (strcmp(prpl_id, "prpl-irc") == 0) { write(*(int *)gc->proto_data, txt, strlen(txt)); write(*(int *)gc->proto_data, "\r\n", 2); - gaim_debug(GAIM_DEBUG_MISC, "raw", "IRC C: %s\n", txt); + purple_debug(PURPLE_DEBUG_MISC, "raw", "IRC C: %s\n", txt); } else if (strcmp(prpl_id, "prpl-jabber") == 0) { jabber_send_raw((JabberStream *)gc->proto_data, txt, -1); } else { - gaim_debug_error("raw", "Unknown protocol ID %s\n", prpl_id); + purple_debug_error("raw", "Unknown protocol ID %s\n", prpl_id); } gtk_entry_set_text(entry, ""); } static void -account_changed_cb(GtkWidget *dropdown, GaimAccount *new_account, +account_changed_cb(GtkWidget *dropdown, PurpleAccount *new_account, void *user_data) { account = new_account; } static gboolean -plugin_load(GaimPlugin *plugin) +plugin_load(PurplePlugin *plugin) { GtkWidget *hbox; GtkWidget *entry; @@ -133,8 +133,8 @@ dropdown = pidgin_account_option_menu_new(NULL, FALSE, G_CALLBACK(account_changed_cb), NULL, NULL); - if (gaim_connections_get_all()) - account = (GaimAccount *)gaim_connections_get_all()->data; + if (purple_connections_get_all()) + account = (PurpleAccount *)purple_connections_get_all()->data; gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); @@ -151,7 +151,7 @@ } static gboolean -plugin_unload(GaimPlugin *plugin) +plugin_unload(PurplePlugin *plugin) { if (window) gtk_widget_destroy(window); @@ -161,16 +161,16 @@ return TRUE; } -static GaimPluginInfo info = +static PurplePluginInfo info = { - GAIM_PLUGIN_MAGIC, - GAIM_MAJOR_VERSION, - GAIM_MINOR_VERSION, - GAIM_PLUGIN_STANDARD, + PURPLE_PLUGIN_MAGIC, + PURPLE_MAJOR_VERSION, + PURPLE_MINOR_VERSION, + PURPLE_PLUGIN_STANDARD, PIDGIN_PLUGIN_TYPE, 0, NULL, - GAIM_PRIORITY_DEFAULT, + PURPLE_PRIORITY_DEFAULT, RAW_PLUGIN_ID, N_("Raw"), VERSION, @@ -178,7 +178,7 @@ N_("Lets you send raw input to text-based protocols (Jabber, MSN, IRC, " "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."), "Eric Warmenhoven <eric@warmenhoven.org>", - GAIM_WEBSITE, + PURPLE_WEBSITE, plugin_load, plugin_unload, NULL, @@ -189,9 +189,9 @@ }; static void -init_plugin(GaimPlugin *plugin) +init_plugin(PurplePlugin *plugin) { my_plugin = plugin; } -GAIM_INIT_PLUGIN(raw, init_plugin, info) +PURPLE_INIT_PLUGIN(raw, init_plugin, info)
