annotate libgaim/protocols/oscar/oscarcommon.h @ 15060:17e367667cbf

[gaim-migrate @ 17844] On win32, use the current locale charset as the default fallback for oscar. Sean suggested this, it is based on the idea that you're likely to be talking people using a similar locale to you - so if they are using an ICQ client that just sends it in the current locale encoding, it will just work. For the en_US locale, this becomes the "CP1252" encoding. I also removed some duplicate definitions. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 29 Nov 2006 05:27:49 +0000
parents ad564b48dab0
children b81e4e44b509
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14968
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /* gaim
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 *
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * Gaim is the legal property of its developers, whose names are too numerous
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 * source distribution.
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 *
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * (at your option) any later version.
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 *
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * GNU General Public License for more details.
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 *
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 *
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 */
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 /* oscarcommon.h contains prototypes for the prpl functions used by libaim.c
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 * and libicq.c
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 */
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "accountopt.h"
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 #include "internal.h"
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 #include "prpl.h"
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include "version.h"
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 #define OSCAR_DEFAULT_LOGIN_SERVER "login.oscar.aol.com"
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 #define OSCAR_DEFAULT_LOGIN_PORT 5190
15060
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
34 #ifndef _WIN32
14968
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 #define OSCAR_DEFAULT_CUSTOM_ENCODING "ISO-8859-1"
15060
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
36 #else
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
37 #define OSCAR_DEFAULT_CUSTOM_ENCODING oscar_get_locale_charset()
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
38 #endif
14968
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 #define OSCAR_DEFAULT_AUTHORIZATION TRUE
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 #define OSCAR_DEFAULT_HIDE_IP TRUE
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 #define OSCAR_DEFAULT_WEB_AWARE FALSE
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 #define OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY FALSE
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
15060
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
44 #ifdef _WIN32
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
45 const char *oscar_get_locale_charset(void);
17e367667cbf [gaim-migrate @ 17844]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14968
diff changeset
46 #endif
14968
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 const char *oscar_list_icon_icq(GaimAccount *a, GaimBuddy *b);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 const char *oscar_list_icon_aim(GaimAccount *a, GaimBuddy *b);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 void oscar_list_emblems(GaimBuddy *b, const char **se, const char **sw, const char **nw, const char **ne);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50 char *oscar_status_text(GaimBuddy *b);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 void oscar_tooltip_text(GaimBuddy *b, GString *str, gboolean full);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 GList *oscar_status_types(GaimAccount *account);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 GList *oscar_blist_node_menu(GaimBlistNode *node);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 GList *oscar_chat_info(GaimConnection *gc);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 GHashTable *oscar_chat_info_defaults(GaimConnection *gc, const char *chat_name);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 void oscar_login(GaimAccount *account);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 void oscar_close(GaimConnection *gc);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 int oscar_send_im(GaimConnection *gc, const char *name, const char *message, GaimMessageFlags imflags);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 void oscar_set_info(GaimConnection *gc, const char *rawinfo);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 unsigned int oscar_send_typing(GaimConnection *gc, const char *name, GaimTypingState state);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 void oscar_get_info(GaimConnection *gc, const char *name);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 void oscar_set_status(GaimAccount *account, GaimStatus *status);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 void oscar_set_idle(GaimConnection *gc, int time);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 void oscar_change_passwd(GaimConnection *gc, const char *old, const char *new);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 void oscar_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 void oscar_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 void oscar_add_permit(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 void oscar_add_deny(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 void oscar_rem_permit(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 void oscar_rem_deny(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 void oscar_set_permit_deny(GaimConnection *gc);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 void oscar_join_chat(GaimConnection *gc, GHashTable *data);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 char *oscar_get_chat_name(GHashTable *data);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 void oscar_chat_invite(GaimConnection *gc, int id, const char *message, const char *name);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 void oscar_chat_leave(GaimConnection *gc, int id);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 int oscar_send_chat(GaimConnection *gc, int id, const char *message, GaimMessageFlags flags);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 void oscar_keepalive(GaimConnection *gc);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 void oscar_alias_buddy(GaimConnection *gc, const char *name, const char *alias);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 void oscar_move_buddy(GaimConnection *gc, const char *name, const char *old_group, const char *new_group);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 void oscar_rename_group(GaimConnection *gc, const char *old_name, GaimGroup *group, GList *moved_buddies);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 void oscar_convo_closed(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 const char *oscar_normalize(const GaimAccount *account, const char *str);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 void oscar_set_icon(GaimConnection *gc, const char *iconfile);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 gboolean oscar_can_receive_file(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 void oscar_send_file(GaimConnection *gc, const char *who, const char *file);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 GaimXfer *oscar_new_xfer(GaimConnection *gc, const char *who);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 gboolean oscar_offline_message(const GaimBuddy *buddy);
ad564b48dab0 [gaim-migrate @ 17747]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 GList *oscar_actions(GaimPlugin *plugin, gpointer context);