comparison libpurple/protocols/yahoo/libyahoojp.c @ 27318:31534ae3406a

Moved functions around and made some no longer static. All the functions that are no longer static now have prototypes in libymsg.h. Moved the URI handling stuff to libyahoo.c since I removed the handling capability from libyahoojp.c. I still need to find out if Yahoo! JAPAN has its own URI scheme or not.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 05 Jul 2009 23:56:07 +0000
parents 1f63548d3da5
children ca66c299dbbf
comparison
equal deleted inserted replaced
27317:1f63548d3da5 27318:31534ae3406a
22 */ 22 */
23 23
24 #include "internal.h" 24 #include "internal.h"
25 25
26 #include <account.h> 26 #include <account.h>
27 #include <prpl.h> 27
28 #include "libymsg.h"
29 #include "yahoochat.h"
30 #include "yahoo_aliases.h"
31 #include "yahoo_doodle.h"
32 #include "yahoo_filexfer.h"
33 #include "yahoo_picture.h"
34
35 static void yahoojp_register_commands(void)
36 {
37 purple_cmd_register("join", "s", PURPLE_CMD_P_PRPL,
38 PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT |
39 PURPLE_CMD_FLAG_PRPL_ONLY,
40 "prpl-yahoojp", yahoopurple_cmd_chat_join,
41 _("join &lt;room&gt;: Join a chat room on the Yahoo network"), NULL);
42 purple_cmd_register("list", "", PURPLE_CMD_P_PRPL,
43 PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT |
44 PURPLE_CMD_FLAG_PRPL_ONLY,
45 "prpl-yahoojp", yahoopurple_cmd_chat_list,
46 _("list: List rooms on the Yahoo network"), NULL);
47 purple_cmd_register("buzz", "", PURPLE_CMD_P_PRPL,
48 PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY,
49 "prpl-yahoojp", yahoopurple_cmd_buzz,
50 _("buzz: Buzz a user to get their attention"), NULL);
51 purple_cmd_register("doodle", "", PURPLE_CMD_P_PRPL,
52 PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY,
53 "prpl-yahoojp", yahoo_doodle_purple_cmd_start,
54 _("doodle: Request user to start a Doodle session"), NULL);
55 }
28 56
29 static GHashTable * 57 static GHashTable *
30 yahoojp_get_account_text_table(PurpleAccount *account) 58 yahoojp_get_account_text_table(PurpleAccount *account)
31 { 59 {
32 GHashTable *table; 60 GHashTable *table;
33 table = g_hash_table_new(g_str_hash, g_str_equal); 61 table = g_hash_table_new(g_str_hash, g_str_equal);
34 g_hash_table_insert(table, "login_label", (gpointer)_("Yahoo JAPAN ID...")); 62 g_hash_table_insert(table, "login_label", (gpointer)_("Yahoo JAPAN ID..."));
35 return table; 63 return table;
64 }
65
66 static gboolean yahoojp_unload_plugin(PurplePlugin *plugin)
67 {
68 yahoo_dest_colorht();
69
70 return TRUE;
36 } 71 }
37 72
38 static PurpleWhiteboardPrplOps yahoo_whiteboard_prpl_ops = 73 static PurpleWhiteboardPrplOps yahoo_whiteboard_prpl_ops =
39 { 74 {
40 yahoo_doodle_start, 75 yahoo_doodle_start,
146 /** description */ 181 /** description */
147 N_("Yahoo JAPAN Protocol Plugin"), 182 N_("Yahoo JAPAN Protocol Plugin"),
148 NULL, /**< author */ 183 NULL, /**< author */
149 PURPLE_WEBSITE, /**< homepage */ 184 PURPLE_WEBSITE, /**< homepage */
150 NULL, /**< load */ 185 NULL, /**< load */
151 yahoo_unload_plugin, /**< unload */ 186 yahoojp_unload_plugin, /**< unload */
152 NULL, /**< destroy */ 187 NULL, /**< destroy */
153 NULL, /**< ui_info */ 188 NULL, /**< ui_info */
154 &prpl_info, /**< extra_info */ 189 &prpl_info, /**< extra_info */
155 NULL, 190 NULL,
156 yahoo_actions, 191 yahoo_actions,
198 233
199 option = purple_account_option_int_new(_("Yahoo Chat port"), "ycht-port", YAHOO_YCHT_PORT); 234 option = purple_account_option_int_new(_("Yahoo Chat port"), "ycht-port", YAHOO_YCHT_PORT);
200 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); 235 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
201 #endif 236 #endif
202 237
203 my_protocol = plugin; 238 yahoojp_register_commands();
204 yahoopurple_register_commands();
205 yahoo_init_colorht(); 239 yahoo_init_colorht();
206 } 240 }
207 241
208 PURPLE_INIT_PLUGIN(yahoojp, init_plugin, info); 242 PURPLE_INIT_PLUGIN(yahoojp, init_plugin, info);
209 243