14968
|
1 /* gaim
|
|
2 *
|
|
3 * Gaim 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.
|
|
6 *
|
|
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.
|
|
11 *
|
|
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.
|
|
16 *
|
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20 *
|
|
21 */
|
|
22
|
|
23 /* libicq is the ICQ protocol plugin. It is linked against liboscarcommon,
|
|
24 * which contains all the shared implementation code with libaim
|
|
25 */
|
|
26
|
|
27
|
|
28 #include "oscarcommon.h"
|
|
29
|
|
30 static GaimPluginProtocolInfo prpl_info =
|
|
31 {
|
|
32 OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE,
|
|
33 NULL, /* user_splits */
|
|
34 NULL, /* protocol_options */
|
|
35 {"gif,jpeg,bmp,ico", 48, 48, 50, 50,
|
|
36 GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */
|
|
37 oscar_list_icon_icq, /* list_icon */
|
|
38 oscar_list_emblems, /* list_emblems */
|
|
39 oscar_status_text, /* status_text */
|
|
40 oscar_tooltip_text, /* tooltip_text */
|
|
41 oscar_status_types, /* status_types */
|
|
42 oscar_blist_node_menu, /* blist_node_menu */
|
|
43 oscar_chat_info, /* chat_info */
|
|
44 oscar_chat_info_defaults, /* chat_info_defaults */
|
|
45 oscar_login, /* login */
|
|
46 oscar_close, /* close */
|
|
47 oscar_send_im, /* send_im */
|
|
48 oscar_set_info, /* set_info */
|
|
49 oscar_send_typing, /* send_typing */
|
|
50 oscar_get_info, /* get_info */
|
|
51 oscar_set_status, /* set_status */
|
|
52 oscar_set_idle, /* set_idle */
|
|
53 oscar_change_passwd, /* change_passwd */
|
|
54 oscar_add_buddy, /* add_buddy */
|
|
55 NULL, /* add_buddies */
|
|
56 oscar_remove_buddy, /* remove_buddy */
|
|
57 NULL, /* remove_buddies */
|
|
58 oscar_add_permit, /* add_permit */
|
|
59 oscar_add_deny, /* add_deny */
|
|
60 oscar_rem_permit, /* rem_permit */
|
|
61 oscar_rem_deny, /* rem_deny */
|
|
62 oscar_set_permit_deny, /* set_permit_deny */
|
|
63 oscar_join_chat, /* join_chat */
|
|
64 NULL, /* reject_chat */
|
|
65 oscar_get_chat_name, /* get_chat_name */
|
|
66 oscar_chat_invite, /* chat_invite */
|
|
67 oscar_chat_leave, /* chat_leave */
|
|
68 NULL, /* chat_whisper */
|
|
69 oscar_send_chat, /* chat_send */
|
|
70 oscar_keepalive, /* keepalive */
|
|
71 NULL, /* register_user */
|
|
72 NULL, /* get_cb_info */
|
|
73 NULL, /* get_cb_away */
|
|
74 oscar_alias_buddy, /* alias_buddy */
|
|
75 oscar_move_buddy, /* group_buddy */
|
|
76 oscar_rename_group, /* rename_group */
|
|
77 NULL, /* buddy_free */
|
|
78 oscar_convo_closed, /* convo_closed */
|
|
79 oscar_normalize, /* normalize */
|
|
80 oscar_set_icon, /* set_buddy_icon */
|
|
81 NULL, /* remove_group */
|
|
82 NULL, /* get_cb_real_name */
|
|
83 NULL, /* set_chat_topic */
|
|
84 NULL, /* find_blist_chat */
|
|
85 NULL, /* roomlist_get_list */
|
|
86 NULL, /* roomlist_cancel */
|
|
87 NULL, /* roomlist_expand_category */
|
|
88 oscar_can_receive_file, /* can_receive_file */
|
|
89 oscar_send_file, /* send_file */
|
|
90 oscar_new_xfer, /* new_xfer */
|
|
91 oscar_offline_message, /* offline_message */
|
|
92 NULL, /* whiteboard_prpl_ops */
|
|
93 NULL, /* send_raw */
|
|
94 };
|
|
95
|
|
96 static GaimPluginInfo info =
|
|
97 {
|
|
98 GAIM_PLUGIN_MAGIC,
|
|
99 GAIM_MAJOR_VERSION,
|
|
100 GAIM_MINOR_VERSION,
|
|
101 GAIM_PLUGIN_PROTOCOL, /**< type */
|
|
102 NULL, /**< ui_requirement */
|
|
103 0, /**< flags */
|
|
104 NULL, /**< dependencies */
|
|
105 GAIM_PRIORITY_DEFAULT, /**< priority */
|
|
106
|
|
107 "prpl-icq", /**< id */
|
|
108 "ICQ", /**< name */
|
|
109 VERSION, /**< version */
|
|
110 /** summary */
|
|
111 N_("ICQ Protocol Plugin"),
|
|
112 /** description */
|
|
113 N_("ICQ Protocol Plugin"),
|
|
114 NULL, /**< author */
|
|
115 GAIM_WEBSITE, /**< homepage */
|
|
116
|
|
117 NULL, /**< load */
|
|
118 NULL, /**< unload */
|
|
119 NULL, /**< destroy */
|
|
120
|
|
121 NULL, /**< ui_info */
|
|
122 &prpl_info, /**< extra_info */
|
|
123 NULL,
|
|
124 oscar_actions
|
|
125 };
|
|
126
|
|
127 static void
|
|
128 init_plugin(GaimPlugin *plugin)
|
|
129 {
|
|
130 GaimAccountOption *option;
|
|
131
|
|
132 option = gaim_account_option_string_new(_("Server"), "server", OSCAR_DEFAULT_LOGIN_SERVER);
|
|
133 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
|
|
134
|
|
135 option = gaim_account_option_int_new(_("Port"), "port", OSCAR_DEFAULT_LOGIN_PORT);
|
|
136 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
|
|
137
|
|
138 option = gaim_account_option_string_new(_("Encoding"), "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
|
|
139 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
|
|
140
|
|
141 option = gaim_account_option_bool_new(
|
|
142 _("Always use ICQ proxy server for file transfers\n(slower, but does not reveal your IP address)"), "always_use_rv_proxy",
|
|
143 OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY);
|
|
144 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
|
|
145
|
|
146 /* Preferences */
|
|
147 gaim_prefs_add_none("/plugins/prpl/oscar");
|
|
148 gaim_prefs_add_bool("/plugins/prpl/oscar/recent_buddies", FALSE);
|
|
149 gaim_prefs_add_bool("/plugins/prpl/oscar/show_idle", FALSE);
|
|
150 gaim_prefs_remove("/plugins/prpl/oscar/always_use_rv_proxy");
|
|
151 }
|
|
152
|
|
153 GAIM_INIT_PLUGIN(oscar, init_plugin, info);
|