annotate src/prpl.h @ 4349:0c68d402f59f

[gaim-migrate @ 4614] XML Blist Gaim stores all the buddy lists in one big happy file now. You can order the buddies however you want, and they'll stay ordered that way. We can also store some per-buddy information now, which will be cool. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 19 Jan 2003 22:16:52 +0000
parents cc2f780c0505
children 3196d9044a45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /*
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 * gaim
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * (at your option) any later version.
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * GNU General Public License for more details.
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 */
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
22 /* this file should be all that prpls need to include. therefore, by including
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
23 * this file, they should get glib, proxy, gaim_connection, prpl, etc. */
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
25 #ifndef _PRPL_H_
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
26 #define _PRPL_H_
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
27
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
28 #include "core.h"
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
29 #include "proxy.h"
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 #include "multi.h"
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 #define PROTO_TOC 0
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 #define PROTO_OSCAR 1
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 #define PROTO_YAHOO 2
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 #define PROTO_ICQ 3
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 #define PROTO_MSN 4
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 #define PROTO_IRC 5
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 #define PROTO_FTP 6
1003
f8f7f3ed2edb [gaim-migrate @ 1013]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1000
diff changeset
39 #define PROTO_VGATE 7
1083
12478dd1e9d7 [gaim-migrate @ 1093]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1075
diff changeset
40 #define PROTO_JABBER 8
1318
4d4fef0928ce [gaim-migrate @ 1328]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1083
diff changeset
41 #define PROTO_NAPSTER 9
1626
59c7e7831ccd [gaim-migrate @ 1636]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1500
diff changeset
42 #define PROTO_ZEPHYR 10
2283
d783c3d5a307 [gaim-migrate @ 2293]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2275
diff changeset
43 #define PROTO_GADUGADU 11
3779
ade87dac671f [gaim-migrate @ 3919]
Sean Egan <seanegan@gmail.com>
parents: 3730
diff changeset
44 #define PROTO_SAMETIME 12
4219
1c57051bf64b [gaim-migrate @ 4463]
Sean Egan <seanegan@gmail.com>
parents: 4216
diff changeset
45 #define PROTO_TLEN 13
1c57051bf64b [gaim-migrate @ 4463]
Sean Egan <seanegan@gmail.com>
parents: 4216
diff changeset
46 #define PROTO_RVP 14
1c57051bf64b [gaim-migrate @ 4463]
Sean Egan <seanegan@gmail.com>
parents: 4216
diff changeset
47 #define PROTO_BACKRUB 15
1c57051bf64b [gaim-migrate @ 4463]
Sean Egan <seanegan@gmail.com>
parents: 4216
diff changeset
48 #define PROTO_UNTAKEN 16
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
49
3044
e68e2ba82310 [gaim-migrate @ 3057]
Sean Egan <seanegan@gmail.com>
parents: 3035
diff changeset
50 /* DON'T TAKE AN UNASSIGNED NUMBER! Talk to Rob or Sean if you'd like
2059
0b3d7233a356 [gaim-migrate @ 2069]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2050
diff changeset
51 * to create a new PRPL. */
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52
2162
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
53 #define PRPL_DESC(x) "Allows gaim to use the " x " protocol.\n\n" \
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
54 "Now that you have loaded this protocol, use the " \
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
55 "Account Editor to add an account that uses this " \
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
56 "protocol. You can access the Account Editor from " \
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
57 "the \"Accounts\" button on the login window or " \
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
58 "in the \"Tools\" menu in the buddy list window."
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
59
1878
75643b9f4261 [gaim-migrate @ 1888]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1815
diff changeset
60 #define DEFAULT_PROTO PROTO_OSCAR
75643b9f4261 [gaim-migrate @ 1888]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1815
diff changeset
61
1772
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
62 /* These should all be stuff that some plugins can do and others can't */
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
63 /* TOC/Oscar send HTML-encoded messages; most other protocols don't */
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2681
diff changeset
64 /* #define OPT_PROTO_HTML 0x00000001 this should be per-connection */
1772
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
65 /* TOC/Oscar have signon time, and the server's time needs to be adjusted to match
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
66 * your computer's time. We wouldn't need this if everyone used NTP. */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
67 #define OPT_PROTO_CORRECT_TIME 0x00000002
1772
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
68 /* Jabber lets you choose what name you want for chat. So it shouldn't be pulling
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
69 * the alias for when you're in chat; it gets annoying. */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
70 #define OPT_PROTO_UNIQUE_CHATNAME 0x00000004
1772
896432d66303 [gaim-migrate @ 1782]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1769
diff changeset
71 /* IRC, Jabber let you have chat room topics */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
72 #define OPT_PROTO_CHAT_TOPIC 0x00000008
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
73 /* Zephyr doesn't require passwords, so there's no need for a password prompt */
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
74 #define OPT_PROTO_NO_PASSWORD 0x00000010
2153
0befa2d2e540 [gaim-migrate @ 2163]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2123
diff changeset
75 /* MSN and Yahoo notify you when you have new mail */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
76 #define OPT_PROTO_MAIL_CHECK 0x00000020
2411
123aaa84109a [gaim-migrate @ 2424]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2334
diff changeset
77 /* Oscar and Jabber have buddy icons */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
78 #define OPT_PROTO_BUDDY_ICON 0x00000040
3044
e68e2ba82310 [gaim-migrate @ 3057]
Sean Egan <seanegan@gmail.com>
parents: 3035
diff changeset
79 /* Oscar lets you send images in direct IMs */
3789
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
80 #define OPT_PROTO_IM_IMAGE 0x00000080
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
81 /* Passwords in IRC are optional, and are needed for certain functionality. */
fb519383a058 [gaim-migrate @ 3929]
Rob Flynn <gaim@robflynn.com>
parents: 3779
diff changeset
82 #define OPT_PROTO_PASSWORD_OPTIONAL 0x00000100
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1355
diff changeset
83
1401
bf041349b11e [gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1370
diff changeset
84 #define GAIM_AWAY_CUSTOM "Custom"
bf041349b11e [gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1370
diff changeset
85
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
86 typedef void (*proto_init)(struct prpl *);
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
87
3609
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
88 struct file_transfer;
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
89
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 struct prpl {
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 int protocol;
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1355
diff changeset
92 int options;
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
93 struct gaim_plugin *plug;
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
94 char *name;
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95
2231
8c4ff1a368bd [gaim-migrate @ 2241]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2205
diff changeset
96 /* for ICQ and Yahoo, who have off/on per-conversation options */
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2681
diff changeset
97 /* char *checkbox; this should be per-connection */
2231
8c4ff1a368bd [gaim-migrate @ 2241]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2205
diff changeset
98
1032
643a4d81c18a [gaim-migrate @ 1042]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1030
diff changeset
99 /* returns the XPM associated with the given user class */
1030
38452403563b [gaim-migrate @ 1040]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1003
diff changeset
100 char **(* list_icon)(int);
2501
227cc42ffa6e [gaim-migrate @ 2514]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
101 GList *(* away_states)(struct gaim_connection *gc);
4333
cc2f780c0505 [gaim-migrate @ 4597]
Mark Doliner <mark@kingant.net>
parents: 4269
diff changeset
102 GList *(* actions)(struct gaim_connection *gc);
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
103 /* user_opts is a GList* of g_malloc'd struct proto_user_opts */
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
104 GList *user_opts;
2170
c24595d3c364 [gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2167
diff changeset
105 GList *(* buddy_menu)(struct gaim_connection *, char *);
3313
b0d5ce77f7dd [gaim-migrate @ 3331]
Jim Seymour <jseymour>
parents: 3136
diff changeset
106 GList *(* edit_buddy_menu)(struct gaim_connection *, char *);
2205
cff4fbe01c7b [gaim-migrate @ 2215]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2191
diff changeset
107 GList *(* chat_info)(struct gaim_connection *);
1333
b332d8f46b84 [gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1318
diff changeset
108
b332d8f46b84 [gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1318
diff changeset
109 /* all the server-related functions */
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
110
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
111 /* a lot of these (like get_dir) are protocol-dependent and should be removed. ones like
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
112 * set_dir (which is also protocol-dependent) can stay though because there's a dialog
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
113 * (i.e. the prpl says you can set your dir info, the ui shows a dialog and needs to call
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
114 * set_dir in order to set it) */
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
115
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116 void (* login) (struct aim_user *);
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
117 void (* close) (struct gaim_connection *);
3033
1143524a2eaf [gaim-migrate @ 3046]
Sean Egan <seanegan@gmail.com>
parents: 3001
diff changeset
118 int (* send_im) (struct gaim_connection *, char *who, char *message, int len, int away);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 void (* set_info) (struct gaim_connection *, char *info);
3001
87fff45fa36b [gaim-migrate @ 3014]
Sean Egan <seanegan@gmail.com>
parents: 2993
diff changeset
120 int (* send_typing) (struct gaim_connection *, char *name, int typing);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 void (* get_info) (struct gaim_connection *, char *who);
1401
bf041349b11e [gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1370
diff changeset
122 void (* set_away) (struct gaim_connection *, char *state, char *message);
2773
a0fd8f91e294 [gaim-migrate @ 2786]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2706
diff changeset
123 void (* get_away) (struct gaim_connection *, char *who);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
124 void (* set_dir) (struct gaim_connection *, const char *first,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
125 const char *middle,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
126 const char *last,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
127 const char *maiden,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
128 const char *city,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
129 const char *state,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
130 const char *country,
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131 int web);
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 void (* get_dir) (struct gaim_connection *, char *who);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
133 void (* dir_search) (struct gaim_connection *, const char *first,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
134 const char *middle,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
135 const char *last,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
136 const char *maiden,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
137 const char *city,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
138 const char *state,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
139 const char *country,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
140 const char *email);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
141 void (* set_idle) (struct gaim_connection *, int idletime);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
142 void (* change_passwd) (struct gaim_connection *, const char *old, const char *new);
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
143 void (* add_buddy) (struct gaim_connection *, const char *name);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 void (* add_buddies) (struct gaim_connection *, GList *buddies);
2681
37d80035e77f [gaim-migrate @ 2694]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2607
diff changeset
145 void (* remove_buddy) (struct gaim_connection *, char *name, char *group);
3867
43e396e94095 [gaim-migrate @ 4019]
Rob Flynn <gaim@robflynn.com>
parents: 3789
diff changeset
146 void (* remove_buddies) (struct gaim_connection *, GList *buddies, const char *group);
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
147 void (* add_permit) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
148 void (* add_deny) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
149 void (* rem_permit) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
150 void (* rem_deny) (struct gaim_connection *, const char *name);
1038
daad2440a642 [gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1032
diff changeset
151 void (* set_permit_deny)(struct gaim_connection *);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 void (* warn) (struct gaim_connection *, char *who, int anonymous);
2205
cff4fbe01c7b [gaim-migrate @ 2215]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2191
diff changeset
153 void (* join_chat) (struct gaim_connection *, GList *data);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
154 void (* chat_invite) (struct gaim_connection *, int id, const char *who, const char *message);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
155 void (* chat_leave) (struct gaim_connection *, int id);
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
156 void (* chat_whisper) (struct gaim_connection *, int id, char *who, char *message);
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2162
diff changeset
157 int (* chat_send) (struct gaim_connection *, int id, char *message);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
158 void (* keepalive) (struct gaim_connection *);
1713
14caa7df478c [gaim-migrate @ 1723]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1626
diff changeset
159
2827
51999a36c0b1 [gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2773
diff changeset
160 /* new user registration */
2956
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
161 void (* register_user) (struct aim_user *);
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
162
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
163 /* get "chat buddy" info and away message */
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
164 void (* get_cb_info) (struct gaim_connection *, int, char *who);
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
165 void (* get_cb_away) (struct gaim_connection *, int, char *who);
2827
51999a36c0b1 [gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2773
diff changeset
166
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
167 /* save/store buddy's alias on server list/roster */
4269
ff0642fab1d5 [gaim-migrate @ 4520]
Mark Doliner <mark@kingant.net>
parents: 4249
diff changeset
168 void (* alias_buddy) (struct gaim_connection *, const char *who, const char *alias);
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
169
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
170 /* change a buddy's group on a server list/roster */
3867
43e396e94095 [gaim-migrate @ 4019]
Rob Flynn <gaim@robflynn.com>
parents: 3789
diff changeset
171 void (* group_buddy) (struct gaim_connection *, const char *who, const char *old_group, const char *new_group);
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
172
3348
dd34e0b40fed [gaim-migrate @ 3367]
Jim Seymour <jseymour>
parents: 3313
diff changeset
173 /* rename a group on a server list/roster */
3867
43e396e94095 [gaim-migrate @ 4019]
Rob Flynn <gaim@robflynn.com>
parents: 3789
diff changeset
174 void (* rename_group) (struct gaim_connection *, const char *old_group, const char *new_group, GList *members);
3348
dd34e0b40fed [gaim-migrate @ 3367]
Jim Seymour <jseymour>
parents: 3313
diff changeset
175
2607
e0d4a23aac89 [gaim-migrate @ 2620]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2582
diff changeset
176 void (* buddy_free) (struct buddy *);
e0d4a23aac89 [gaim-migrate @ 2620]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2582
diff changeset
177
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
178 /* this is really bad. */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2232
diff changeset
179 void (* convo_closed) (struct gaim_connection *, char *who);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2232
diff changeset
180
1713
14caa7df478c [gaim-migrate @ 1723]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1626
diff changeset
181 char *(* normalize)(const char *);
3609
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
182
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
183 /* transfer files */
4108
274cb26ba8dc [gaim-migrate @ 4323]
Luke Schierer <lschiere@pidgin.im>
parents: 4044
diff changeset
184 void (* file_transfer_cancel) (struct gaim_connection *, struct file_transfer *);
274cb26ba8dc [gaim-migrate @ 4323]
Luke Schierer <lschiere@pidgin.im>
parents: 4044
diff changeset
185 void (* file_transfer_in) (struct gaim_connection *, struct file_transfer *, int);
274cb26ba8dc [gaim-migrate @ 4323]
Luke Schierer <lschiere@pidgin.im>
parents: 4044
diff changeset
186 void (* file_transfer_out) (struct gaim_connection *, struct file_transfer *, const char *, int, int);
274cb26ba8dc [gaim-migrate @ 4323]
Luke Schierer <lschiere@pidgin.im>
parents: 4044
diff changeset
187 void (* file_transfer_nextfile) (struct gaim_connection *, struct file_transfer *);
3609
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
188 void (* file_transfer_data_chunk)(struct gaim_connection *, struct file_transfer *, const char *, int);
4108
274cb26ba8dc [gaim-migrate @ 4323]
Luke Schierer <lschiere@pidgin.im>
parents: 4044
diff changeset
189 void (* file_transfer_done) (struct gaim_connection *, struct file_transfer *);
4150
1bd663beada5 [gaim-migrate @ 4369]
Rob Flynn <gaim@robflynn.com>
parents: 4108
diff changeset
190 size_t (* file_transfer_read) (struct gaim_connection *, struct file_transfer *, int fd, char **buf);
1bd663beada5 [gaim-migrate @ 4369]
Rob Flynn <gaim@robflynn.com>
parents: 4108
diff changeset
191 size_t (* file_transfer_write) (struct gaim_connection *, struct file_transfer *, int fd, const char *buf, size_t size);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
192 };
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
193
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
194 extern GSList *protocols;
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3609
diff changeset
195 extern int prpl_accounts[];
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
196
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
197 /* this is mostly just for aim.c, when it initializes the protocols */
2189
dca8e00d7de0 [gaim-migrate @ 2199]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2170
diff changeset
198 extern void static_proto_init();
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
199
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
200 /* this is what should actually load the protocol. pass it the protocol's initializer */
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
201 extern gboolean load_prpl(struct prpl *);
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
202 extern void load_protocol(proto_init);
2189
dca8e00d7de0 [gaim-migrate @ 2199]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2170
diff changeset
203 extern void unload_protocol(struct prpl *);
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
204 extern gint proto_compare(struct prpl *, struct prpl *);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
205
2189
dca8e00d7de0 [gaim-migrate @ 2199]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2170
diff changeset
206 extern struct prpl *find_prpl(int);
dca8e00d7de0 [gaim-migrate @ 2199]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2170
diff changeset
207 extern void do_proto_menu();
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
208
2582
5efa8077107f [gaim-migrate @ 2595]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2541
diff changeset
209 extern void show_got_added(struct gaim_connection *, const char *,
5efa8077107f [gaim-migrate @ 2595]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2541
diff changeset
210 const char *, const char *, const char *);
5efa8077107f [gaim-migrate @ 2595]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2541
diff changeset
211
4249
9c7fcb211886 [gaim-migrate @ 4499]
Mark Doliner <mark@kingant.net>
parents: 4245
diff changeset
212 extern void do_ask_cancel_by_handle(GModule *);
9c7fcb211886 [gaim-migrate @ 4499]
Mark Doliner <mark@kingant.net>
parents: 4245
diff changeset
213 extern void do_ask_dialog(const char *, const char *, void *, char*, void *, char *, void *, GModule *, gboolean);
2541
8229710b343b [gaim-migrate @ 2554]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2501
diff changeset
214 extern void do_prompt_dialog(const char *, const char *, void *, void *, void *);
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
215
2541
8229710b343b [gaim-migrate @ 2554]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2501
diff changeset
216 extern void connection_has_mail(struct gaim_connection *, int, const char *, const char *, const char *);
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
217
2191
657dbe515608 [gaim-migrate @ 2201]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2189
diff changeset
218 extern void set_icon_data(struct gaim_connection *, char *, void *, int);
657dbe515608 [gaim-migrate @ 2201]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2189
diff changeset
219 extern void *get_icon_data(struct gaim_connection *, char *, int *);
657dbe515608 [gaim-migrate @ 2201]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2189
diff changeset
220
3609
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
221 /* file transfer stuff */
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
222 extern struct file_transfer *transfer_in_add(struct gaim_connection *gc,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
223 const char *who, const char *filename, int totsize,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
224 int totfiles, const char *msg);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
225 extern struct file_transfer *transfer_out_add(struct gaim_connection *gc,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
226 const char *who);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
227 extern int transfer_abort(struct file_transfer *xfer, const char *why);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
228 extern int transfer_out_do(struct file_transfer *xfer, int fd,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
229 int offset);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
230 extern int transfer_in_do(struct file_transfer *xfer, int fd,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
231 const char *filename, int size);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
232 int transfer_get_file_info(struct file_transfer *xfer, int *size,
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
233 char **name);
4faf84dfdda2 [gaim-migrate @ 3722]
Rob Flynn <gaim@robflynn.com>
parents: 3572
diff changeset
234
4040
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
235 /* stuff to load/unload PRPLs as necessary */
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
236 extern gboolean ref_protocol(struct prpl *p);
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
237 extern void unref_protocol(struct prpl *p);
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
238
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
239 #endif /* _PRPL_H_ */