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