Remove useless comparison
[pidgin-git.git] / libpurple / protocols / oscar / libicq.c
blob18f5451e596f8c5919f4a12eab7de44c8fd62577
1 /* purple
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 /* libicq is the ICQ protocol plugin. It is linked against liboscar,
24 * which contains all the shared implementation code with libaim
28 #include "oscarcommon.h"
30 static GHashTable *
31 icq_get_account_text_table(PurpleAccount *account)
33 GHashTable *table;
34 table = g_hash_table_new(g_str_hash, g_str_equal);
35 g_hash_table_insert(table, "login_label", (gpointer)_("ICQ UIN..."));
36 return table;
39 static PurplePluginProtocolInfo prpl_info =
41 OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE | OPT_PROTO_INVITE_MESSAGE,
42 NULL, /* user_splits */
43 NULL, /* protocol_options */
44 {"gif,jpeg,bmp,ico", 0, 0, 64, 64, 7168, PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */
45 oscar_list_icon_icq, /* list_icon */
46 oscar_list_emblem, /* list_emblems */
47 oscar_status_text, /* status_text */
48 oscar_tooltip_text, /* tooltip_text */
49 oscar_status_types, /* status_types */
50 oscar_blist_node_menu, /* blist_node_menu */
51 oscar_chat_info, /* chat_info */
52 oscar_chat_info_defaults, /* chat_info_defaults */
53 oscar_login, /* login */
54 oscar_close, /* close */
55 oscar_send_im, /* send_im */
56 oscar_set_info, /* set_info */
57 oscar_send_typing, /* send_typing */
58 oscar_get_info, /* get_info */
59 oscar_set_status, /* set_status */
60 oscar_set_idle, /* set_idle */
61 oscar_change_passwd, /* change_passwd */
62 NULL, /* add_buddy */
63 NULL, /* add_buddies */
64 oscar_remove_buddy, /* remove_buddy */
65 NULL, /* remove_buddies */
66 NULL, /* add_permit */
67 oscar_add_deny, /* add_deny */
68 NULL, /* rem_permit */
69 oscar_rem_deny, /* rem_deny */
70 NULL, /* set_permit_deny */
71 oscar_join_chat, /* join_chat */
72 NULL, /* reject_chat */
73 oscar_get_chat_name, /* get_chat_name */
74 oscar_chat_invite, /* chat_invite */
75 oscar_chat_leave, /* chat_leave */
76 NULL, /* chat_whisper */
77 oscar_send_chat, /* chat_send */
78 oscar_keepalive, /* keepalive */
79 NULL, /* register_user */
80 NULL, /* get_cb_info */
81 NULL, /* get_cb_away */
82 oscar_alias_buddy, /* alias_buddy */
83 oscar_move_buddy, /* group_buddy */
84 oscar_rename_group, /* rename_group */
85 NULL, /* buddy_free */
86 oscar_convo_closed, /* convo_closed */
87 oscar_normalize, /* normalize */
88 oscar_set_icon, /* set_buddy_icon */
89 oscar_remove_group, /* remove_group */
90 NULL, /* get_cb_real_name */
91 NULL, /* set_chat_topic */
92 NULL, /* find_blist_chat */
93 NULL, /* roomlist_get_list */
94 NULL, /* roomlist_cancel */
95 NULL, /* roomlist_expand_category */
96 oscar_can_receive_file, /* can_receive_file */
97 oscar_send_file, /* send_file */
98 oscar_new_xfer, /* new_xfer */
99 oscar_offline_message, /* offline_message */
100 NULL, /* whiteboard_prpl_ops */
101 NULL, /* send_raw */
102 NULL, /* roomlist_room_serialize */
103 NULL, /* unregister_user */
104 NULL, /* send_attention */
105 NULL, /* get_attention_types */
107 sizeof(PurplePluginProtocolInfo), /* struct_size */
108 icq_get_account_text_table, /* get_account_text_table */
109 NULL, /* initiate_media */
110 NULL, /* can_do_media */
111 oscar_get_purple_moods, /* get_moods */
112 NULL, /* set_public_alias */
113 NULL, /* get_public_alias */
114 oscar_add_buddy, /* add_buddy_with_invite */
115 NULL /* add_buddies_with_invite */
118 static PurplePluginInfo info =
120 PURPLE_PLUGIN_MAGIC,
121 PURPLE_MAJOR_VERSION,
122 PURPLE_MINOR_VERSION,
123 PURPLE_PLUGIN_PROTOCOL, /**< type */
124 NULL, /**< ui_requirement */
125 0, /**< flags */
126 NULL, /**< dependencies */
127 PURPLE_PRIORITY_DEFAULT, /**< priority */
129 "prpl-icq", /**< id */
130 "ICQ", /**< name */
131 DISPLAY_VERSION, /**< version */
132 /** summary */
133 N_("ICQ Protocol Plugin"),
134 /** description */
135 N_("ICQ Protocol Plugin"),
136 NULL, /**< author */
137 PURPLE_WEBSITE, /**< homepage */
139 NULL, /**< load */
140 NULL, /**< unload */
141 NULL, /**< destroy */
143 NULL, /**< ui_info */
144 &prpl_info, /**< extra_info */
145 NULL,
146 oscar_actions,
148 /* padding */
149 NULL,
150 NULL,
151 NULL,
152 NULL
155 static void
156 init_plugin(PurplePlugin *plugin)
158 PurpleAccountOption *option;
160 oscar_init(plugin, TRUE);
162 option = purple_account_option_string_new(_("Encoding"), "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
163 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
166 PURPLE_INIT_PLUGIN(icq, init_plugin, info);