Mercurial > pidgin
diff libpurple/protocols/qq/qq.c @ 15822:32c366eeeb99
sed -ie 's/gaim/purple/g'
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Mon, 19 Mar 2007 07:01:17 +0000 |
| parents | b258250b72c9 |
| children | 6b4e778ee4b4 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq.c Mon Mar 19 06:11:46 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Mon Mar 19 07:01:17 2007 +0000 @@ -1,9 +1,9 @@ /** * @file qq.c * - * gaim + * purple * - * 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. * @@ -90,36 +90,36 @@ }; const gint tcp_server_amount = (sizeof(tcp_server_list) / sizeof(tcp_server_list[0])); -static void _qq_login(GaimAccount *account) +static void _qq_login(PurpleAccount *account) { const gchar *qq_server, *qq_port; qq_data *qd; - GaimConnection *gc; - GaimPresence *presence; + PurpleConnection *gc; + PurplePresence *presence; gboolean use_tcp; g_return_if_fail(account != NULL); - gc = gaim_account_get_connection(account); + gc = purple_account_get_connection(account); g_return_if_fail(gc != NULL); - gc->flags |= GAIM_CONNECTION_HTML | GAIM_CONNECTION_NO_BGCOLOR | GAIM_CONNECTION_AUTO_RESP; + gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_AUTO_RESP; qd = g_new0(qq_data, 1); qd->gc = gc; gc->proto_data = qd; - qq_server = gaim_account_get_string(account, "server", NULL); - qq_port = gaim_account_get_string(account, "port", NULL); - use_tcp = gaim_account_get_bool(account, "use_tcp", FALSE); - presence = gaim_account_get_presence(account); + qq_server = purple_account_get_string(account, "server", NULL); + qq_port = purple_account_get_string(account, "port", NULL); + use_tcp = purple_account_get_bool(account, "use_tcp", FALSE); + presence = purple_account_get_presence(account); qd->use_tcp = use_tcp; - if(gaim_presence_is_status_primitive_active(presence, GAIM_STATUS_INVISIBLE)) { + if(purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_INVISIBLE)) { qd->login_mode = QQ_LOGIN_MODE_HIDDEN; - } else if(gaim_presence_is_status_primitive_active(presence, GAIM_STATUS_AWAY) - || gaim_presence_is_status_primitive_active(presence, GAIM_STATUS_EXTENDED_AWAY)) { + } else if(purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_AWAY) + || purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_EXTENDED_AWAY)) { qd->login_mode = QQ_LOGIN_MODE_AWAY; } else { qd->login_mode = QQ_LOGIN_MODE_NORMAL; @@ -133,28 +133,28 @@ if (qq_port == NULL || strtol(qq_port, NULL, 10) == 0) qq_port = use_tcp ? QQ_TCP_QUERY_PORT : QQ_UDP_PORT; - gaim_connection_update_progress(gc, _("Connecting"), 0, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Connecting"), 0, QQ_CONNECT_STEPS); if (qq_connect(account, qq_server, strtol(qq_port, NULL, 10), use_tcp, FALSE) < 0) - gaim_connection_error(gc, _("Unable to connect.")); + purple_connection_error(gc, _("Unable to connect.")); } /* directly goes for qq_disconnect */ -static void _qq_close(GaimConnection *gc) +static void _qq_close(PurpleConnection *gc) { g_return_if_fail(gc != NULL); qq_disconnect(gc); } /* returns the icon name for a buddy or protocol */ -static const gchar *_qq_list_icon(GaimAccount *a, GaimBuddy *b) +static const gchar *_qq_list_icon(PurpleAccount *a, PurpleBuddy *b) { return "qq"; } /* a short status text beside buddy icon*/ -static gchar *_qq_status_text(GaimBuddy *b) +static gchar *_qq_status_text(PurpleBuddy *b) { qq_buddy *q_bud; GString *status; @@ -191,7 +191,7 @@ /* a floating text when mouse is on the icon, show connection status here */ -static void _qq_tooltip_text(GaimBuddy *b, GaimNotifyUserInfo *user_info, gboolean full) +static void _qq_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full) { qq_buddy *q_bud; gchar *ip_str; @@ -202,42 +202,42 @@ q_bud = (qq_buddy *) b->proto_data; g_return_if_fail(q_bud != NULL); - if (GAIM_BUDDY_IS_ONLINE(b) && q_bud != NULL) + if (PURPLE_BUDDY_IS_ONLINE(b) && q_bud != NULL) { ip_str = gen_ip_str(q_bud->ip); if (strlen(ip_str) != 0) { tmp = g_strdup_printf(_("%s Address"), ((q_bud->comm_flag & QQ_COMM_FLAG_TCP_MODE) ? "TCP" : "UDP")); tmp2 = g_strdup_printf("%s:%d", ip_str, q_bud->port); - gaim_notify_user_info_add_pair(user_info, tmp, tmp2); + purple_notify_user_info_add_pair(user_info, tmp, tmp2); g_free(tmp2); g_free(tmp); } g_free(ip_str); tmp = g_strdup_printf("%d", q_bud->age); - gaim_notify_user_info_add_pair(user_info, _("Age"), tmp); + purple_notify_user_info_add_pair(user_info, _("Age"), tmp); g_free(tmp); switch (q_bud->gender) { case QQ_BUDDY_GENDER_GG: - gaim_notify_user_info_add_pair(user_info, _("Gender"), _("Male")); + purple_notify_user_info_add_pair(user_info, _("Gender"), _("Male")); break; case QQ_BUDDY_GENDER_MM: - gaim_notify_user_info_add_pair(user_info, _("Gender"), _("Female")); + purple_notify_user_info_add_pair(user_info, _("Gender"), _("Female")); break; case QQ_BUDDY_GENDER_UNKNOWN: - gaim_notify_user_info_add_pair(user_info, _("Gender"), _("Unknown")); + purple_notify_user_info_add_pair(user_info, _("Gender"), _("Unknown")); break; default: tmp = g_strdup_printf("Error (%d)", q_bud->gender); - gaim_notify_user_info_add_pair(user_info, _("Gender"), tmp); + purple_notify_user_info_add_pair(user_info, _("Gender"), tmp); g_free(tmp); } if (q_bud->level) { tmp = g_strdup_printf("%d", q_bud->level); - gaim_notify_user_info_add_pair(user_info, _("Level"), tmp); + purple_notify_user_info_add_pair(user_info, _("Level"), tmp); g_free(tmp); } /* For debugging */ @@ -250,9 +250,9 @@ } /* we can show tiny icons on the four corners of buddy icon, */ -static const char *_qq_list_emblem(GaimBuddy *b) +static const char *_qq_list_emblem(PurpleBuddy *b) { - /* each char** are refering to a filename in pixmaps/gaim/status/default/ */ + /* each char** are refering to a filename in pixmaps/purple/status/default/ */ qq_buddy *q_bud = b->proto_data; @@ -269,28 +269,28 @@ } /* QQ away status (used to initiate QQ away packet) */ -static GList *_qq_away_states(GaimAccount *ga) +static GList *_qq_away_states(PurpleAccount *ga) { - GaimStatusType *status; + PurpleStatusType *status; GList *types = NULL; - status = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, + status = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, "available", _("QQ: Available"), FALSE, TRUE, FALSE); types = g_list_append(types, status); - status = gaim_status_type_new_full(GAIM_STATUS_AWAY, + status = purple_status_type_new_full(PURPLE_STATUS_AWAY, "away", _("QQ: Away"), FALSE, TRUE, FALSE); types = g_list_append(types, status); - status = gaim_status_type_new_full(GAIM_STATUS_INVISIBLE, + status = purple_status_type_new_full(PURPLE_STATUS_INVISIBLE, "invisible", _("QQ: Invisible"), FALSE, TRUE, FALSE); types = g_list_append(types, status); - status = gaim_status_type_new_full(GAIM_STATUS_OFFLINE, + status = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, "offline", _("QQ: Offline"), FALSE, TRUE, FALSE); types = g_list_append(types, status); - status = gaim_status_type_new_full(GAIM_STATUS_MOBILE, + status = purple_status_type_new_full(PURPLE_STATUS_MOBILE, "mobile", NULL, FALSE, FALSE, TRUE); types = g_list_append(types, status); @@ -298,16 +298,16 @@ } /* initiate QQ away with proper change_status packet */ -static void _qq_set_away(GaimAccount *account, GaimStatus *status) +static void _qq_set_away(PurpleAccount *account, PurpleStatus *status) { - GaimConnection *gc = gaim_account_get_connection(account); + PurpleConnection *gc = purple_account_get_connection(account); qq_send_packet_change_status(gc); } -/* IMPORTANT: GaimConvImFlags -> GaimMessageFlags */ +/* IMPORTANT: PurpleConvImFlags -> PurpleMessageFlags */ /* send an instant msg to a buddy */ -static gint _qq_send_im(GaimConnection *gc, const gchar *who, const gchar *message, GaimMessageFlags flags) +static gint _qq_send_im(PurpleConnection *gc, const gchar *who, const gchar *message, PurpleMessageFlags flags) { gint type, to_uid; gchar *msg, *msg_with_qq_smiley; @@ -319,15 +319,15 @@ g_return_val_if_fail(strlen(message) <= QQ_MSG_IM_MAX, -E2BIG); - type = (flags == GAIM_MESSAGE_AUTO_RESP ? QQ_IM_AUTO_REPLY : QQ_IM_TEXT); - to_uid = gaim_name_to_uid(who); + type = (flags == PURPLE_MESSAGE_AUTO_RESP ? QQ_IM_AUTO_REPLY : QQ_IM_TEXT); + to_uid = purple_name_to_uid(who); /* if msg is to myself, bypass the network */ if (to_uid == qd->uid) { serv_got_im(gc, who, message, flags, time(NULL)); } else { msg = utf8_to_qq(message, QQ_CHARSET_DEFAULT); - msg_with_qq_smiley = gaim_smiley_to_qq(msg); + msg_with_qq_smiley = purple_smiley_to_qq(msg); qq_send_packet_im(gc, to_uid, msg_with_qq_smiley, type); g_free(msg); g_free(msg_with_qq_smiley); @@ -337,7 +337,7 @@ } /* send a chat msg to a QQ Qun */ -static int _qq_chat_send(GaimConnection *gc, int channel, const char *message, GaimMessageFlags flags) +static int _qq_chat_send(PurpleConnection *gc, int channel, const char *message, PurpleMessageFlags flags) { gchar *msg, *msg_with_qq_smiley; qq_group *group; @@ -349,7 +349,7 @@ g_return_val_if_fail(group != NULL, -1); msg = utf8_to_qq(message, QQ_CHARSET_DEFAULT); - msg_with_qq_smiley = gaim_smiley_to_qq(msg); + msg_with_qq_smiley = purple_smiley_to_qq(msg); qq_send_packet_group_im(gc, group, msg_with_qq_smiley); g_free(msg); g_free(msg_with_qq_smiley); @@ -358,17 +358,17 @@ } /* send packet to get who's detailed information */ -static void _qq_get_info(GaimConnection *gc, const gchar *who) +static void _qq_get_info(PurpleConnection *gc, const gchar *who) { guint32 uid; qq_data *qd; qd = gc->proto_data; - uid = gaim_name_to_uid(who); + uid = purple_name_to_uid(who); if (uid <= 0) { - gaim_debug(GAIM_DEBUG_ERROR, "QQ", "Not valid QQid: %s\n", who); - gaim_notify_error(gc, NULL, _("Invalid name"), NULL); + purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Not valid QQid: %s\n", who); + purple_notify_error(gc, NULL, _("Invalid name"), NULL); return; } @@ -377,46 +377,46 @@ } /* get my own information */ -static void _qq_menu_modify_my_info(GaimPluginAction *action) +static void _qq_menu_modify_my_info(PurplePluginAction *action) { - GaimConnection *gc = (GaimConnection *) action->context; + PurpleConnection *gc = (PurpleConnection *) action->context; qq_data *qd; qd = (qq_data *) gc->proto_data; qq_prepare_modify_info(gc); } -static void _qq_menu_change_password(GaimPluginAction *action) +static void _qq_menu_change_password(PurplePluginAction *action) { - gaim_notify_uri(NULL, "https://password.qq.com"); + purple_notify_uri(NULL, "https://password.qq.com"); } /* remove a buddy from my list and remove myself from his list */ /* TODO: re-enable this -static void _qq_menu_block_buddy(GaimBlistNode * node) +static void _qq_menu_block_buddy(PurpleBlistNode * node) { guint32 uid; gc_and_uid *g; - GaimBuddy *buddy; - GaimConnection *gc; + PurpleBuddy *buddy; + PurpleConnection *gc; // const gchar *who = param_who; gfhuang const gchar *who; - g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node)); - buddy = (GaimBuddy *) node; - gc = gaim_account_get_connection(buddy->account); + buddy = (PurpleBuddy *) node; + gc = purple_account_get_connection(buddy->account); who = buddy->name; g_return_if_fail(who != NULL); - uid = gaim_name_to_uid(who); + uid = purple_name_to_uid(who); g_return_if_fail(uid > 0); g = g_new0(gc_and_uid, 1); g->gc = gc; g->uid = uid; - gaim_request_action(gc, _("Block Buddy"), + purple_request_action(gc, _("Block Buddy"), _("Are you sure to block this buddy?"), NULL, 1, g, 2, _("Cancel"), @@ -426,9 +426,9 @@ */ /* show a brief summary of what we get from login packet */ -static void _qq_menu_show_login_info(GaimPluginAction *action) +static void _qq_menu_show_login_info(PurplePluginAction *action) { - GaimConnection *gc = (GaimConnection *) action->context; + PurpleConnection *gc = (PurpleConnection *) action->context; qq_data *qd; GString *info; @@ -453,23 +453,23 @@ g_string_append(info, "</body></html>"); - gaim_notify_formatted(gc, NULL, _("Login Information"), NULL, info->str, NULL, NULL); + purple_notify_formatted(gc, NULL, _("Login Information"), NULL, info->str, NULL, NULL); g_string_free(info, TRUE); } /* -static void _qq_menu_search_or_add_permanent_group(GaimPluginAction *action) +static void _qq_menu_search_or_add_permanent_group(PurplePluginAction *action) { - gaim_roomlist_show_with_account(NULL); + purple_roomlist_show_with_account(NULL); } */ /* -static void _qq_menu_create_permanent_group(GaimPluginAction * action) +static void _qq_menu_create_permanent_group(PurplePluginAction * action) { - GaimConnection *gc = (GaimConnection *) action->context; - gaim_request_input(gc, _("Create QQ Qun"), + PurpleConnection *gc = (PurpleConnection *) action->context; + purple_request_input(gc, _("Create QQ Qun"), _("Input Qun name here"), _("Only QQ member can create permanent Qun"), "OpenQ", FALSE, FALSE, NULL, @@ -477,26 +477,26 @@ } */ -static void _qq_menu_unsubscribe_group(GaimBlistNode * node) +static void _qq_menu_unsubscribe_group(PurpleBlistNode * node) { - GaimChat *chat = (GaimChat *)node; - GaimConnection *gc = gaim_account_get_connection(chat->account); + PurpleChat *chat = (PurpleChat *)node; + PurpleConnection *gc = purple_account_get_connection(chat->account); GHashTable *components = chat -> components; - g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT(node)); + g_return_if_fail(PURPLE_BLIST_NODE_IS_CHAT(node)); g_return_if_fail(components != NULL); qq_group_exit(gc, components); } /* -static void _qq_menu_manage_group(GaimBlistNode * node) +static void _qq_menu_manage_group(PurpleBlistNode * node) { - GaimChat *chat = (GaimChat *)node; - GaimConnection *gc = gaim_account_get_connection(chat->account); + PurpleChat *chat = (PurpleChat *)node; + PurpleConnection *gc = purple_account_get_connection(chat->account); GHashTable *components = chat -> components; - g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT(node)); + g_return_if_fail(PURPLE_BLIST_NODE_IS_CHAT(node)); g_return_if_fail(components != NULL); qq_group_manage_group(gc, components); @@ -504,17 +504,17 @@ */ /* TODO: re-enable this -static void _qq_menu_send_file(GaimBlistNode * node, gpointer ignored) +static void _qq_menu_send_file(PurpleBlistNode * node, gpointer ignored) { - GaimBuddy *buddy; - GaimConnection *gc; + PurpleBuddy *buddy; + PurpleConnection *gc; qq_buddy *q_bud; - g_return_if_fail (GAIM_BLIST_NODE_IS_BUDDY (node)); - buddy = (GaimBuddy *) node; + g_return_if_fail (PURPLE_BLIST_NODE_IS_BUDDY (node)); + buddy = (PurpleBuddy *) node; q_bud = (qq_buddy *) buddy->proto_data; // if (is_online (q_bud->status)) { - gc = gaim_account_get_connection (buddy->account); + gc = purple_account_get_connection (buddy->account); g_return_if_fail (gc != NULL && gc->proto_data != NULL); qq_send_file(gc, buddy->name, NULL); // } @@ -522,26 +522,26 @@ */ /* protocol related menus */ -static GList *_qq_actions(GaimPlugin *plugin, gpointer context) +static GList *_qq_actions(PurplePlugin *plugin, gpointer context) { GList *m; - GaimPluginAction *act; + PurplePluginAction *act; m = NULL; - act = gaim_plugin_action_new(_("Modify My Information"), _qq_menu_modify_my_info); + act = purple_plugin_action_new(_("Modify My Information"), _qq_menu_modify_my_info); m = g_list_append(m, act); - act = gaim_plugin_action_new(_("Change Password"), _qq_menu_change_password); + act = purple_plugin_action_new(_("Change Password"), _qq_menu_change_password); m = g_list_append(m, act); - act = gaim_plugin_action_new(_("Show Login Information"), _qq_menu_show_login_info); + act = purple_plugin_action_new(_("Show Login Information"), _qq_menu_show_login_info); m = g_list_append(m, act); /* - act = gaim_plugin_action_new(_("Qun: Search a permanent Qun"), _qq_menu_search_or_add_permanent_group); + act = purple_plugin_action_new(_("Qun: Search a permanent Qun"), _qq_menu_search_or_add_permanent_group); m = g_list_append(m, act); - act = gaim_plugin_action_new(_("Qun: Create a permanent Qun"), _qq_menu_create_permanent_group); + act = purple_plugin_action_new(_("Qun: Create a permanent Qun"), _qq_menu_create_permanent_group); m = g_list_append(m, act); */ @@ -549,17 +549,17 @@ } /* chat-related (QQ Qun) menu shown up with right-click */ -static GList *_qq_chat_menu(GaimBlistNode *node) +static GList *_qq_chat_menu(PurpleBlistNode *node) { GList *m; - GaimMenuAction *act; + PurpleMenuAction *act; m = NULL; - act = gaim_menu_action_new(_("Exit this QQ Qun"), GAIM_CALLBACK(_qq_menu_unsubscribe_group), NULL, NULL); + act = purple_menu_action_new(_("Exit this QQ Qun"), PURPLE_CALLBACK(_qq_menu_unsubscribe_group), NULL, NULL); m = g_list_append(m, act); /* TODO: enable this - act = gaim_menu_action_new(_("Show Details"), GAIM_CALLBACK(_qq_menu_manage_group), NULL, NULL); + act = purple_menu_action_new(_("Show Details"), PURPLE_CALLBACK(_qq_menu_manage_group), NULL, NULL); m = g_list_append(m, act); */ @@ -567,11 +567,11 @@ } /* buddy-related menu shown up with right-click */ -static GList *_qq_buddy_menu(GaimBlistNode * node) +static GList *_qq_buddy_menu(PurpleBlistNode * node) { GList *m; - if(GAIM_BLIST_NODE_IS_CHAT(node)) + if(PURPLE_BLIST_NODE_IS_CHAT(node)) return _qq_chat_menu(node); m = NULL; @@ -580,10 +580,10 @@ /* TODO : not working, temp commented out by gfhuang - act = gaim_menu_action_new(_("Block this buddy"), GAIM_CALLBACK(_qq_menu_block_buddy), NULL, NULL); //add NULL by gfhuang + act = purple_menu_action_new(_("Block this buddy"), PURPLE_CALLBACK(_qq_menu_block_buddy), NULL, NULL); //add NULL by gfhuang m = g_list_append(m, act); // if (q_bud && is_online(q_bud->status)) { - act = gaim_menu_action_new(_("Send File"), GAIM_CALLBACK(_qq_menu_send_file), NULL, NULL); //add NULL by gfhuang + act = purple_menu_action_new(_("Send File"), PURPLE_CALLBACK(_qq_menu_send_file), NULL, NULL); //add NULL by gfhuang m = g_list_append(m, act); // } */ @@ -593,7 +593,7 @@ */ -static void _qq_keep_alive(GaimConnection *gc) +static void _qq_keep_alive(PurpleConnection *gc) { qq_group *group; qq_data *qd; @@ -618,30 +618,30 @@ /* convert chat nickname to qq-uid to get this buddy info */ /* who is the nickname of buddy in QQ chat-room (Qun) */ -static void _qq_get_chat_buddy_info(GaimConnection *gc, gint channel, const gchar *who) +static void _qq_get_chat_buddy_info(PurpleConnection *gc, gint channel, const gchar *who) { - gchar *gaim_name; + gchar *purple_name; g_return_if_fail(who != NULL); - gaim_name = chat_name_to_gaim_name(who); - if (gaim_name != NULL) - _qq_get_info(gc, gaim_name); + purple_name = chat_name_to_purple_name(who); + if (purple_name != NULL) + _qq_get_info(gc, purple_name); } /* convert chat nickname to qq-uid to invite individual IM to buddy */ /* who is the nickname of buddy in QQ chat-room (Qun) */ -static gchar *_qq_get_chat_buddy_real_name(GaimConnection *gc, gint channel, const gchar *who) +static gchar *_qq_get_chat_buddy_real_name(PurpleConnection *gc, gint channel, const gchar *who) { g_return_val_if_fail(who != NULL, NULL); - return chat_name_to_gaim_name(who); + return chat_name_to_purple_name(who); } -GaimPlugin *my_protocol = NULL; -static GaimPluginProtocolInfo prpl_info = { +PurplePlugin *my_protocol = NULL; +static PurplePluginProtocolInfo prpl_info = { OPT_PROTO_CHAT_TOPIC | OPT_PROTO_USE_POINTSIZE, NULL, /* user_splits */ NULL, /* protocol_options */ - {"png", 96, 96, 96, 96, 0, GAIM_ICON_SCALE_SEND}, /* icon_spec */ + {"png", 96, 96, 96, 96, 0, PURPLE_ICON_SCALE_SEND}, /* icon_spec */ _qq_list_icon, /* list_icon */ _qq_list_emblem, /* list_emblems */ _qq_status_text, /* status_text */ @@ -697,20 +697,20 @@ qq_send_file, /* send_file */ NULL, /* new xfer */ NULL, /* offline_message */ - NULL, /* GaimWhiteboardPrplOps */ + NULL, /* PurpleWhiteboardPrplOps */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ }; -static GaimPluginInfo info = { - GAIM_PLUGIN_MAGIC, - GAIM_MAJOR_VERSION, - GAIM_MINOR_VERSION, - GAIM_PLUGIN_PROTOCOL, /**< type */ +static PurplePluginInfo info = { + PURPLE_PLUGIN_MAGIC, + PURPLE_MAJOR_VERSION, + PURPLE_MINOR_VERSION, + PURPLE_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ - GAIM_PRIORITY_DEFAULT, /**< priority */ + PURPLE_PRIORITY_DEFAULT, /**< priority */ "prpl-qq", /**< id */ "QQ", /**< name */ @@ -733,28 +733,28 @@ }; -static void init_plugin(GaimPlugin *plugin) +static void init_plugin(PurplePlugin *plugin) { - GaimAccountOption *option; + PurpleAccountOption *option; - option = gaim_account_option_bool_new(_("Login in TCP"), "use_tcp", FALSE); + option = purple_account_option_bool_new(_("Login in TCP"), "use_tcp", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_bool_new(_("Login Hidden"), "hidden", FALSE); + option = purple_account_option_bool_new(_("Login Hidden"), "hidden", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_string_new(_("Server"), "server", NULL); + option = purple_account_option_string_new(_("Server"), "server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_string_new(_("Port"), "port", NULL); + option = purple_account_option_string_new(_("Port"), "port", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; - gaim_prefs_add_none("/plugins/prpl/qq"); - gaim_prefs_add_bool("/plugins/prpl/qq/show_status_by_icon", TRUE); - gaim_prefs_add_bool("/plugins/prpl/qq/show_fake_video", FALSE); - gaim_prefs_add_bool("/plugins/prpl/qq/prompt_group_msg_on_recv", TRUE); + purple_prefs_add_none("/plugins/prpl/qq"); + purple_prefs_add_bool("/plugins/prpl/qq/show_status_by_icon", TRUE); + purple_prefs_add_bool("/plugins/prpl/qq/show_fake_video", FALSE); + purple_prefs_add_bool("/plugins/prpl/qq/prompt_group_msg_on_recv", TRUE); } -GAIM_INIT_PLUGIN(qq, init_plugin, info); +PURPLE_INIT_PLUGIN(qq, init_plugin, info);
