Sun, 18 Aug 2013 00:04:13 +0530
Replaced some _prpl_ stuff with _protocol_
| 15884 | 1 | /* purple |
| 15030 | 2 | * |
| 15884 | 3 | * Purple is the legal property of its developers, whose names are too numerous |
| 15030 | 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19050
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 15030 | 20 | * |
| 21 | */ | |
| 22 | ||
| 30402 | 23 | /* libaim is the AIM protocol plugin. It is linked against liboscar, |
| 15030 | 24 | * which contains all the shared implementation code with libicq |
| 25 | */ | |
| 26 | ||
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
27 | #include "plugins.h" |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
28 | |
| 15030 | 29 | #include "oscarcommon.h" |
|
30653
51232ce91abe
Fixed a bug I accidentally introduced in 941f22b19796f2de0db109ede035a60d4f3c2661.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30402
diff
changeset
|
30 | #include "oscar.h" |
| 15030 | 31 | |
|
36544
1bf8b6ef5aea
Renamed PurplePluginProtocolInfo to PurpleProtocol
Ankit Vani <a@nevitus.org>
parents:
36536
diff
changeset
|
32 | static PurpleProtocol protocol = |
| 15030 | 33 | { |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
34 | "prpl-aim", /* id */ |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
35 | "AIM", /* name */ |
|
36544
1bf8b6ef5aea
Renamed PurplePluginProtocolInfo to PurpleProtocol
Ankit Vani <a@nevitus.org>
parents:
36536
diff
changeset
|
36 | sizeof(PurpleProtocol), /* struct_size */ |
|
33696
b210b3afb63d
Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32338
diff
changeset
|
37 | OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE | OPT_PROTO_INVITE_MESSAGE | OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE, |
| 15030 | 38 | NULL, /* user_splits */ |
| 39 | NULL, /* protocol_options */ | |
|
31806
c9a9c04947a4
Fix setting icons with dimensions greater than 64x64 pixels by scaling
Mark Doliner <markdoliner@pidgin.im>
parents:
31599
diff
changeset
|
40 | {"gif,jpeg,bmp,ico", 0, 0, 64, 64, 7168, PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */ |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
41 | oscar_get_actions, /* get_actions */ |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
42 | oscar_list_icon_aim, /* list_icon */ |
| 15524 | 43 | oscar_list_emblem, /* list_emblems */ |
| 15030 | 44 | oscar_status_text, /* status_text */ |
| 45 | oscar_tooltip_text, /* tooltip_text */ | |
| 46 | oscar_status_types, /* status_types */ | |
| 47 | oscar_blist_node_menu, /* blist_node_menu */ | |
| 48 | oscar_chat_info, /* chat_info */ | |
| 49 | oscar_chat_info_defaults, /* chat_info_defaults */ | |
| 50 | oscar_login, /* login */ | |
| 51 | oscar_close, /* close */ | |
| 52 | oscar_send_im, /* send_im */ | |
| 53 | oscar_set_info, /* set_info */ | |
| 54 | oscar_send_typing, /* send_typing */ | |
| 55 | oscar_get_info, /* get_info */ | |
| 56 | oscar_set_status, /* set_status */ | |
| 57 | oscar_set_idle, /* set_idle */ | |
| 58 | oscar_change_passwd, /* change_passwd */ | |
|
32315
2550a39e0285
Rename the _with_invite functions to their counterparts.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31806
diff
changeset
|
59 | oscar_add_buddy, /* add_buddy */ |
| 15030 | 60 | NULL, /* add_buddies */ |
| 61 | oscar_remove_buddy, /* remove_buddy */ | |
| 62 | NULL, /* remove_buddies */ | |
| 63 | oscar_add_permit, /* add_permit */ | |
| 64 | oscar_add_deny, /* add_deny */ | |
| 65 | oscar_rem_permit, /* rem_permit */ | |
| 66 | oscar_rem_deny, /* rem_deny */ | |
|
30653
51232ce91abe
Fixed a bug I accidentally introduced in 941f22b19796f2de0db109ede035a60d4f3c2661.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30402
diff
changeset
|
67 | oscar_set_aim_permdeny, /* set_permit_deny */ |
| 15030 | 68 | oscar_join_chat, /* join_chat */ |
| 69 | NULL, /* reject_chat */ | |
| 70 | oscar_get_chat_name, /* get_chat_name */ | |
| 71 | oscar_chat_invite, /* chat_invite */ | |
| 72 | oscar_chat_leave, /* chat_leave */ | |
| 73 | NULL, /* chat_whisper */ | |
| 74 | oscar_send_chat, /* chat_send */ | |
| 75 | oscar_keepalive, /* keepalive */ | |
| 76 | NULL, /* register_user */ | |
| 77 | NULL, /* get_cb_info */ | |
| 78 | oscar_alias_buddy, /* alias_buddy */ | |
| 79 | oscar_move_buddy, /* group_buddy */ | |
| 80 | oscar_rename_group, /* rename_group */ | |
| 81 | NULL, /* buddy_free */ | |
| 82 | oscar_convo_closed, /* convo_closed */ | |
| 83 | oscar_normalize, /* normalize */ | |
| 84 | oscar_set_icon, /* set_buddy_icon */ | |
|
19050
78ed2f8cd58d
Some changes from Matthew Goldstein and I to not automatically remove
Mark Doliner <markdoliner@pidgin.im>
parents:
16746
diff
changeset
|
85 | oscar_remove_group, /* remove_group */ |
| 15030 | 86 | NULL, /* get_cb_real_name */ |
| 87 | NULL, /* set_chat_topic */ | |
| 88 | NULL, /* find_blist_chat */ | |
| 89 | NULL, /* roomlist_get_list */ | |
| 90 | NULL, /* roomlist_cancel */ | |
| 91 | NULL, /* roomlist_expand_category */ | |
| 92 | oscar_can_receive_file, /* can_receive_file */ | |
| 93 | oscar_send_file, /* send_file */ | |
| 94 | oscar_new_xfer, /* new_xfer */ | |
| 95 | oscar_offline_message, /* offline_message */ | |
|
36545
23b59a16c808
Replaced some _prpl_ stuff with _protocol_
Ankit Vani <a@nevitus.org>
parents:
36544
diff
changeset
|
96 | NULL, /* whiteboard_protocol_ops */ |
| 15185 | 97 | NULL, /* send_raw */ |
| 98 | NULL, /* roomlist_room_serialize */ | |
|
22244
221f48b173e3
Update some comments in oscar's prpl callback structs
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
99 | NULL, /* unregister_user */ |
|
221f48b173e3
Update some comments in oscar's prpl callback structs
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
100 | NULL, /* send_attention */ |
|
221f48b173e3
Update some comments in oscar's prpl callback structs
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
101 | NULL, /* get_attention_types */ |
|
23707
480f94157418
propagate from branch 'im.pidgin.pidgin' (head bd5f7f61d9349053ee4738efc0d17453f0574057)
Sadrul Habib Chowdhury <sadrul@pidgin.im>
diff
changeset
|
102 | NULL, /* get_account_text_table */ |
|
480f94157418
propagate from branch 'im.pidgin.pidgin' (head bd5f7f61d9349053ee4738efc0d17453f0574057)
Sadrul Habib Chowdhury <sadrul@pidgin.im>
diff
changeset
|
103 | NULL, /* initiate_media */ |
| 29756 | 104 | NULL, /* get_media_caps */ |
|
30138
cca9685df785
Add purple_account_[gs]et_public_alias functions, per discussion in d@cpi
Paul Aurich <darkrain42@pidgin.im>
parents:
29859
diff
changeset
|
105 | NULL, /* get_moods */ |
|
cca9685df785
Add purple_account_[gs]et_public_alias functions, per discussion in d@cpi
Paul Aurich <darkrain42@pidgin.im>
parents:
29859
diff
changeset
|
106 | NULL, /* set_public_alias */ |
|
32315
2550a39e0285
Rename the _with_invite functions to their counterparts.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31806
diff
changeset
|
107 | NULL /* get_public_alias */ |
| 15030 | 108 | }; |
| 109 | ||
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
110 | static PurplePluginInfo * |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
111 | plugin_query(GError **error) |
| 15030 | 112 | { |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
113 | return purple_plugin_info_new( |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
114 | "id", "prpl-aim", |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
115 | "name", "AIM", |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
116 | "version", DISPLAY_VERSION, |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
117 | "category", N_("Protocol"), |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
118 | "summary", N_("AIM Protocol Plugin"), |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
119 | "description", N_("AIM Protocol Plugin"), |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
120 | "website", PURPLE_WEBSITE, |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
121 | "abi-version", PURPLE_ABI_VERSION, |
| 36536 | 122 | "flags", GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL | |
| 123 | GPLUGIN_PLUGIN_INFO_FLAGS_LOAD_ON_QUERY, | |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
124 | NULL |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
125 | ); |
| 15030 | 126 | } |
| 127 | ||
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
128 | static gboolean |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
129 | plugin_load(PurplePlugin *plugin, GError **error) |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
130 | { |
|
36544
1bf8b6ef5aea
Renamed PurplePluginProtocolInfo to PurpleProtocol
Ankit Vani <a@nevitus.org>
parents:
36536
diff
changeset
|
131 | oscar_init(&protocol, FALSE); |
|
1bf8b6ef5aea
Renamed PurplePluginProtocolInfo to PurpleProtocol
Ankit Vani <a@nevitus.org>
parents:
36536
diff
changeset
|
132 | purple_protocols_add(&protocol); |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
133 | |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
134 | return TRUE; |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
135 | } |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
136 | |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
137 | static gboolean |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
138 | plugin_unload(PurplePlugin *plugin, GError **error) |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
139 | { |
|
36544
1bf8b6ef5aea
Renamed PurplePluginProtocolInfo to PurpleProtocol
Ankit Vani <a@nevitus.org>
parents:
36536
diff
changeset
|
140 | purple_protocols_remove(&protocol); |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
141 | |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
142 | return TRUE; |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
143 | } |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
144 | |
|
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
145 | PURPLE_PLUGIN_INIT(aim, plugin_query, plugin_load, plugin_unload); |