Mercurial > pidgin
annotate src/protocols/oscar/aim.h @ 4317:7c9f3d0fe8b2
[gaim-migrate @ 4571]
Eh, nothing really. Very minor clean up stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 16 Jan 2003 00:49:15 +0000 |
parents | 79d871c11eb9 |
children | cc2f780c0505 |
rev | line source |
---|---|
2086 | 1 /* |
2 * Main libfaim header. Must be included in client for prototypes/macros. | |
3 * | |
4 * "come on, i turned a chick lesbian; i think this is the hackish equivalent" | |
4194 | 5 * -- Josh Myer |
2086 | 6 * |
7 */ | |
8 | |
9 #ifndef __AIM_H__ | |
10 #define __AIM_H__ | |
11 | |
12 #define FAIM_VERSION_MAJOR 0 | |
13 #define FAIM_VERSION_MINOR 99 | |
14 #define FAIM_VERSION_MINORMINOR 1 | |
15 | |
16 #include <faimconfig.h> | |
17 #include <aim_cbtypes.h> | |
18 | |
19 #include <stdio.h> | |
20 #include <string.h> | |
21 #include <fcntl.h> | |
22 #include <sys/types.h> | |
23 #include <stdlib.h> | |
24 #include <stdarg.h> | |
25 #include <errno.h> | |
26 #include <time.h> | |
27 | |
3630 | 28 #ifndef _WIN32 |
2086 | 29 #include <sys/time.h> |
30 #include <unistd.h> | |
31 #include <netinet/in.h> | |
32 #include <sys/socket.h> | |
3630 | 33 #else |
34 #include <winsock.h> | |
2086 | 35 #endif |
36 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
37 /* XXX adjust these based on autoconf-detected platform */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
38 typedef unsigned char fu8_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
39 typedef unsigned short fu16_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
40 typedef unsigned long fu32_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
41 typedef fu32_t aim_snacid_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
42 typedef fu16_t flap_seqnum_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
43 |
2086 | 44 #if defined(mach) && defined(__APPLE__) |
45 #define gethostbyname(x) gethostbyname2(x, AF_INET) | |
46 #endif | |
47 | |
48 #if defined(_WIN32) || defined(STRICT_ANSI) | |
49 #define faim_shortfunc | |
50 #else | |
51 #define faim_shortfunc inline | |
52 #endif | |
53 | |
54 #if defined(_WIN32) && !defined(WIN32_STATIC) | |
55 /* | |
56 * For a win32 DLL, we define WIN32_INDLL if this file | |
57 * is included while compiling the DLL. If its not | |
58 * defined (its included in a client app), the symbols | |
59 * will be imported instead of exported. | |
60 */ | |
61 #ifdef WIN32_INDLL | |
62 #define faim_export __declspec(dllexport) | |
63 #else | |
64 #define faim_export __declspec(dllimport) | |
65 #endif /* WIN32_INDLL */ | |
66 #define faim_internal | |
67 #else | |
68 /* | |
69 * Nothing normally needed for unix... | |
70 */ | |
71 #define faim_export | |
72 #define faim_internal | |
73 #endif | |
74 | |
75 /* | |
76 * Current Maximum Length for Screen Names (not including NULL) | |
77 * | |
78 * Currently only names up to 16 characters can be registered | |
79 * however it is aparently legal for them to be larger. | |
80 */ | |
81 #define MAXSNLEN 32 | |
82 | |
83 /* | |
84 * Current Maximum Length for Instant Messages | |
85 * | |
86 * This was found basically by experiment, but not wholly | |
87 * accurate experiment. It should not be regarded | |
88 * as completely correct. But its a decent approximation. | |
89 * | |
90 * Note that although we can send this much, its impossible | |
91 * for WinAIM clients (up through the latest (4.0.1957)) to | |
92 * send any more than 1kb. Amaze all your windows friends | |
93 * with utterly oversized instant messages! | |
94 * | |
95 * XXX: the real limit is the total SNAC size at 8192. Fix this. | |
96 * | |
97 */ | |
98 #define MAXMSGLEN 7987 | |
99 | |
100 /* | |
101 * Maximum size of a Buddy Icon. | |
102 */ | |
103 #define MAXICONLEN 7168 | |
104 #define AIM_ICONIDENT "AVT1picture.id" | |
105 | |
106 /* | |
107 * Current Maximum Length for Chat Room Messages | |
108 * | |
109 * This is actually defined by the protocol to be | |
110 * dynamic, but I have yet to see due cause to | |
111 * define it dynamically here. Maybe later. | |
112 * | |
113 */ | |
114 #define MAXCHATMSGLEN 512 | |
115 | |
116 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" | |
117 | |
118 /* | |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
119 * Client info. Filled in by the client and passed in to |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
120 * aim_send_login(). The information ends up getting passed to OSCAR |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
121 * through the initial login command. |
2086 | 122 * |
123 */ | |
124 struct client_info_s { | |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
125 const char *clientstring; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
126 fu16_t clientid; |
4070 | 127 fu16_t major; |
128 fu16_t minor; | |
129 fu16_t point; | |
130 fu16_t build; | |
131 fu32_t distrib; | |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
132 const char *country; /* two-letter abbrev */ |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
133 const char *lang; /* two-letter abbrev */ |
2086 | 134 }; |
135 | |
4070 | 136 /* Needs to be checked */ |
3458 | 137 #define CLIENTINFO_AIM_3_5_1670 { \ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
138 "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \ |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
139 0x0004, \ |
4070 | 140 0x0003, 0x0005, \ |
141 0x0000, 0x0686, \ | |
142 0x0000002a, \ | |
143 "us", "en", \ | |
144 } | |
145 | |
146 /* Needs to be checked */ | |
147 /* Latest winaim without ssi */ | |
148 #define CLIENTINFO_AIM_4_1_2010 { \ | |
149 "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \ | |
150 0x0004, \ | |
151 0x0004, 0x0001, \ | |
152 0x0000, 0x07da, \ | |
153 0x0000004b, \ | |
154 "us", "en", \ | |
155 } | |
156 | |
157 /* Needs to be checked */ | |
158 #define CLIENTINFO_AIM_4_3_2188 { \ | |
159 "AOL Instant Messenger (SM), version 4.3.2188/WIN32", \ | |
160 0x0109, \ | |
161 0x0400, 0x0003, \ | |
162 0x0000, 0x088c, \ | |
163 0x00000086, \ | |
164 "us", "en", \ | |
2086 | 165 } |
166 | |
4070 | 167 /* Needs to be checked */ |
168 #define CLIENTINFO_AIM_4_8_2540 { \ | |
169 "AOL Instant Messenger (SM), version 4.8.2540/WIN32", \ | |
170 0x0109, \ | |
171 0x0004, 0x0008, \ | |
172 0x0000, 0x09ec, \ | |
173 0x000000af, \ | |
174 "us", "en", \ | |
2086 | 175 } |
176 | |
4070 | 177 /* Needs to be checked */ |
3595 | 178 #define CLIENTINFO_AIM_5_0_2938 { \ |
4070 | 179 "AOL Instant Messenger, version 5.0.2938/WIN32", \ |
180 0x0109, \ | |
181 0x0005, 0x0000, \ | |
182 0x0000, 0x0b7a, \ | |
183 0x00000000, \ | |
184 "us", "en", \ | |
3595 | 185 } |
186 | |
4070 | 187 #define CLIENTINFO_AIM_5_1_3036 { \ |
188 "AOL Instant Messenger, version 5.1.3036/WIN32", \ | |
189 0x0109, \ | |
190 0x0005, 0x0001, \ | |
191 0x0000, 0x0bdc, \ | |
192 0x000000d2, \ | |
193 "us", "en", \ | |
194 } | |
195 | |
196 /* Needs to be checked */ | |
3458 | 197 #define CLIENTINFO_ICQ_4_65_3281 { \ |
198 "ICQ Inc. - Product of ICQ (TM) 2000b.4.65.1.3281.85", \ | |
199 0x010a, \ | |
4070 | 200 0x0004, 0x0041, \ |
201 0x0001, 0x0cd1, \ | |
202 0x00000055, \ | |
203 "us", "en", \ | |
3458 | 204 } |
205 | |
4070 | 206 /* Needs to be checked */ |
3458 | 207 #define CLIENTINFO_ICQ_5_34_3728 { \ |
208 "ICQ Inc. - Product of ICQ (TM).2002a.5.34.1.3728.85", \ | |
209 0x010a, \ | |
4070 | 210 0x0005, 0x0022, \ |
211 0x0001, 0x0e8f, \ | |
212 0x00000055, \ | |
213 "us", "en", \ | |
3458 | 214 } |
215 | |
4071 | 216 #define CLIENTINFO_ICQ_5_45_3777 { \ |
4070 | 217 "ICQ Inc. - Product of ICQ (TM).2003a.5.45.1.3777.85", \ |
218 0x010a, \ | |
219 0x0005, 0x002d, \ | |
220 0x0001, 0x0ec1, \ | |
221 0x00000055, \ | |
222 "us", "en", \ | |
223 } | |
224 | |
225 #define CLIENTINFO_ICQBasic_14_3_1068 { \ | |
226 "ICQBasic", \ | |
227 0x010a, \ | |
228 0x0014, 0x0003, \ | |
229 0x0000, 0x042c, \ | |
230 0x0000043d, \ | |
231 "us", "en", \ | |
232 } | |
233 | |
4317 | 234 #define CLIENTINFO_Netscape_7_0_1 { \ |
235 "Netscape 2000 an approved user of AOL Instant Messenger (SM)", \ | |
236 0x1d0d, \ | |
237 0x0007, 0x0000, \ | |
238 0x0001, 0x0000, \ | |
239 0x00000058, \ | |
240 "us", "en", \ | |
241 } | |
242 | |
4071 | 243 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036 |
244 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777 | |
2086 | 245 |
246 #ifndef TRUE | |
247 #define TRUE 1 | |
248 #define FALSE 0 | |
249 #endif | |
250 | |
251 /* | |
252 * These could be arbitrary, but its easier to use the actual AIM values | |
253 */ | |
254 #define AIM_CONN_TYPE_AUTH 0x0007 | |
255 #define AIM_CONN_TYPE_ADS 0x0005 | |
256 #define AIM_CONN_TYPE_BOS 0x0002 | |
257 #define AIM_CONN_TYPE_CHAT 0x000e | |
258 #define AIM_CONN_TYPE_CHATNAV 0x000d | |
3952 | 259 #define AIM_CONN_TYPE_SEARCH 0x000f |
3694 | 260 #define AIM_CONN_TYPE_EMAIL 0x0018 |
2086 | 261 |
262 /* they start getting arbitrary in rendezvous stuff =) */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
263 #define AIM_CONN_TYPE_RENDEZVOUS 0x0101 /* these do not speak FLAP! */ |
2086 | 264 #define AIM_CONN_TYPE_RENDEZVOUS_OUT 0x0102 /* socket waiting for accept() */ |
265 | |
266 /* | |
267 * Subtypes, we need these for OFT stuff. | |
268 */ | |
269 #define AIM_CONN_SUBTYPE_OFT_DIRECTIM 0x0001 | |
270 #define AIM_CONN_SUBTYPE_OFT_GETFILE 0x0002 | |
271 #define AIM_CONN_SUBTYPE_OFT_SENDFILE 0x0003 | |
272 #define AIM_CONN_SUBTYPE_OFT_BUDDYICON 0x0004 | |
273 #define AIM_CONN_SUBTYPE_OFT_VOICE 0x0005 | |
274 | |
275 /* | |
276 * Status values returned from aim_conn_new(). ORed together. | |
277 */ | |
278 #define AIM_CONN_STATUS_READY 0x0001 | |
279 #define AIM_CONN_STATUS_INTERNALERR 0x0002 | |
280 #define AIM_CONN_STATUS_RESOLVERR 0x0040 | |
281 #define AIM_CONN_STATUS_CONNERR 0x0080 | |
282 #define AIM_CONN_STATUS_INPROGRESS 0x0100 | |
283 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
284 #define AIM_FRAMETYPE_FLAP 0x0000 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
285 #define AIM_FRAMETYPE_OFT 0x0001 |
2086 | 286 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
287 typedef struct aim_conn_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
288 int fd; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
289 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
290 fu16_t subtype; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
291 flap_seqnum_t seqnum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
292 fu32_t status; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
293 void *priv; /* misc data the client may want to store */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
294 void *internal; /* internal conn-specific libfaim data */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
295 time_t lastactivity; /* time of last transmit */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
296 int forcedlatency; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
297 void *handlerlist; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
298 void *sessv; /* pointer to parent session */ |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
299 void *inside; /* only accessible from inside libfaim */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
300 struct aim_conn_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
301 } aim_conn_t; |
2086 | 302 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
303 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
304 * Byte Stream type. Sort of. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
305 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
306 * Use of this type serves a couple purposes: |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
307 * - Buffer/buflen pairs are passed all around everywhere. This turns |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
308 * that into one value, as well as abstracting it slightly. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
309 * - Through the abstraction, it is possible to enable bounds checking |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
310 * for robustness at the cost of performance. But a clean failure on |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
311 * weird packets is much better than a segfault. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
312 * - I like having variables named "bs". |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
313 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
314 * Don't touch the insides of this struct. Or I'll have to kill you. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
315 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
316 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
317 typedef struct aim_bstream_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
318 fu8_t *data; |
3033 | 319 fu32_t len; |
320 fu32_t offset; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
321 } aim_bstream_t; |
2086 | 322 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
323 typedef struct aim_frame_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
324 fu8_t hdrtype; /* defines which piece of the union to use */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
325 union { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
326 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
327 fu8_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
328 flap_seqnum_t seqnum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
329 } flap; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
330 struct { |
3952 | 331 fu8_t magic[4]; /* ODC2 OFT2 */ |
332 fu16_t hdrlen; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
333 fu16_t type; |
3952 | 334 } rend; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
335 } hdr; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
336 aim_bstream_t data; /* payload stream */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
337 fu8_t handled; /* 0 = new, !0 = been handled */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
338 fu8_t nofree; /* 0 = free data on purge, 1 = only unlink */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
339 aim_conn_t *conn; /* the connection it came in on... */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
340 struct aim_frame_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
341 } aim_frame_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
342 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
343 typedef struct aim_msgcookie_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
344 unsigned char cookie[8]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
345 int type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
346 void *data; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
347 time_t addtime; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
348 struct aim_msgcookie_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
349 } aim_msgcookie_t; |
2086 | 350 |
351 /* | |
352 * AIM Session: The main client-data interface. | |
353 * | |
354 */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
355 typedef struct aim_session_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
356 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
357 /* ---- Client Accessible ------------------------ */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
358 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
359 /* Our screen name. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
360 char sn[MAXSNLEN+1]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
361 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
362 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
363 * Pointer to anything the client wants to |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
364 * explicitly associate with this session. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
365 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
366 * This is for use in the callbacks mainly. In any |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
367 * callback, you can access this with sess->aux_data. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
368 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
369 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
370 void *aux_data; |
2086 | 371 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
372 /* ---- Internal Use Only ------------------------ */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
373 |
2991 | 374 /* Server-stored information (ssi) */ |
375 struct { | |
376 int received_data; | |
4230 | 377 fu16_t numitems; |
378 struct aim_ssi_item *official; | |
379 struct aim_ssi_item *local; | |
380 struct aim_ssi_tmp *pending; | |
2991 | 381 time_t timestamp; |
382 int waiting_for_ack; | |
383 } ssi; | |
384 | |
4102 | 385 struct aim_authresp_info *authinfo; |
3694 | 386 struct aim_emailinfo *emailinfo; |
387 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
388 /* Connection information */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
389 aim_conn_t *connlist; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
390 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
391 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
392 * Transmit/receive queues. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
393 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
394 * These are only used when you don't use your own lowlevel |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
395 * I/O. I don't suggest that you use libfaim's internal I/O. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
396 * Its really bad and the API/event model is quirky at best. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
397 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
398 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
399 aim_frame_t *queue_outgoing; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
400 aim_frame_t *queue_incoming; |
2086 | 401 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
402 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
403 * Tx Enqueuing function. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
404 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
405 * This is how you override the transmit direction of libfaim's |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
406 * internal I/O. This function will be called whenever it needs |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
407 * to send something. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
408 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
409 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
410 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
411 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
412 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
413 * Outstanding snac handling |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
414 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
415 * XXX: Should these be per-connection? -mid |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
416 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
417 void *snac_hash[FAIM_SNAC_HASH_SIZE]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
418 aim_snacid_t snacid_next; |
2086 | 419 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
420 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
421 char server[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
422 char username[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
423 char password[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
424 } socksproxy; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
425 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
426 fu32_t flags; /* AIM_SESS_FLAGS_ */ |
2086 | 427 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
428 int debug; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
429 void (*debugcb)(struct aim_session_s *sess, int level, const char *format, va_list va); /* same as faim_debugging_callback_t */ |
2086 | 430 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
431 aim_msgcookie_t *msgcookies; |
2086 | 432 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
433 void *modlistv; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
434 } aim_session_t; |
2086 | 435 |
436 /* Values for sess->flags */ | |
2751
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
437 #define AIM_SESS_FLAGS_SNACLOGIN 0x00000001 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
438 #define AIM_SESS_FLAGS_XORLOGIN 0x00000002 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
439 #define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
440 #define AIM_SESS_FLAGS_DONTTIMEOUTONICBM 0x00000008 |
2086 | 441 |
2507
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
442 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
443 #define AIM_ICQ_STATE_NORMAL 0x00000000 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
444 #define AIM_ICQ_STATE_AWAY 0x00000001 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
445 #define AIM_ICQ_STATE_DND 0x00000002 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
446 #define AIM_ICQ_STATE_OUT 0x00000004 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
447 #define AIM_ICQ_STATE_BUSY 0x00000010 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
448 #define AIM_ICQ_STATE_CHAT 0x00000020 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
449 #define AIM_ICQ_STATE_INVISIBLE 0x00000100 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
450 #define AIM_ICQ_STATE_WEBAWARE 0x00010000 |
2507
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
451 |
2086 | 452 /* |
453 * AIM User Info, Standard Form. | |
454 */ | |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
455 typedef struct { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
456 char sn[MAXSNLEN+1]; |
3459 | 457 fu16_t warnlevel; /* evil percent * 10 (999 = 99.9%) */ |
458 fu16_t idletime; /* in seconds */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
459 fu16_t flags; |
3459 | 460 fu32_t createtime; /* time_t */ |
461 fu32_t membersince; /* time_t */ | |
462 fu32_t onlinesince; /* time_t */ | |
463 fu32_t sessionlen; /* in seconds */ | |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
464 fu32_t capabilities; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
465 struct { |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
466 fu32_t status; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
467 fu32_t ipaddr; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
468 fu8_t crap[0x25]; /* until we figure it out... */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
469 } icqinfo; |
2993 | 470 fu32_t present; |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
471 } aim_userinfo_t; |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
472 |
2993 | 473 #define AIM_USERINFO_PRESENT_FLAGS 0x00000001 |
474 #define AIM_USERINFO_PRESENT_MEMBERSINCE 0x00000002 | |
475 #define AIM_USERINFO_PRESENT_ONLINESINCE 0x00000004 | |
476 #define AIM_USERINFO_PRESENT_IDLE 0x00000008 | |
477 #define AIM_USERINFO_PRESENT_ICQEXTSTATUS 0x00000010 | |
478 #define AIM_USERINFO_PRESENT_ICQIPADDR 0x00000020 | |
479 #define AIM_USERINFO_PRESENT_ICQDATA 0x00000040 | |
480 #define AIM_USERINFO_PRESENT_CAPABILITIES 0x00000080 | |
481 #define AIM_USERINFO_PRESENT_SESSIONLEN 0x00000100 | |
3459 | 482 #define AIM_USERINFO_PRESENT_CREATETIME 0x00000200 |
2993 | 483 |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
484 faim_export const char *aim_userinfo_sn(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
485 faim_export fu16_t aim_userinfo_flags(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
486 faim_export fu16_t aim_userinfo_idle(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
487 faim_export float aim_userinfo_warnlevel(aim_userinfo_t *ui); |
3459 | 488 faim_export time_t aim_userinfo_createtime(aim_userinfo_t *ui); |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
489 faim_export time_t aim_userinfo_membersince(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
490 faim_export time_t aim_userinfo_onlinesince(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
491 faim_export fu32_t aim_userinfo_sessionlen(aim_userinfo_t *ui); |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
492 faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu32_t cap); |
2086 | 493 |
494 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ | |
495 #define AIM_FLAG_ADMINISTRATOR 0x0002 | |
496 #define AIM_FLAG_AOL 0x0004 | |
497 #define AIM_FLAG_OSCAR_PAY 0x0008 | |
498 #define AIM_FLAG_FREE 0x0010 | |
499 #define AIM_FLAG_AWAY 0x0020 | |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
500 #define AIM_FLAG_ICQ 0x0040 |
3079 | 501 #define AIM_FLAG_WIRELESS 0x0080 |
2315
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
502 #define AIM_FLAG_UNKNOWN100 0x0100 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
503 #define AIM_FLAG_UNKNOWN200 0x0200 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
504 #define AIM_FLAG_ACTIVEBUDDY 0x0400 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
505 #define AIM_FLAG_UNKNOWN800 0x0800 |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
506 #define AIM_FLAG_ABINTERNAL 0x1000 |
2086 | 507 |
508 #define AIM_FLAG_ALLUSERS 0x001f | |
509 | |
510 | |
511 #if defined(FAIM_INTERNAL) || defined(FAIM_NEED_TLV) | |
512 /* | |
513 * TLV handling | |
514 */ | |
515 | |
516 /* Generic TLV structure. */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
517 typedef struct aim_tlv_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
518 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
519 fu16_t length; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
520 fu8_t *value; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
521 } aim_tlv_t; |
2086 | 522 |
523 /* List of above. */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
524 typedef struct aim_tlvlist_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
525 aim_tlv_t *tlv; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
526 struct aim_tlvlist_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
527 } aim_tlvlist_t; |
2086 | 528 |
529 /* TLV-handling functions */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
530 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
531 #if 0 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
532 /* Very, very raw TLV handling. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
533 faim_internal int aim_puttlv_8(fu8_t *buf, const fu16_t t, const fu8_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
534 faim_internal int aim_puttlv_16(fu8_t *buf, const fu16_t t, const fu16_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
535 faim_internal int aim_puttlv_32(fu8_t *buf, const fu16_t t, const fu32_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
536 faim_internal int aim_puttlv_raw(fu8_t *buf, const fu16_t t, const fu16_t l, const fu8_t *v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
537 #endif |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
538 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
539 /* TLV list handling. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
540 faim_internal aim_tlvlist_t *aim_readtlvchain(aim_bstream_t *bs); |
3952 | 541 faim_internal aim_tlvlist_t *aim_readtlvchain_num(aim_bstream_t *bs, fu16_t num); |
4230 | 542 faim_internal aim_tlvlist_t *aim_readtlvchain_len(aim_bstream_t *bs, fu16_t len); |
543 faim_internal aim_tlvlist_t *aim_tlvlist_copy(aim_tlvlist_t *orig); | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
544 faim_internal void aim_freetlvchain(aim_tlvlist_t **list); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
545 faim_internal aim_tlv_t *aim_gettlv(aim_tlvlist_t *, fu16_t t, const int n); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
546 faim_internal char *aim_gettlv_str(aim_tlvlist_t *, const fu16_t t, const int n); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
547 faim_internal fu8_t aim_gettlv8(aim_tlvlist_t *list, const fu16_t type, const int num); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
548 faim_internal fu16_t aim_gettlv16(aim_tlvlist_t *list, const fu16_t t, const int n); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
549 faim_internal fu32_t aim_gettlv32(aim_tlvlist_t *list, const fu16_t t, const int n); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
550 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list); |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
551 faim_internal int aim_addtlvtochain8(aim_tlvlist_t **list, const fu16_t t, const fu8_t v); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
552 faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
553 faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
554 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v); |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
555 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu32_t caps); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
556 faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type); |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
557 faim_internal int aim_addtlvtochain_userinfo(aim_tlvlist_t **list, fu16_t type, aim_userinfo_t *ui); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
558 faim_internal int aim_addtlvtochain_frozentlvlist(aim_tlvlist_t **list, fu16_t type, aim_tlvlist_t **tl); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
559 faim_internal int aim_counttlvchain(aim_tlvlist_t **list); |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
560 faim_internal int aim_sizetlvchain(aim_tlvlist_t **list); |
2086 | 561 #endif /* FAIM_INTERNAL */ |
562 | |
563 /* | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
564 * Get command from connections |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
565 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
566 * aim_get_commmand() is the libfaim lowlevel I/O in the receive direction. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
567 * XXX Make this easily overridable. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
568 * |
2086 | 569 */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
570 faim_export int aim_get_command(aim_session_t *, aim_conn_t *); |
2086 | 571 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
572 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
573 * Dispatch commands that are in the rx queue. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
574 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
575 faim_export void aim_rxdispatch(aim_session_t *); |
2086 | 576 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
577 faim_export int aim_debugconn_sendconnect(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
578 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
579 faim_export int aim_logoff(aim_session_t *); |
2086 | 580 |
581 #if !defined(FAIM_INTERNAL) || defined(FAIM_INTERNAL_INSANE) | |
582 /* the library should never call aim_conn_kill */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
583 faim_export void aim_conn_kill(aim_session_t *sess, aim_conn_t **deadconn); |
2086 | 584 #endif |
585 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
586 typedef int (*aim_rxcallback_t)(aim_session_t *, aim_frame_t *, ...); |
2086 | 587 |
2704 | 588 struct aim_clientrelease { |
589 char *name; | |
590 fu32_t build; | |
591 char *url; | |
592 char *info; | |
593 }; | |
594 | |
595 struct aim_authresp_info { | |
596 char *sn; | |
597 fu16_t errorcode; | |
598 char *errorurl; | |
599 fu16_t regstatus; | |
600 char *email; | |
601 char *bosip; | |
4293 | 602 fu16_t cookielen; |
2704 | 603 fu8_t *cookie; |
3912 | 604 char *chpassurl; |
2704 | 605 struct aim_clientrelease latestrelease; |
606 struct aim_clientrelease latestbeta; | |
607 }; | |
608 | |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
609 /* Callback data for redirect. */ |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
610 struct aim_redirect_data { |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
611 fu16_t group; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
612 const char *ip; |
4293 | 613 fu16_t cookielen; |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
614 const fu8_t *cookie; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
615 struct { /* group == AIM_CONN_TYPE_CHAT */ |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
616 fu16_t exchange; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
617 const char *room; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
618 fu16_t instance; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
619 } chat; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
620 }; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
621 |
2672 | 622 faim_export int aim_clientready(aim_session_t *sess, aim_conn_t *conn); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
623 faim_export int aim_sendflapver(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
624 faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
625 faim_export int aim_send_login(aim_session_t *, aim_conn_t *, const char *, const char *, struct client_info_s *, const char *key); |
2086 | 626 faim_export int aim_encode_password_md5(const char *password, const char *key, unsigned char *digest); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
627 faim_export void aim_purge_rxqueue(aim_session_t *); |
2086 | 628 |
629 #define AIM_TX_QUEUED 0 /* default */ | |
630 #define AIM_TX_IMMEDIATE 1 | |
631 #define AIM_TX_USER 2 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
632 faim_export int aim_tx_setenqueue(aim_session_t *sess, int what, int (*func)(aim_session_t *, aim_frame_t *)); |
2086 | 633 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
634 faim_export int aim_tx_flushqueue(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
635 faim_export void aim_tx_purgequeue(aim_session_t *); |
2086 | 636 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
637 faim_export int aim_conn_setlatency(aim_conn_t *conn, int newval); |
2086 | 638 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
639 faim_export int aim_conn_addhandler(aim_session_t *, aim_conn_t *conn, u_short family, u_short type, aim_rxcallback_t newhandler, u_short flags); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
640 faim_export int aim_clearhandlers(aim_conn_t *conn); |
2086 | 641 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
642 faim_export aim_conn_t *aim_conn_findbygroup(aim_session_t *sess, fu16_t group); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
643 faim_export aim_session_t *aim_conn_getsess(aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
644 faim_export void aim_conn_close(aim_conn_t *deadconn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
645 faim_export aim_conn_t *aim_newconn(aim_session_t *, int type, const char *dest); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
646 faim_export int aim_conngetmaxfd(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
647 faim_export aim_conn_t *aim_select(aim_session_t *, struct timeval *, int *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
648 faim_export int aim_conn_isready(aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
649 faim_export int aim_conn_setstatus(aim_conn_t *, int); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
650 faim_export int aim_conn_completeconnect(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
651 faim_export int aim_conn_isconnecting(aim_conn_t *conn); |
2086 | 652 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
653 typedef void (*faim_debugging_callback_t)(aim_session_t *sess, int level, const char *format, va_list va); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
654 faim_export int aim_setdebuggingcb(aim_session_t *sess, faim_debugging_callback_t); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
655 faim_export void aim_session_init(aim_session_t *, unsigned long flags, int debuglevel); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
656 faim_export void aim_session_kill(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
657 faim_export void aim_setupproxy(aim_session_t *sess, const char *server, const char *username, const char *password); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
658 faim_export aim_conn_t *aim_getconn_type(aim_session_t *, int type); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
659 faim_export aim_conn_t *aim_getconn_type_all(aim_session_t *, int type); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
660 faim_export aim_conn_t *aim_getconn_fd(aim_session_t *, int fd); |
2086 | 661 |
3912 | 662 /* misc.c */ |
2086 | 663 |
664 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 | |
665 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 | |
666 #define AIM_VISIBILITYCHANGE_DENYADD 0x07 | |
667 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08 | |
668 | |
669 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 | |
670 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 | |
671 | |
672 #define AIM_WARN_ANON 0x01 | |
673 | |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
674 faim_export int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
675 faim_export int aim_send_warning(aim_session_t *sess, aim_conn_t *conn, const char *destsn, fu32_t flags); |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
676 faim_export int aim_nop(aim_session_t *, aim_conn_t *); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
677 faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
678 faim_export int aim_bos_setidle(aim_session_t *, aim_conn_t *, fu32_t); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
679 faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
680 faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *); |
4151 | 681 faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile_encoding, const char *profile, const int profile_len, const char *awaymsg_encoding, const char *awaymsg, const int awaymsg_len, fu32_t caps); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
682 faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
683 faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t); |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
684 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
685 faim_export int aim_reqservice(aim_session_t *, aim_conn_t *, fu16_t); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
686 faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
687 faim_export int aim_bos_reqbuddyrights(aim_session_t *, aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
688 faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
689 faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
690 faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy); |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
691 faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status); |
2086 | 692 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
693 faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *); |
2086 | 694 |
695 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 | |
696 #define AIM_CLIENTTYPE_MC 0x0001 | |
697 #define AIM_CLIENTTYPE_WINAIM 0x0002 | |
698 #define AIM_CLIENTTYPE_WINAIM41 0x0003 | |
699 #define AIM_CLIENTTYPE_AOL_TOC 0x0004 | |
700 faim_export unsigned short aim_fingerprintclient(unsigned char *msghdr, int len); | |
701 | |
702 #define AIM_RATE_CODE_CHANGE 0x0001 | |
703 #define AIM_RATE_CODE_WARNING 0x0002 | |
704 #define AIM_RATE_CODE_LIMIT 0x0003 | |
705 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
706 faim_export int aim_ads_requestads(aim_session_t *sess, aim_conn_t *conn); |
2086 | 707 |
3912 | 708 /* im.c */ |
2086 | 709 |
710 struct aim_fileheader_t { | |
711 #if 0 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
712 char magic[4]; /* 0 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
713 short hdrlen; /* 4 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
714 short hdrtype; /* 6 */ |
2086 | 715 #endif |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
716 char bcookie[8]; /* 8 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
717 short encrypt; /* 16 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
718 short compress; /* 18 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
719 short totfiles; /* 20 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
720 short filesleft; /* 22 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
721 short totparts; /* 24 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
722 short partsleft; /* 26 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
723 long totsize; /* 28 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
724 long size; /* 32 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
725 long modtime; /* 36 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
726 long checksum; /* 40 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
727 long rfrcsum; /* 44 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
728 long rfsize; /* 48 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
729 long cretime; /* 52 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
730 long rfcsum; /* 56 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
731 long nrecvd; /* 60 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
732 long recvcsum; /* 64 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
733 char idstring[32]; /* 68 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
734 char flags; /* 100 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
735 char lnameoffset; /* 101 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
736 char lsizeoffset; /* 102 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
737 char dummy[69]; /* 103 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
738 char macfileinfo[16]; /* 172 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
739 short nencode; /* 188 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
740 short nlanguage; /* 190 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
741 char name[64]; /* 192 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
742 /* 256 */ |
2086 | 743 }; |
744 | |
3771 | 745 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 |
746 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002 | |
747 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011 | |
748 #define AIM_OPT_SUBTYPE_GET_LIST 0x0012 | |
2086 | 749 |
750 struct aim_chat_roominfo { | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
751 unsigned short exchange; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
752 char *name; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
753 unsigned short instance; |
2086 | 754 }; |
755 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
756 #define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
757 #define AIM_IMFLAGS_ACK 0x0002 /* request a receipt notice */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
758 #define AIM_IMFLAGS_UNICODE 0x0004 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
759 #define AIM_IMFLAGS_ISO_8859_1 0x0008 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
760 #define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
761 #define AIM_IMFLAGS_HASICON 0x0020 /* already has icon */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
762 #define AIM_IMFLAGS_SUBENC_MACINTOSH 0x0040 /* damn that Steve Jobs! */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
763 #define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
764 #define AIM_IMFLAGS_EXTDATA 0x0100 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
765 #define AIM_IMFLAGS_CUSTOMCHARSET 0x0200 /* charset fields set */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
766 #define AIM_IMFLAGS_MULTIPART 0x0400 /* ->mpmsg section valid */ |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
767 #define AIM_IMFLAGS_OFFLINE 0x0800 /* send to offline user */ |
3595 | 768 #define AIM_IMFLAGS_TYPINGNOT 0x1000 /* typing notification */ |
2086 | 769 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
770 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
771 * Multipart message structures. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
772 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
773 typedef struct aim_mpmsg_section_s { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
774 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
775 fu16_t charsubset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
776 fu8_t *data; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
777 fu16_t datalen; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
778 struct aim_mpmsg_section_s *next; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
779 } aim_mpmsg_section_t; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
780 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
781 typedef struct aim_mpmsg_s { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
782 int numparts; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
783 aim_mpmsg_section_t *parts; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
784 } aim_mpmsg_t; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
785 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
786 faim_export int aim_mpmsg_init(aim_session_t *sess, aim_mpmsg_t *mpm); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
787 faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const fu8_t *data, fu16_t datalen); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
788 faim_export int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
789 faim_export int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const fu16_t *unicode, fu16_t unicodelen); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
790 faim_export void aim_mpmsg_free(aim_session_t *sess, aim_mpmsg_t *mpm); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
791 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
792 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
793 * Arguments to aim_send_im_ext(). |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
794 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
795 * This is really complicated. But immensely versatile. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
796 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
797 */ |
2086 | 798 struct aim_sendimext_args { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
799 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
800 /* These are _required_ */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
801 const char *destsn; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
802 fu32_t flags; /* often 0 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
803 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
804 /* Only required if not using multipart messages */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
805 const char *msg; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
806 int msglen; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
807 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
808 /* Required if ->msg is not provided */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
809 aim_mpmsg_t *mpmsg; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
810 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
811 /* Only used if AIM_IMFLAGS_HASICON is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
812 fu32_t iconlen; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
813 time_t iconstamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
814 fu32_t iconsum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
815 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
816 /* Only used if AIM_IMFLAGS_CUSTOMFEATURES is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
817 fu8_t *features; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
818 fu8_t featureslen; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
819 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
820 /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set and mpmsg not used */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
821 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
822 fu16_t charsubset; |
2086 | 823 }; |
824 | |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
825 /* |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
826 * Arguments to aim_send_rtfmsg(). |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
827 */ |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
828 struct aim_sendrtfmsg_args { |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
829 const char *destsn; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
830 fu32_t fgcolor; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
831 fu32_t bgcolor; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
832 const char *rtfmsg; /* must be in RTF */ |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
833 }; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
834 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
835 /* |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
836 * This information is provided in the Incoming ICBM callback for |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
837 * Channel 1 ICBM's. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
838 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
839 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
840 * are optional, both are always set by the current libfaim code. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
841 * That may or may not change in the future. It is mainly for |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
842 * consistency with aim_sendimext_args. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
843 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
844 * Multipart messages require some explanation. If you want to use them, |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
845 * I suggest you read all the comments in im.c. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
846 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
847 */ |
2086 | 848 struct aim_incomingim_ch1_args { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
849 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
850 /* Always provided */ |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
851 aim_mpmsg_t mpmsg; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
852 fu32_t icbmflags; /* some flags apply only to ->msg, not all mpmsg */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
853 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
854 /* Only provided if message has a human-readable section */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
855 char *msg; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
856 int msglen; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
857 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
858 /* Only provided if AIM_IMFLAGS_HASICON is set */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
859 time_t iconstamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
860 fu32_t iconlen; |
2626
93f9bbd62630
[gaim-migrate @ 2639]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2507
diff
changeset
|
861 fu16_t iconsum; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
862 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
863 /* Only provided if AIM_IMFLAGS_CUSTOMFEATURES is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
864 fu8_t *features; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
865 fu8_t featureslen; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
866 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
867 /* Only provided if AIM_IMFLAGS_EXTDATA is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
868 fu8_t extdatalen; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
869 fu8_t *extdata; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
870 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
871 /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
872 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
873 fu16_t charsubset; |
2086 | 874 }; |
875 | |
2869 | 876 /* Valid values for channel 2 args->status */ |
877 #define AIM_RENDEZVOUS_PROPOSE 0x0000 | |
878 #define AIM_RENDEZVOUS_CANCEL 0x0001 | |
879 #define AIM_RENDEZVOUS_ACCEPT 0x0002 | |
880 | |
2086 | 881 struct aim_incomingim_ch2_args { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
882 fu8_t cookie[8]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
883 fu16_t reqclass; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
884 fu16_t status; |
2869 | 885 fu16_t errorcode; |
886 const char *clientip; | |
887 const char *clientip2; | |
888 const char *verifiedip; | |
889 fu16_t port; | |
890 const char *msg; /* invite message or file description */ | |
891 const char *encoding; | |
892 const char *language; | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
893 union { |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
894 struct { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
895 fu32_t checksum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
896 fu32_t length; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
897 time_t timestamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
898 fu8_t *icon; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
899 } icon; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
900 struct { |
2869 | 901 struct aim_chat_roominfo roominfo; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
902 } chat; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
903 struct { |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
904 fu32_t fgcolor; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
905 fu32_t bgcolor; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
906 const char *rtfmsg; |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
907 } rtfmsg; |
3630 | 908 struct { |
3771 | 909 fu16_t subtype; |
3630 | 910 fu16_t totfiles; |
911 fu32_t totsize; | |
912 char *filename; | |
913 } sendfile; | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
914 } info; |
2869 | 915 void *destructor; /* used internally only */ |
2086 | 916 }; |
917 | |
3141 | 918 /* Valid values for channel 4 args->type */ |
919 #define AIM_ICQMSG_AUTHREQUEST 0x0006 | |
920 #define AIM_ICQMSG_AUTHDENIED 0x0007 | |
921 #define AIM_ICQMSG_AUTHGRANTED 0x0008 | |
922 | |
923 struct aim_incomingim_ch4_args { | |
924 fu32_t uin; /* Of the sender of the ICBM */ | |
4173 | 925 fu8_t type; |
926 fu8_t flags; | |
3141 | 927 char *msg; /* Reason for auth request, deny, or accept */ |
4076 | 928 int msglen; |
3141 | 929 }; |
930 | |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
931 faim_export int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args); |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
932 faim_export int aim_send_im_ext(aim_session_t *sess, struct aim_sendimext_args *args); |
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
933 faim_export int aim_send_im(aim_session_t *, const char *destsn, unsigned short flags, const char *msg); |
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
934 faim_export int aim_send_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum); |
2626
93f9bbd62630
[gaim-migrate @ 2639]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2507
diff
changeset
|
935 faim_export fu16_t aim_iconsum(const fu8_t *buf, int buflen); |
2993 | 936 faim_export int aim_send_typing(aim_session_t *sess, aim_conn_t *conn, int typing); |
3952 | 937 faim_export int aim_send_im_direct(aim_session_t *, aim_conn_t *, const char *msg, int len, int encoding); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
938 faim_export const char *aim_directim_getsn(aim_conn_t *conn); |
2717
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
939 faim_export aim_conn_t *aim_directim_initiate(aim_session_t *, const char *destsn); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
940 faim_export aim_conn_t *aim_directim_connect(aim_session_t *, const char *sn, const char *addr, const fu8_t *cookie); |
2086 | 941 |
3212 | 942 faim_export int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type); |
3630 | 943 faim_export aim_conn_t *aim_sendfile_initiate(aim_session_t *, const char *destsn, const char *filename, fu16_t numfiles, fu32_t totsize, char *cookret); |
3141 | 944 faim_export int aim_send_im_ch4(aim_session_t *sess, char *sn, fu16_t type, fu8_t *message); |
2717
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
945 |
3595 | 946 faim_export int aim_mtn_send(aim_session_t *sess, fu16_t type1, char *sn, fu16_t type2); |
947 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
948 faim_export aim_conn_t *aim_getfile_initiate(aim_session_t *sess, aim_conn_t *conn, const char *destsn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
949 faim_export int aim_oft_getfile_request(aim_session_t *sess, aim_conn_t *conn, const char *name, int size); |
3630 | 950 faim_export int aim_oft_sendfile_request(aim_session_t *sess, aim_conn_t *conn, |
951 const char *name, int filesdone, int numfiles, int size, | |
952 int totsize); | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
953 faim_export int aim_oft_getfile_ack(aim_session_t *sess, aim_conn_t *conn); |
3630 | 954 faim_export int aim_oft_end(aim_session_t *sess, aim_conn_t *conn); |
2086 | 955 |
3912 | 956 /* info.c */ |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
957 #define AIM_CAPS_BUDDYICON 0x00000001 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
958 #define AIM_CAPS_VOICE 0x00000002 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
959 #define AIM_CAPS_IMIMAGE 0x00000004 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
960 #define AIM_CAPS_CHAT 0x00000008 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
961 #define AIM_CAPS_GETFILE 0x00000010 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
962 #define AIM_CAPS_SENDFILE 0x00000020 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
963 #define AIM_CAPS_GAMES 0x00000040 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
964 #define AIM_CAPS_SAVESTOCKS 0x00000080 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
965 #define AIM_CAPS_SENDBUDDYLIST 0x00000100 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
966 #define AIM_CAPS_GAMES2 0x00000200 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
967 #define AIM_CAPS_ICQ 0x00000400 |
2979 | 968 #define AIM_CAPS_APINFO 0x00000800 |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
969 #define AIM_CAPS_ICQRTF 0x00001000 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
970 #define AIM_CAPS_EMPTY 0x00002000 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
971 #define AIM_CAPS_ICQSERVERRELAY 0x00004000 |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
972 #define AIM_CAPS_ICQUNKNOWN 0x00008000 |
2920 | 973 #define AIM_CAPS_TRILLIANCRYPT 0x00010000 |
974 #define AIM_CAPS_LAST 0x00020000 | |
2086 | 975 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
976 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
2086 | 977 |
978 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 | |
979 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 | |
980 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
981 faim_export int aim_sendmemblock(aim_session_t *sess, aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf, unsigned char flag); |
2086 | 982 |
983 #define AIM_GETINFO_GENERALINFO 0x00001 | |
984 #define AIM_GETINFO_AWAYMESSAGE 0x00003 | |
2920 | 985 #define AIM_GETINFO_CAPABILITIES 0x0004 |
2086 | 986 |
987 struct aim_invite_priv { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
988 char *sn; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
989 char *roomname; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
990 fu16_t exchange; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
991 fu16_t instance; |
2086 | 992 }; |
993 | |
994 #define AIM_COOKIETYPE_UNKNOWN 0x00 | |
995 #define AIM_COOKIETYPE_ICBM 0x01 | |
996 #define AIM_COOKIETYPE_ADS 0x02 | |
997 #define AIM_COOKIETYPE_BOS 0x03 | |
998 #define AIM_COOKIETYPE_IM 0x04 | |
999 #define AIM_COOKIETYPE_CHAT 0x05 | |
1000 #define AIM_COOKIETYPE_CHATNAV 0x06 | |
1001 #define AIM_COOKIETYPE_INVITE 0x07 | |
1002 /* we'll move OFT up a bit to give breathing room. not like it really | |
1003 * matters. */ | |
1004 #define AIM_COOKIETYPE_OFTIM 0x10 | |
1005 #define AIM_COOKIETYPE_OFTGET 0x11 | |
1006 #define AIM_COOKIETYPE_OFTSEND 0x12 | |
1007 #define AIM_COOKIETYPE_OFTVOICE 0x13 | |
1008 #define AIM_COOKIETYPE_OFTIMAGE 0x14 | |
1009 #define AIM_COOKIETYPE_OFTICON 0x15 | |
1010 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1011 faim_export int aim_handlerendconnect(aim_session_t *sess, aim_conn_t *cur); |
2086 | 1012 |
1013 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000 | |
1014 #define AIM_TRANSFER_DENY_DECLINE 0x0001 | |
1015 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002 | |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
1016 faim_export int aim_denytransfer(aim_session_t *sess, const char *sender, const char *cookie, unsigned short code); |
3630 | 1017 faim_export aim_conn_t *aim_accepttransfer(aim_session_t *sess, aim_conn_t *conn, const char *sn, const fu8_t *cookie, const fu8_t *ip, fu16_t port, fu16_t rendid, ...); |
1018 faim_export int aim_canceltransfer(aim_session_t *sess, aim_conn_t *conn, | |
1019 const char *cookie, const char *sn, int rendid); | |
1020 faim_export fu32_t aim_update_checksum(aim_session_t *sess, aim_conn_t *conn, | |
1021 const unsigned char *buffer, int bufferlen); | |
2086 | 1022 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1023 faim_export int aim_getinfo(aim_session_t *, aim_conn_t *, const char *, unsigned short); |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
1024 faim_export int aim_sendbuddyoncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1025 faim_export int aim_sendbuddyoffgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
2086 | 1026 |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1027 #define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED 0x00000001 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1028 #define AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED 0x00000002 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1029 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1030 /* This is what the server will give you if you don't set them yourself. */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1031 #define AIM_IMPARAM_DEFAULTS { \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1032 0, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1033 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1034 512, /* !! Note how small this is. */ \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1035 (99.9)*10, (99.9)*10, \ |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
1036 1000 /* !! And how large this is. */ \ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1037 } |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1038 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1039 /* This is what most AIM versions use. */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1040 #define AIM_IMPARAM_REASONABLE { \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1041 0, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1042 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1043 8000, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1044 (99.9)*10, (99.9)*10, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1045 0 \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1046 } |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1047 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1048 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1049 struct aim_icbmparameters { |
3213 | 1050 fu16_t maxchan; |
1051 fu32_t flags; /* AIM_IMPARAM_FLAG_ */ | |
1052 fu16_t maxmsglen; /* message size that you will accept */ | |
1053 fu16_t maxsenderwarn; /* this and below are *10 (999=99.9%) */ | |
1054 fu16_t maxrecverwarn; | |
1055 fu32_t minmsginterval; /* in milliseconds? */ | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1056 }; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1057 |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
1058 faim_export int aim_reqicbmparams(aim_session_t *sess); |
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
1059 faim_export int aim_seticbmparam(aim_session_t *sess, struct aim_icbmparameters *params); |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
1060 |
2086 | 1061 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1062 /* auth.c */ |
4293 | 1063 faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const fu16_t length, const fu8_t *); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1064 |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
1065 faim_export int aim_admin_changepasswd(aim_session_t *, aim_conn_t *, const char *newpw, const char *curpw); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
1066 faim_export int aim_admin_reqconfirm(aim_session_t *sess, aim_conn_t *conn); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
1067 faim_export int aim_admin_getinfo(aim_session_t *sess, aim_conn_t *conn, fu16_t info); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
1068 faim_export int aim_admin_setemail(aim_session_t *sess, aim_conn_t *conn, const char *newemail); |
2979 | 1069 faim_export int aim_admin_setnick(aim_session_t *sess, aim_conn_t *conn, const char *newnick); |
2086 | 1070 |
3952 | 1071 /* buddylist.c */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1072 faim_export int aim_add_buddy(aim_session_t *, aim_conn_t *, const char *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1073 faim_export int aim_remove_buddy(aim_session_t *, aim_conn_t *, const char *); |
2086 | 1074 |
3952 | 1075 /* search.c */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1076 faim_export int aim_usersearch_address(aim_session_t *, aim_conn_t *, const char *); |
2086 | 1077 |
3952 | 1078 /* newsearch.c */ |
1079 struct aim_usersearch { | |
1080 char *first; | |
1081 char *last; | |
1082 char *middle; | |
1083 char *maiden; | |
1084 char *email; | |
1085 char *country; | |
1086 char *state; | |
1087 char *city; | |
1088 char *sn; | |
1089 char *interest; | |
1090 char *nick; | |
1091 char *zip; | |
1092 char *region; | |
1093 char *address; | |
1094 struct aim_usersearch *next; | |
1095 }; | |
1096 | |
1097 faim_export int aim_usersearch_email(aim_session_t *, const char *, const char *); | |
1098 faim_export int aim_usersearch_name(aim_session_t *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *); | |
1099 faim_export int aim_usersearch_interest(aim_session_t *, const char *, const char *); | |
1100 | |
1101 | |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1102 /* These apply to exchanges as well. */ |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1103 #define AIM_CHATROOM_FLAG_EVILABLE 0x0001 |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1104 #define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002 |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1105 #define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004 |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1106 #define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008 |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1107 |
2086 | 1108 struct aim_chat_exchangeinfo { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1109 fu16_t number; |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1110 fu16_t flags; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1111 char *name; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1112 char *charset1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1113 char *lang1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1114 char *charset2; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1115 char *lang2; |
2086 | 1116 }; |
1117 | |
1118 #define AIM_CHATFLAGS_NOREFLECT 0x0001 | |
1119 #define AIM_CHATFLAGS_AWAY 0x0002 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1120 faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const char *msg, int msglen); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1121 faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2764
diff
changeset
|
1122 faim_export int aim_chat_attachname(aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1123 faim_export char *aim_chat_getname(aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1124 faim_export aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name); |
2086 | 1125 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1126 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn); |
2086 | 1127 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1128 faim_export int aim_chat_invite(aim_session_t *sess, aim_conn_t *conn, const char *sn, const char *msg, fu16_t exchange, const char *roomname, fu16_t instance); |
2086 | 1129 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1130 faim_export int aim_chatnav_createroom(aim_session_t *sess, aim_conn_t *conn, const char *name, fu16_t exchange); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1131 faim_export int aim_chat_leaveroom(aim_session_t *sess, const char *name); |
2086 | 1132 |
2672 | 1133 |
4230 | 1134 |
1135 /* ssi.c */ | |
2672 | 1136 #define AIM_SSI_TYPE_BUDDY 0x0000 |
1137 #define AIM_SSI_TYPE_GROUP 0x0001 | |
3017 | 1138 #define AIM_SSI_TYPE_PERMIT 0x0002 |
1139 #define AIM_SSI_TYPE_DENY 0x0003 | |
2672 | 1140 #define AIM_SSI_TYPE_PDINFO 0x0004 |
1141 #define AIM_SSI_TYPE_PRESENCEPREFS 0x0005 | |
1142 | |
4230 | 1143 #define AIM_SSI_ACK_SUCCESS 0x0000 |
1144 #define AIM_SSI_ACK_ITEMNOTFOUND 0x0002 | |
1145 #define AIM_SSI_ACK_IDNUMINUSE 0x000a | |
1146 #define AIM_SSI_ACK_ATMAX 0x000c | |
1147 #define AIM_SSI_ACK_INVALIDNAME 0x000d | |
1148 #define AIM_SSI_ACK_AUTHREQUIRED 0x000e | |
1149 | |
2672 | 1150 struct aim_ssi_item { |
1151 char *name; | |
1152 fu16_t gid; | |
1153 fu16_t bid; | |
1154 fu16_t type; | |
4230 | 1155 struct aim_tlvlist_s *data; |
2672 | 1156 struct aim_ssi_item *next; |
1157 }; | |
1158 | |
4230 | 1159 struct aim_ssi_tmp { |
1160 fu16_t action; | |
1161 fu16_t ack; | |
1162 char *name; | |
1163 struct aim_ssi_item *item; | |
1164 struct aim_ssi_tmp *next; | |
1165 }; | |
1166 | |
3109 | 1167 /* These build the actual SNACs and queue them to be sent */ |
4230 | 1168 /* 0x0002 */ faim_export int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn); |
1169 /* 0x0005 */ faim_export int aim_ssi_reqdata(aim_session_t *sess, aim_conn_t *conn, time_t localstamp, fu16_t localrev); | |
1170 /* 0x0007 */ faim_export int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn); | |
1171 /* 0x0008 */ faim_export int aim_ssi_addmoddel(aim_session_t *sess, aim_conn_t *conn); | |
1172 /* 0x0011 */ faim_export int aim_ssi_modbegin(aim_session_t *sess, aim_conn_t *conn); | |
1173 /* 0x0012 */ faim_export int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn); | |
1174 /* 0x0014 */ faim_export int aim_ssi_sendauth(aim_session_t *sess, aim_conn_t *conn, char *sn, char *msg); | |
1175 /* 0x0018 */ faim_export int aim_ssi_sendauthrequest(aim_session_t *sess, aim_conn_t *conn, char *sn, char *msg); | |
1176 /* 0x001a */ faim_export int aim_ssi_sendauthreply(aim_session_t *sess, aim_conn_t *conn, char *sn, fu8_t reply, char *msg); | |
2672 | 1177 |
4230 | 1178 /* Client functions for retrieving SSI data */ |
3210 | 1179 faim_export struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, fu16_t gid, fu16_t bid); |
3466 | 1180 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *sn, fu16_t type); |
4230 | 1181 faim_export struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *sn); |
1182 faim_export char *aim_ssi_itemlist_findparentname(struct aim_ssi_item *list, const char *sn); | |
3210 | 1183 faim_export int aim_ssi_getpermdeny(struct aim_ssi_item *list); |
1184 faim_export fu32_t aim_ssi_getpresence(struct aim_ssi_item *list); | |
4238 | 1185 faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); |
4243 | 1186 faim_export int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); |
4230 | 1187 |
1188 /* Client functions for changing SSI data */ | |
1189 faim_export int aim_ssi_addbuddy(aim_session_t *sess, aim_conn_t *conn, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth); | |
1190 faim_export int aim_ssi_addpermit(aim_session_t *sess, aim_conn_t *conn, const char *name); | |
1191 faim_export int aim_ssi_adddeny(aim_session_t *sess, aim_conn_t *conn, const char *name); | |
1192 faim_export int aim_ssi_delbuddy(aim_session_t *sess, aim_conn_t *conn, const char *name, const char *group); | |
1193 faim_export int aim_ssi_delpermit(aim_session_t *sess, aim_conn_t *conn, const char *name); | |
1194 faim_export int aim_ssi_deldeny(aim_session_t *sess, aim_conn_t *conn, const char *name); | |
3867 | 1195 faim_export int aim_ssi_movebuddy(aim_session_t *sess, aim_conn_t *conn, const char *oldgn, const char *newgn, const char *sn); |
4269 | 1196 faim_export int aim_ssi_aliasbuddy(aim_session_t *sess, aim_conn_t *conn, const char *gn, const char *sn, const char *alias); |
3867 | 1197 faim_export int aim_ssi_rename_group(aim_session_t *sess, aim_conn_t *conn, const char *oldgn, const char *newgn); |
4230 | 1198 faim_export int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn); |
2998 | 1199 faim_export int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn); |
3210 | 1200 faim_export int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, fu8_t permdeny, fu32_t vismask); |
3109 | 1201 faim_export int aim_ssi_setpresence(aim_session_t *sess, aim_conn_t *conn, fu32_t presence); |
2991 | 1202 |
4230 | 1203 |
1204 | |
1205 /* icq.c */ | |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1206 struct aim_icq_offlinemsg { |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1207 fu32_t sender; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1208 fu16_t year; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1209 fu8_t month, day, hour, minute; |
4173 | 1210 fu8_t type; |
1211 fu8_t flags; | |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1212 char *msg; |
4076 | 1213 int msglen; |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1214 }; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1215 |
4151 | 1216 struct aim_icq_info { |
2742
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1217 fu32_t uin; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1218 char *nick; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1219 char *first; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1220 char *last; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1221 char *email; |
4151 | 1222 char *personalwebpage; |
1223 char *info; | |
1224 char *homecity; | |
1225 char *homestate; | |
1226 char *homeaddr; | |
1227 char *homezip; | |
1228 fu16_t homecountry; | |
1229 char *workcity; | |
1230 char *workstate; | |
1231 char *workaddr; | |
1232 char *workzip; | |
1233 fu16_t workcountry; | |
1234 char *workcompany; | |
1235 char *workdivision; | |
1236 char *workposition; | |
1237 char *workwebpage; | |
2742
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1238 }; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1239 |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1240 faim_export int aim_icq_reqofflinemsgs(aim_session_t *sess); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1241 faim_export int aim_icq_ackofflinemsgs(aim_session_t *sess); |
2742
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
1242 faim_export int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin); |
4151 | 1243 faim_export int aim_icq_getallinfo(aim_session_t *sess, const char *uin); |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1244 |
3694 | 1245 /* email.c */ |
1246 struct aim_emailinfo { | |
1247 fu8_t *cookie16; | |
1248 fu8_t *cookie8; | |
1249 char *url; | |
1250 fu16_t nummsgs; | |
1251 fu8_t unread; | |
1252 char *domain; | |
1253 fu16_t flag; | |
1254 struct aim_emailinfo *next; | |
1255 }; | |
1256 | |
1257 faim_export int aim_email_sendcookies(aim_session_t *sess, aim_conn_t *conn); | |
1258 faim_export int aim_email_activate(aim_session_t *sess, aim_conn_t *conn); | |
1259 | |
3912 | 1260 /* util.c */ |
2086 | 1261 /* |
1262 * These are really ugly. You'd think this was LISP. I wish it was. | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1263 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1264 * XXX With the advent of bstream's, these should be removed to enforce |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1265 * their use. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1266 * |
2086 | 1267 */ |
1268 #define aimutil_put8(buf, data) ((*(buf) = (u_char)(data)&0xff),1) | |
1269 #define aimutil_get8(buf) ((*(buf))&0xff) | |
1270 #define aimutil_put16(buf, data) ( \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1271 (*(buf) = (u_char)((data)>>8)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1272 (*((buf)+1) = (u_char)(data)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1273 2) |
2086 | 1274 #define aimutil_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff)) |
1275 #define aimutil_put32(buf, data) ( \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1276 (*((buf)) = (u_char)((data)>>24)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1277 (*((buf)+1) = (u_char)((data)>>16)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1278 (*((buf)+2) = (u_char)((data)>>8)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1279 (*((buf)+3) = (u_char)(data)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1280 4) |
2086 | 1281 #define aimutil_get32(buf) ((((*(buf))<<24)&0xff000000) + \ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1282 (((*((buf)+1))<<16)&0x00ff0000) + \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1283 (((*((buf)+2))<< 8)&0x0000ff00) + \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1284 (((*((buf)+3) )&0x000000ff))) |
2086 | 1285 |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1286 /* Little-endian versions (damn ICQ) */ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1287 #define aimutil_putle8(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1288 (*(buf) = (unsigned char)(data) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1289 1) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1290 #define aimutil_getle8(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1291 (*(buf)) & 0xff \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1292 ) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1293 #define aimutil_putle16(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1294 (*((buf)+0) = (unsigned char)((data) >> 0) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1295 (*((buf)+1) = (unsigned char)((data) >> 8) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1296 2) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1297 #define aimutil_getle16(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1298 (((*((buf)+0)) << 0) & 0x00ff) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1299 (((*((buf)+1)) << 8) & 0xff00) \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1300 ) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1301 #define aimutil_putle32(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1302 (*((buf)+0) = (unsigned char)((data) >> 0) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1303 (*((buf)+1) = (unsigned char)((data) >> 8) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1304 (*((buf)+2) = (unsigned char)((data) >> 16) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1305 (*((buf)+3) = (unsigned char)((data) >> 24) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1306 4) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1307 #define aimutil_getle32(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1308 (((*((buf)+0)) << 0) & 0x000000ff) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1309 (((*((buf)+1)) << 8) & 0x0000ff00) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1310 (((*((buf)+2)) << 16) & 0x00ff0000) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1311 (((*((buf)+3)) << 24) & 0xff000000)) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1312 |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1313 |
2086 | 1314 faim_export int aimutil_putstr(u_char *, const char *, int); |
1315 faim_export int aimutil_tokslen(char *toSearch, int index, char dl); | |
1316 faim_export int aimutil_itemcnt(char *toSearch, char dl); | |
1317 faim_export char *aimutil_itemidx(char *toSearch, int index, char dl); | |
1318 | |
1319 faim_export int aim_snlen(const char *sn); | |
1320 faim_export int aim_sncmp(const char *sn1, const char *sn2); | |
1321 | |
1322 /* for libc's that dont have it */ | |
1323 faim_export char *aim_strsep(char **pp, const char *delim); | |
1324 | |
1325 #include <aim_internal.h> | |
1326 | |
1327 #endif /* __AIM_H__ */ | |
1328 |