Mercurial > pidgin
annotate src/protocols/oscar/aim.h @ 2774:6fab04e257a5
[gaim-migrate @ 2787]
>>Comment By: Decklin
> I'm also curious as to why you didn't want the POINT_SIZE
> macro...
i just didn't see it before :)
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 20 Nov 2001 01:22:16 +0000 |
parents | b8967c961056 |
children | 9467e4ee81be |
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" | |
5 * -- Josh Meyer | |
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 | |
28 #ifdef _WIN32 | |
29 #include <windows.h> | |
30 #include <io.h> | |
31 #else | |
32 #include <sys/time.h> | |
33 #include <unistd.h> | |
34 #include <netinet/in.h> | |
35 #include <sys/socket.h> | |
36 #endif | |
37 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
38 /* XXX adjust these based on autoconf-detected platform */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
39 typedef unsigned char fu8_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
40 typedef unsigned short fu16_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
41 typedef unsigned long fu32_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
42 typedef fu32_t aim_snacid_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
43 typedef fu16_t flap_seqnum_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
44 |
2086 | 45 /* Portability stuff (DMP) */ |
46 | |
47 #ifdef _WIN32 | |
48 #define sleep(x) Sleep((x)*1000) | |
49 #define snprintf _snprintf /* I'm not sure whats wrong with Microsoft here */ | |
50 #define close(x) closesocket(x) /* no comment */ | |
51 #endif | |
52 | |
53 #if defined(mach) && defined(__APPLE__) | |
54 #define gethostbyname(x) gethostbyname2(x, AF_INET) | |
55 #endif | |
56 | |
57 #if defined(_WIN32) || defined(STRICT_ANSI) | |
58 #define faim_shortfunc | |
59 #else | |
60 #define faim_shortfunc inline | |
61 #endif | |
62 | |
63 #if defined(_WIN32) && !defined(WIN32_STATIC) | |
64 /* | |
65 * For a win32 DLL, we define WIN32_INDLL if this file | |
66 * is included while compiling the DLL. If its not | |
67 * defined (its included in a client app), the symbols | |
68 * will be imported instead of exported. | |
69 */ | |
70 #ifdef WIN32_INDLL | |
71 #define faim_export __declspec(dllexport) | |
72 #else | |
73 #define faim_export __declspec(dllimport) | |
74 #endif /* WIN32_INDLL */ | |
75 #define faim_internal | |
76 #else | |
77 /* | |
78 * Nothing normally needed for unix... | |
79 */ | |
80 #define faim_export | |
81 #define faim_internal | |
82 #endif | |
83 | |
84 /* | |
85 * Current Maximum Length for Screen Names (not including NULL) | |
86 * | |
87 * Currently only names up to 16 characters can be registered | |
88 * however it is aparently legal for them to be larger. | |
89 */ | |
90 #define MAXSNLEN 32 | |
91 | |
92 /* | |
93 * Current Maximum Length for Instant Messages | |
94 * | |
95 * This was found basically by experiment, but not wholly | |
96 * accurate experiment. It should not be regarded | |
97 * as completely correct. But its a decent approximation. | |
98 * | |
99 * Note that although we can send this much, its impossible | |
100 * for WinAIM clients (up through the latest (4.0.1957)) to | |
101 * send any more than 1kb. Amaze all your windows friends | |
102 * with utterly oversized instant messages! | |
103 * | |
104 * XXX: the real limit is the total SNAC size at 8192. Fix this. | |
105 * | |
106 */ | |
107 #define MAXMSGLEN 7987 | |
108 | |
109 /* | |
110 * Maximum size of a Buddy Icon. | |
111 */ | |
112 #define MAXICONLEN 7168 | |
113 #define AIM_ICONIDENT "AVT1picture.id" | |
114 | |
115 /* | |
116 * Current Maximum Length for Chat Room Messages | |
117 * | |
118 * This is actually defined by the protocol to be | |
119 * dynamic, but I have yet to see due cause to | |
120 * define it dynamically here. Maybe later. | |
121 * | |
122 */ | |
123 #define MAXCHATMSGLEN 512 | |
124 | |
125 /* | |
126 * Standard size of an AIM authorization cookie | |
127 */ | |
128 #define AIM_COOKIELEN 0x100 | |
129 | |
130 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" | |
131 | |
132 /* | |
133 * Client info. Filled in by the client and passed | |
134 * in to aim_login(). The information ends up | |
135 * getting passed to OSCAR through the initial | |
136 * login command. | |
137 * | |
138 * XXX: Should this be per-session? -mid | |
139 * | |
140 */ | |
141 struct client_info_s { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
142 char clientstring[100]; /* arbitrary size */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
143 int major; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
144 int minor; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
145 int build; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
146 char country[3]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
147 char lang[3]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
148 int major2; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
149 int minor2; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
150 long unknown; |
2086 | 151 }; |
152 | |
153 #define AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 { \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
154 "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
155 0x0003, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
156 0x0005, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
157 0x0686, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
158 "us", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
159 "en", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
160 0x0004, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
161 0x0000, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
162 0x0000002a, \ |
2086 | 163 } |
164 | |
165 #define AIM_CLIENTINFO_KNOWNGOOD_4_1_2010 { \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
166 "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
167 0x0004, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
168 0x0001, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
169 0x07da, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
170 "us", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
171 "en", \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
172 0x0004, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
173 0x0000, \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
174 0x0000004b, \ |
2086 | 175 } |
176 | |
177 /* | |
178 * I would make 4.1.2010 the default, but they seem to have found | |
179 * an alternate way of breaking that one. | |
180 * | |
181 * 3.5.1670 should work fine, however, you will be subjected to the | |
182 * memory test, which may require you to have a WinAIM binary laying | |
183 * around. (see login.c::memrequest()) | |
184 */ | |
185 #define AIM_CLIENTINFO_KNOWNGOOD AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 | |
186 | |
187 #ifndef TRUE | |
188 #define TRUE 1 | |
189 #define FALSE 0 | |
190 #endif | |
191 | |
192 /* | |
193 * These could be arbitrary, but its easier to use the actual AIM values | |
194 */ | |
195 #define AIM_CONN_TYPE_AUTH 0x0007 | |
196 #define AIM_CONN_TYPE_ADS 0x0005 | |
197 #define AIM_CONN_TYPE_BOS 0x0002 | |
198 #define AIM_CONN_TYPE_CHAT 0x000e | |
199 #define AIM_CONN_TYPE_CHATNAV 0x000d | |
200 | |
201 /* they start getting arbitrary in rendezvous stuff =) */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
202 #define AIM_CONN_TYPE_RENDEZVOUS 0x0101 /* these do not speak FLAP! */ |
2086 | 203 #define AIM_CONN_TYPE_RENDEZVOUS_OUT 0x0102 /* socket waiting for accept() */ |
204 | |
205 /* | |
206 * Subtypes, we need these for OFT stuff. | |
207 */ | |
208 #define AIM_CONN_SUBTYPE_OFT_DIRECTIM 0x0001 | |
209 #define AIM_CONN_SUBTYPE_OFT_GETFILE 0x0002 | |
210 #define AIM_CONN_SUBTYPE_OFT_SENDFILE 0x0003 | |
211 #define AIM_CONN_SUBTYPE_OFT_BUDDYICON 0x0004 | |
212 #define AIM_CONN_SUBTYPE_OFT_VOICE 0x0005 | |
213 | |
214 /* | |
215 * Status values returned from aim_conn_new(). ORed together. | |
216 */ | |
217 #define AIM_CONN_STATUS_READY 0x0001 | |
218 #define AIM_CONN_STATUS_INTERNALERR 0x0002 | |
219 #define AIM_CONN_STATUS_RESOLVERR 0x0040 | |
220 #define AIM_CONN_STATUS_CONNERR 0x0080 | |
221 #define AIM_CONN_STATUS_INPROGRESS 0x0100 | |
222 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
223 #define AIM_FRAMETYPE_FLAP 0x0000 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
224 #define AIM_FRAMETYPE_OFT 0x0001 |
2086 | 225 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
226 typedef struct aim_conn_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
227 int fd; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
228 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
229 fu16_t subtype; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
230 flap_seqnum_t seqnum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
231 fu32_t status; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
232 void *priv; /* misc data the client may want to store */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
233 void *internal; /* internal conn-specific libfaim data */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
234 time_t lastactivity; /* time of last transmit */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
235 int forcedlatency; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
236 void *handlerlist; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
237 void *sessv; /* pointer to parent session */ |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
238 void *inside; /* only accessible from inside libfaim */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
239 struct aim_conn_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
240 } aim_conn_t; |
2086 | 241 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
242 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
243 * Byte Stream type. Sort of. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
244 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
245 * Use of this type serves a couple purposes: |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
246 * - Buffer/buflen pairs are passed all around everywhere. This turns |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
247 * that into one value, as well as abstracting it slightly. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
248 * - Through the abstraction, it is possible to enable bounds checking |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
249 * 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
|
250 * weird packets is much better than a segfault. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
251 * - I like having variables named "bs". |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
252 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
253 * 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
|
254 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
255 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
256 typedef struct aim_bstream_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
257 fu8_t *data; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
258 fu16_t len; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
259 fu16_t offset; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
260 } aim_bstream_t; |
2086 | 261 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
262 typedef struct aim_frame_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
263 fu8_t hdrtype; /* defines which piece of the union to use */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
264 union { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
265 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
266 fu8_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
267 flap_seqnum_t seqnum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
268 } flap; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
269 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
270 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
271 fu8_t magic[4]; /* ODC2 OFT2 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
272 fu16_t hdr2len; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
273 fu8_t *hdr2; /* rest of bloated header */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
274 } oft; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
275 } hdr; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
276 aim_bstream_t data; /* payload stream */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
277 fu8_t handled; /* 0 = new, !0 = been handled */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
278 fu8_t nofree; /* 0 = free data on purge, 1 = only unlink */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
279 aim_conn_t *conn; /* the connection it came in on... */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
280 struct aim_frame_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
281 } aim_frame_t; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
282 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
283 typedef struct aim_msgcookie_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
284 unsigned char cookie[8]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
285 int type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
286 void *data; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
287 time_t addtime; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
288 struct aim_msgcookie_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
289 } aim_msgcookie_t; |
2086 | 290 |
291 /* | |
292 * AIM Session: The main client-data interface. | |
293 * | |
294 */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
295 typedef struct aim_session_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
296 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
297 /* ---- Client Accessible ------------------------ */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
298 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
299 /* Our screen name. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
300 char sn[MAXSNLEN+1]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
301 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
302 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
303 * Pointer to anything the client wants to |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
304 * explicitly associate with this session. |
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 * This is for use in the callbacks mainly. In any |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
307 * callback, you can access this with sess->aux_data. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
308 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
309 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
310 void *aux_data; |
2086 | 311 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
312 /* ---- Internal Use Only ------------------------ */ |
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 /* Connection information */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
315 aim_conn_t *connlist; |
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 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
318 * Transmit/receive queues. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
319 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
320 * 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
|
321 * 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
|
322 * 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
|
323 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
324 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
325 aim_frame_t *queue_outgoing; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
326 aim_frame_t *queue_incoming; |
2086 | 327 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
328 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
329 * Tx Enqueuing function. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
330 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
331 * This is how you override the transmit direction of libfaim's |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
332 * internal I/O. This function will be called whenever it needs |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
333 * to send something. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
334 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
335 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
336 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
337 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
338 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
339 * This is a dreadful solution to the what-room-are-we-joining |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
340 * problem. (There's no connection between the service |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
341 * request and the resulting redirect.) |
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 char *pendingjoin; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
344 fu16_t pendingjoinexchange; |
2086 | 345 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
346 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
347 * Outstanding snac handling |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
348 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
349 * XXX: Should these be per-connection? -mid |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
350 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
351 void *snac_hash[FAIM_SNAC_HASH_SIZE]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
352 aim_snacid_t snacid_next; |
2086 | 353 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
354 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
355 char server[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
356 char username[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
357 char password[128]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
358 } socksproxy; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
359 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
360 fu32_t flags; /* AIM_SESS_FLAGS_ */ |
2086 | 361 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
362 int debug; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
363 void (*debugcb)(struct aim_session_s *sess, int level, const char *format, va_list va); /* same as faim_debugging_callback_t */ |
2086 | 364 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
365 aim_msgcookie_t *msgcookies; |
2086 | 366 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
367 void *modlistv; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
368 } aim_session_t; |
2086 | 369 |
370 /* Values for sess->flags */ | |
2751
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
371 #define AIM_SESS_FLAGS_SNACLOGIN 0x00000001 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
372 #define AIM_SESS_FLAGS_XORLOGIN 0x00000002 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
373 #define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004 |
b715593f0d21
[gaim-migrate @ 2764]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2742
diff
changeset
|
374 #define AIM_SESS_FLAGS_DONTTIMEOUTONICBM 0x00000008 |
2086 | 375 |
2507
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
376 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
377 #define AIM_ICQ_STATE_ONLINE 0x0000 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
378 #define AIM_ICQ_STATE_AWAY 0x0001 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
379 #define AIM_ICQ_STATE_DND 0x0002 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
380 #define AIM_ICQ_STATE_NA 0x0004 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
381 #define AIM_ICQ_STATE_OCCUPIED 0x0010 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
382 #define AIM_ICQ_STATE_CHAT 0x0020 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
383 #define AIM_ICQ_STATE_INVISIBLE 0x0100 |
1069b0940237
[gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2421
diff
changeset
|
384 |
2086 | 385 /* |
386 * AIM User Info, Standard Form. | |
387 */ | |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
388 typedef struct { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
389 char sn[MAXSNLEN+1]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
390 fu16_t warnlevel; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
391 fu16_t idletime; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
392 fu16_t flags; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
393 fu32_t membersince; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
394 fu32_t onlinesince; |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
395 fu32_t sessionlen; |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
396 int capspresent; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
397 fu16_t capabilities; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
398 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
399 fu16_t status; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
400 fu32_t ipaddr; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
401 fu8_t crap[0x25]; /* until we figure it out... */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
402 } icqinfo; |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
403 } aim_userinfo_t; |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
404 |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
405 faim_export const char *aim_userinfo_sn(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
406 faim_export fu16_t aim_userinfo_flags(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
407 faim_export fu16_t aim_userinfo_idle(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
408 faim_export float aim_userinfo_warnlevel(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
409 faim_export time_t aim_userinfo_membersince(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
410 faim_export time_t aim_userinfo_onlinesince(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
411 faim_export fu32_t aim_userinfo_sessionlen(aim_userinfo_t *ui); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2315
diff
changeset
|
412 faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu16_t cap); |
2086 | 413 |
414 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ | |
415 #define AIM_FLAG_ADMINISTRATOR 0x0002 | |
416 #define AIM_FLAG_AOL 0x0004 | |
417 #define AIM_FLAG_OSCAR_PAY 0x0008 | |
418 #define AIM_FLAG_FREE 0x0010 | |
419 #define AIM_FLAG_AWAY 0x0020 | |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
420 #define AIM_FLAG_ICQ 0x0040 |
2086 | 421 #define AIM_FLAG_UNKNOWN80 0x0080 |
2315
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
422 #define AIM_FLAG_UNKNOWN100 0x0100 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
423 #define AIM_FLAG_UNKNOWN200 0x0200 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
424 #define AIM_FLAG_ACTIVEBUDDY 0x0400 |
7ec21662ffc2
[gaim-migrate @ 2325]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
425 #define AIM_FLAG_UNKNOWN800 0x0800 |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
426 #define AIM_FLAG_ABINTERNAL 0x1000 |
2086 | 427 |
428 #define AIM_FLAG_ALLUSERS 0x001f | |
429 | |
430 | |
431 #if defined(FAIM_INTERNAL) || defined(FAIM_NEED_TLV) | |
432 /* | |
433 * TLV handling | |
434 */ | |
435 | |
436 /* Generic TLV structure. */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
437 typedef struct aim_tlv_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
438 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
439 fu16_t length; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
440 fu8_t *value; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
441 } aim_tlv_t; |
2086 | 442 |
443 /* List of above. */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
444 typedef struct aim_tlvlist_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
445 aim_tlv_t *tlv; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
446 struct aim_tlvlist_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
447 } aim_tlvlist_t; |
2086 | 448 |
449 /* TLV-handling functions */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
450 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
451 #if 0 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
452 /* Very, very raw TLV handling. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
453 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
|
454 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
|
455 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
|
456 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
|
457 #endif |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
458 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
459 /* TLV list handling. */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
460 faim_internal aim_tlvlist_t *aim_readtlvchain(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
461 faim_internal void aim_freetlvchain(aim_tlvlist_t **list); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
462 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
|
463 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
|
464 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
|
465 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
|
466 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
|
467 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
468 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
|
469 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
|
470 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, 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
|
471 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
472 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
|
473 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
|
474 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
|
475 faim_internal int aim_counttlvchain(aim_tlvlist_t **list); |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
476 faim_internal int aim_sizetlvchain(aim_tlvlist_t **list); |
2086 | 477 #endif /* FAIM_INTERNAL */ |
478 | |
479 /* | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
480 * Get command from connections |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
481 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
482 * 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
|
483 * XXX Make this easily overridable. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
484 * |
2086 | 485 */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
486 faim_export int aim_get_command(aim_session_t *, aim_conn_t *); |
2086 | 487 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
488 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
489 * Dispatch commands that are in the rx queue. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
490 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
491 faim_export void aim_rxdispatch(aim_session_t *); |
2086 | 492 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
493 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
|
494 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
495 faim_export int aim_logoff(aim_session_t *); |
2086 | 496 |
497 #if !defined(FAIM_INTERNAL) || defined(FAIM_INTERNAL_INSANE) | |
498 /* the library should never call aim_conn_kill */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
499 faim_export void aim_conn_kill(aim_session_t *sess, aim_conn_t **deadconn); |
2086 | 500 #endif |
501 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
502 typedef int (*aim_rxcallback_t)(aim_session_t *, aim_frame_t *, ...); |
2086 | 503 |
2704 | 504 struct aim_clientrelease { |
505 char *name; | |
506 fu32_t build; | |
507 char *url; | |
508 char *info; | |
509 }; | |
510 | |
511 struct aim_authresp_info { | |
512 char *sn; | |
513 fu16_t errorcode; | |
514 char *errorurl; | |
515 fu16_t regstatus; | |
516 char *email; | |
517 char *bosip; | |
518 fu8_t *cookie; | |
519 struct aim_clientrelease latestrelease; | |
520 struct aim_clientrelease latestbeta; | |
521 }; | |
522 | |
2672 | 523 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
|
524 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
|
525 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
|
526 faim_export int aim_send_login(aim_session_t *, aim_conn_t *, const char *, const char *, struct client_info_s *, const char *key); |
2086 | 527 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
|
528 faim_export void aim_purge_rxqueue(aim_session_t *); |
2086 | 529 |
530 #define AIM_TX_QUEUED 0 /* default */ | |
531 #define AIM_TX_IMMEDIATE 1 | |
532 #define AIM_TX_USER 2 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
533 faim_export int aim_tx_setenqueue(aim_session_t *sess, int what, int (*func)(aim_session_t *, aim_frame_t *)); |
2086 | 534 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
535 faim_export int aim_tx_flushqueue(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
536 faim_export void aim_tx_purgequeue(aim_session_t *); |
2086 | 537 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
538 faim_export int aim_conn_setlatency(aim_conn_t *conn, int newval); |
2086 | 539 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
540 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
|
541 faim_export int aim_clearhandlers(aim_conn_t *conn); |
2086 | 542 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
543 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
|
544 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
|
545 faim_export void aim_conn_close(aim_conn_t *deadconn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
546 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
|
547 faim_export int aim_conngetmaxfd(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
548 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
|
549 faim_export int aim_conn_isready(aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
550 faim_export int aim_conn_setstatus(aim_conn_t *, int); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
551 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
|
552 faim_export int aim_conn_isconnecting(aim_conn_t *conn); |
2086 | 553 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
554 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
|
555 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
|
556 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
|
557 faim_export void aim_session_kill(aim_session_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
558 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
|
559 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
|
560 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
|
561 faim_export aim_conn_t *aim_getconn_fd(aim_session_t *, int fd); |
2086 | 562 |
563 /* aim_misc.c */ | |
564 | |
565 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 | |
566 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 | |
567 #define AIM_VISIBILITYCHANGE_DENYADD 0x07 | |
568 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08 | |
569 | |
570 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 | |
571 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 | |
572 | |
573 #define AIM_WARN_ANON 0x01 | |
574 | |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
575 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
|
576 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
|
577 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
|
578 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
|
579 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
|
580 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
|
581 faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
582 faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu16_t caps); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
583 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
|
584 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
|
585 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
586 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
|
587 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
|
588 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
|
589 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
|
590 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
|
591 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); |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
592 faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status); |
2086 | 593 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
594 faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *); |
2086 | 595 |
596 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 | |
597 #define AIM_CLIENTTYPE_MC 0x0001 | |
598 #define AIM_CLIENTTYPE_WINAIM 0x0002 | |
599 #define AIM_CLIENTTYPE_WINAIM41 0x0003 | |
600 #define AIM_CLIENTTYPE_AOL_TOC 0x0004 | |
601 faim_export unsigned short aim_fingerprintclient(unsigned char *msghdr, int len); | |
602 | |
603 #define AIM_RATE_CODE_CHANGE 0x0001 | |
604 #define AIM_RATE_CODE_WARNING 0x0002 | |
605 #define AIM_RATE_CODE_LIMIT 0x0003 | |
606 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
607 faim_export int aim_ads_requestads(aim_session_t *sess, aim_conn_t *conn); |
2086 | 608 |
609 /* aim_im.c */ | |
610 | |
611 struct aim_fileheader_t { | |
612 #if 0 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
613 char magic[4]; /* 0 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
614 short hdrlen; /* 4 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
615 short hdrtype; /* 6 */ |
2086 | 616 #endif |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
617 char bcookie[8]; /* 8 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
618 short encrypt; /* 16 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
619 short compress; /* 18 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
620 short totfiles; /* 20 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
621 short filesleft; /* 22 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
622 short totparts; /* 24 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
623 short partsleft; /* 26 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
624 long totsize; /* 28 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
625 long size; /* 32 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
626 long modtime; /* 36 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
627 long checksum; /* 40 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
628 long rfrcsum; /* 44 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
629 long rfsize; /* 48 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
630 long cretime; /* 52 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
631 long rfcsum; /* 56 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
632 long nrecvd; /* 60 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
633 long recvcsum; /* 64 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
634 char idstring[32]; /* 68 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
635 char flags; /* 100 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
636 char lnameoffset; /* 101 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
637 char lsizeoffset; /* 102 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
638 char dummy[69]; /* 103 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
639 char macfileinfo[16]; /* 172 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
640 short nencode; /* 188 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
641 short nlanguage; /* 190 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
642 char name[64]; /* 192 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
643 /* 256 */ |
2086 | 644 }; |
645 | |
646 struct aim_filetransfer_priv { | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
647 char sn[MAXSNLEN]; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
648 char cookie[8]; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
649 char ip[30]; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
650 int state; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
651 struct aim_fileheader_t fh; |
2086 | 652 }; |
653 | |
654 struct aim_chat_roominfo { | |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
655 unsigned short exchange; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
656 char *name; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
657 unsigned short instance; |
2086 | 658 }; |
659 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
660 #define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
661 #define AIM_IMFLAGS_ACK 0x0002 /* request a receipt notice */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
662 #define AIM_IMFLAGS_UNICODE 0x0004 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
663 #define AIM_IMFLAGS_ISO_8859_1 0x0008 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
664 #define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
665 #define AIM_IMFLAGS_HASICON 0x0020 /* already has icon */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
666 #define AIM_IMFLAGS_SUBENC_MACINTOSH 0x0040 /* damn that Steve Jobs! */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
667 #define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
668 #define AIM_IMFLAGS_EXTDATA 0x0100 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
669 #define AIM_IMFLAGS_CUSTOMCHARSET 0x0200 /* charset fields set */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
670 #define AIM_IMFLAGS_MULTIPART 0x0400 /* ->mpmsg section valid */ |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
671 #define AIM_IMFLAGS_OFFLINE 0x0800 /* send to offline user */ |
2086 | 672 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
673 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
674 * Multipart message structures. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
675 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
676 typedef struct aim_mpmsg_section_s { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
677 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
678 fu16_t charsubset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
679 fu8_t *data; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
680 fu16_t datalen; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
681 struct aim_mpmsg_section_s *next; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
682 } aim_mpmsg_section_t; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
683 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
684 typedef struct aim_mpmsg_s { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
685 int numparts; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
686 aim_mpmsg_section_t *parts; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
687 } aim_mpmsg_t; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
688 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
689 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
|
690 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
|
691 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
|
692 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
|
693 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
|
694 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
695 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
696 * Arguments to aim_send_im_ext(). |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
697 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
698 * This is really complicated. But immensely versatile. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
699 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
700 */ |
2086 | 701 struct aim_sendimext_args { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
702 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
703 /* These are _required_ */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
704 const char *destsn; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
705 fu32_t flags; /* often 0 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
706 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
707 /* Only required if not using multipart messages */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
708 const char *msg; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
709 int msglen; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
710 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
711 /* Required if ->msg is not provided */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
712 aim_mpmsg_t *mpmsg; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
713 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
714 /* Only used if AIM_IMFLAGS_HASICON is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
715 fu32_t iconlen; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
716 time_t iconstamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
717 fu32_t iconsum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
718 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
719 /* Only used if AIM_IMFLAGS_CUSTOMFEATURES is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
720 fu8_t *features; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
721 fu8_t featureslen; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
722 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
723 /* 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
|
724 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
725 fu16_t charsubset; |
2086 | 726 }; |
727 | |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
728 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
729 * This information is provided in the Incoming ICBM callback for |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
730 * Channel 1 ICBM's. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
731 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
732 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
733 * are optional, both are always set by the current libfaim code. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
734 * 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
|
735 * consistency with aim_sendimext_args. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
736 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
737 * Multipart messages require some explanation. If you want to use them, |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
738 * I suggest you read all the comments in im.c. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
739 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
740 */ |
2086 | 741 struct aim_incomingim_ch1_args { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
742 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
743 /* Always provided */ |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
744 aim_mpmsg_t mpmsg; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
745 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
|
746 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
747 /* Only provided if message has a human-readable section */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
748 char *msg; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
749 int msglen; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
750 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
751 /* Only provided if AIM_IMFLAGS_HASICON is set */ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
752 time_t iconstamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
753 fu32_t iconlen; |
2626
93f9bbd62630
[gaim-migrate @ 2639]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2507
diff
changeset
|
754 fu16_t iconsum; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
755 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
756 /* Only provided if AIM_IMFLAGS_CUSTOMFEATURES is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
757 fu8_t *features; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
758 fu8_t featureslen; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
759 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
760 /* Only provided if AIM_IMFLAGS_EXTDATA is set */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
761 fu8_t extdatalen; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
762 fu8_t *extdata; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
763 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
764 /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
765 fu16_t charset; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
766 fu16_t charsubset; |
2086 | 767 }; |
768 | |
769 struct aim_incomingim_ch2_args { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
770 fu8_t cookie[8]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
771 fu16_t reqclass; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
772 fu16_t status; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
773 union { |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
774 struct { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
775 fu32_t checksum; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
776 fu32_t length; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
777 time_t timestamp; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
778 fu8_t *icon; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
779 } icon; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
780 struct { |
2764
b8967c961056
[gaim-migrate @ 2777]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2751
diff
changeset
|
781 fu8_t junk; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
782 } voice; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
783 struct { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
784 fu8_t ip[22]; /* xxx.xxx.xxx.xxx:xxxxx\0 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
785 } imimage; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
786 struct { |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
787 char *msg; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
788 char *encoding; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
789 char *lang; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
790 struct aim_chat_roominfo roominfo; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
791 } chat; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
792 struct { |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
793 char *ip; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
794 unsigned char *cookie; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
795 } getfile; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
796 struct { |
2764
b8967c961056
[gaim-migrate @ 2777]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2751
diff
changeset
|
797 fu8_t junk; |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
798 } sendfile; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
799 } info; |
2086 | 800 }; |
801 | |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
802 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
|
803 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
|
804 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
|
805 faim_export fu16_t aim_iconsum(const fu8_t *buf, int buflen); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
806 faim_export int aim_send_im_direct(aim_session_t *, aim_conn_t *, const char *msg); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
807 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
|
808 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
|
809 faim_export aim_conn_t *aim_directim_connect(aim_session_t *, const char *sn, const char *addr, const fu8_t *cookie); |
2086 | 810 |
2717
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
811 faim_export aim_conn_t *aim_sendfile_initiate(aim_session_t *, const char *destsn, const char *filename, fu16_t numfiles, fu32_t totsize); |
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
812 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
813 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
|
814 faim_export int aim_oft_getfile_request(aim_session_t *sess, aim_conn_t *conn, const char *name, int size); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
815 faim_export int aim_oft_getfile_ack(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
816 faim_export int aim_oft_getfile_end(aim_session_t *sess, aim_conn_t *conn); |
2086 | 817 |
818 /* aim_info.c */ | |
819 #define AIM_CAPS_BUDDYICON 0x0001 | |
820 #define AIM_CAPS_VOICE 0x0002 | |
821 #define AIM_CAPS_IMIMAGE 0x0004 | |
822 #define AIM_CAPS_CHAT 0x0008 | |
823 #define AIM_CAPS_GETFILE 0x0010 | |
824 #define AIM_CAPS_SENDFILE 0x0020 | |
825 #define AIM_CAPS_GAMES 0x0040 | |
826 #define AIM_CAPS_SAVESTOCKS 0x0080 | |
827 #define AIM_CAPS_SENDBUDDYLIST 0x0100 | |
828 #define AIM_CAPS_GAMES2 0x0200 | |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
829 #define AIM_CAPS_ICQ 0x0400 |
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
830 #define AIM_CAPS_ABINTERNAL 0x0800 |
2086 | 831 #define AIM_CAPS_LAST 0x8000 |
832 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
833 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
2086 | 834 |
835 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 | |
836 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 | |
837 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
838 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 | 839 |
840 #define AIM_GETINFO_GENERALINFO 0x00001 | |
841 #define AIM_GETINFO_AWAYMESSAGE 0x00003 | |
842 | |
843 struct aim_invite_priv { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
844 char *sn; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
845 char *roomname; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
846 fu16_t exchange; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
847 fu16_t instance; |
2086 | 848 }; |
849 | |
850 #define AIM_COOKIETYPE_UNKNOWN 0x00 | |
851 #define AIM_COOKIETYPE_ICBM 0x01 | |
852 #define AIM_COOKIETYPE_ADS 0x02 | |
853 #define AIM_COOKIETYPE_BOS 0x03 | |
854 #define AIM_COOKIETYPE_IM 0x04 | |
855 #define AIM_COOKIETYPE_CHAT 0x05 | |
856 #define AIM_COOKIETYPE_CHATNAV 0x06 | |
857 #define AIM_COOKIETYPE_INVITE 0x07 | |
858 /* we'll move OFT up a bit to give breathing room. not like it really | |
859 * matters. */ | |
860 #define AIM_COOKIETYPE_OFTIM 0x10 | |
861 #define AIM_COOKIETYPE_OFTGET 0x11 | |
862 #define AIM_COOKIETYPE_OFTSEND 0x12 | |
863 #define AIM_COOKIETYPE_OFTVOICE 0x13 | |
864 #define AIM_COOKIETYPE_OFTIMAGE 0x14 | |
865 #define AIM_COOKIETYPE_OFTICON 0x15 | |
866 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
867 faim_export int aim_handlerendconnect(aim_session_t *sess, aim_conn_t *cur); |
2086 | 868 |
869 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000 | |
870 #define AIM_TRANSFER_DENY_DECLINE 0x0001 | |
871 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002 | |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
872 faim_export int aim_denytransfer(aim_session_t *sess, const char *sender, const char *cookie, unsigned short code); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
873 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 listingfiles, fu16_t listingtotsize, fu16_t listingsize, fu32_t listingchecksum, fu16_t rendid); |
2086 | 874 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
875 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
|
876 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
|
877 faim_export int aim_sendbuddyoffgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
2086 | 878 |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
879 #define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED 0x00000001 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
880 #define AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED 0x00000002 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
881 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
882 /* 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
|
883 #define AIM_IMPARAM_DEFAULTS { \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
884 0, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
885 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
886 512, /* !! Note how small this is. */ \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
887 (99.9)*10, (99.9)*10, \ |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
888 1000 /* !! And how large this is. */ \ |
2167
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
889 } |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
890 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
891 /* This is what most AIM versions use. */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
892 #define AIM_IMPARAM_REASONABLE { \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
893 0, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
894 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
895 8000, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
896 (99.9)*10, (99.9)*10, \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
897 0 \ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
898 } |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
899 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
900 |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
901 struct aim_icbmparameters { |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
902 unsigned short maxchan; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
903 unsigned long flags; /* AIM_IMPARAM_FLAG_ */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
904 unsigned short maxmsglen; /* message size that you will accept */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
905 unsigned short maxsenderwarn; /* this and below are *10 (999=99.9%) */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
906 unsigned short maxrecverwarn; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
907 unsigned long minmsginterval; /* in milliseconds? */ |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
908 }; |
edf8c5a70e5b
[gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2122
diff
changeset
|
909 |
2673
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
910 faim_export int aim_reqicbmparams(aim_session_t *sess); |
81d658e6ac1e
[gaim-migrate @ 2686]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
911 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
|
912 |
2086 | 913 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
914 /* auth.c */ |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
915 faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const fu8_t *); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
916 |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
917 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
|
918 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
|
919 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
|
920 faim_export int aim_admin_setemail(aim_session_t *sess, aim_conn_t *conn, const char *newemail); |
2086 | 921 |
922 /* aim_buddylist.c */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
923 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
|
924 faim_export int aim_remove_buddy(aim_session_t *, aim_conn_t *, const char *); |
2086 | 925 |
926 /* aim_search.c */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
927 faim_export int aim_usersearch_address(aim_session_t *, aim_conn_t *, const char *); |
2086 | 928 |
929 struct aim_chat_exchangeinfo { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
930 fu16_t number; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
931 char *name; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
932 char *charset1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
933 char *lang1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
934 char *charset2; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
935 char *lang2; |
2086 | 936 }; |
937 | |
938 #define AIM_CHATFLAGS_NOREFLECT 0x0001 | |
939 #define AIM_CHATFLAGS_AWAY 0x0002 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
940 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
|
941 faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
942 faim_export int aim_chat_attachname(aim_conn_t *conn, const char *roomname); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
943 faim_export char *aim_chat_getname(aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
944 faim_export aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name); |
2086 | 945 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
946 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn); |
2086 | 947 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
948 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 | 949 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
950 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
|
951 faim_export int aim_chat_leaveroom(aim_session_t *sess, const char *name); |
2086 | 952 |
2672 | 953 |
954 #define AIM_SSI_TYPE_BUDDY 0x0000 | |
955 #define AIM_SSI_TYPE_GROUP 0x0001 | |
956 #define AIM_SSI_TYPE_PERMITLIST 0x0002 | |
957 #define AIM_SSI_TYPE_DENYLIST 0x0003 | |
958 #define AIM_SSI_TYPE_PDINFO 0x0004 | |
959 #define AIM_SSI_TYPE_PRESENCEPREFS 0x0005 | |
960 | |
961 struct aim_ssi_item { | |
962 char *name; | |
963 fu16_t gid; | |
964 fu16_t bid; | |
965 fu16_t type; | |
966 void *data; | |
967 struct aim_ssi_item *next; | |
968 }; | |
969 | |
970 faim_export int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn); | |
971 faim_export int aim_ssi_reqdata(aim_session_t *sess, aim_conn_t *conn, time_t localstamp, fu16_t localrev); | |
972 faim_export int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn); | |
973 faim_export int aim_ssi_modbegin(aim_session_t *sess, aim_conn_t *conn); | |
974 faim_export int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn); | |
975 | |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
976 struct aim_icq_offlinemsg { |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
977 fu32_t sender; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
978 fu16_t year; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
979 fu8_t month, day, hour, minute; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
980 fu16_t type; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
981 char *msg; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
982 }; |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
983 |
2742
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
984 struct aim_icq_simpleinfo { |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
985 fu32_t uin; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
986 char *nick; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
987 char *first; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
988 char *last; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
989 char *email; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
990 }; |
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
991 |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
992 faim_export int aim_icq_reqofflinemsgs(aim_session_t *sess); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
993 faim_export int aim_icq_ackofflinemsgs(aim_session_t *sess); |
2742
6f527cbd899d
[gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
994 faim_export int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin); |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
995 |
2086 | 996 /* aim_util.c */ |
997 /* | |
998 * 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
|
999 * |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1000 * 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
|
1001 * their use. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1002 * |
2086 | 1003 */ |
1004 #define aimutil_put8(buf, data) ((*(buf) = (u_char)(data)&0xff),1) | |
1005 #define aimutil_get8(buf) ((*(buf))&0xff) | |
1006 #define aimutil_put16(buf, data) ( \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1007 (*(buf) = (u_char)((data)>>8)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1008 (*((buf)+1) = (u_char)(data)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1009 2) |
2086 | 1010 #define aimutil_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff)) |
1011 #define aimutil_put32(buf, data) ( \ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1012 (*((buf)) = (u_char)((data)>>24)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1013 (*((buf)+1) = (u_char)((data)>>16)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1014 (*((buf)+2) = (u_char)((data)>>8)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1015 (*((buf)+3) = (u_char)(data)&0xff), \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1016 4) |
2086 | 1017 #define aimutil_get32(buf) ((((*(buf))<<24)&0xff000000) + \ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1018 (((*((buf)+1))<<16)&0x00ff0000) + \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1019 (((*((buf)+2))<< 8)&0x0000ff00) + \ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2196
diff
changeset
|
1020 (((*((buf)+3) )&0x000000ff))) |
2086 | 1021 |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1022 /* Little-endian versions (damn ICQ) */ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1023 #define aimutil_putle8(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1024 (*(buf) = (unsigned char)(data) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1025 1) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1026 #define aimutil_getle8(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1027 (*(buf)) & 0xff \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1028 ) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1029 #define aimutil_putle16(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1030 (*((buf)+0) = (unsigned char)((data) >> 0) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1031 (*((buf)+1) = (unsigned char)((data) >> 8) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1032 2) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1033 #define aimutil_getle16(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1034 (((*((buf)+0)) << 0) & 0x00ff) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1035 (((*((buf)+1)) << 8) & 0xff00) \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1036 ) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1037 #define aimutil_putle32(buf, data) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1038 (*((buf)+0) = (unsigned char)((data) >> 0) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1039 (*((buf)+1) = (unsigned char)((data) >> 8) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1040 (*((buf)+2) = (unsigned char)((data) >> 16) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1041 (*((buf)+3) = (unsigned char)((data) >> 24) & 0xff), \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1042 4) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1043 #define aimutil_getle32(buf) ( \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1044 (((*((buf)+0)) << 0) & 0x000000ff) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1045 (((*((buf)+1)) << 8) & 0x0000ff00) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1046 (((*((buf)+2)) << 16) & 0x00ff0000) + \ |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1047 (((*((buf)+3)) << 24) & 0xff000000)) |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1048 |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2704
diff
changeset
|
1049 |
2086 | 1050 faim_export int aimutil_putstr(u_char *, const char *, int); |
1051 faim_export int aimutil_tokslen(char *toSearch, int index, char dl); | |
1052 faim_export int aimutil_itemcnt(char *toSearch, char dl); | |
1053 faim_export char *aimutil_itemidx(char *toSearch, int index, char dl); | |
1054 | |
1055 faim_export int aim_snlen(const char *sn); | |
1056 faim_export int aim_sncmp(const char *sn1, const char *sn2); | |
1057 | |
1058 /* for libc's that dont have it */ | |
1059 faim_export char *aim_strsep(char **pp, const char *delim); | |
1060 | |
1061 /* aim_meta.c */ | |
1062 faim_export char *aim_getbuilddate(void); | |
1063 faim_export char *aim_getbuildtime(void); | |
1064 faim_export int aim_getbuildstring(char *buf, int buflen); | |
1065 | |
1066 #include <aim_internal.h> | |
1067 | |
1068 #endif /* __AIM_H__ */ | |
1069 |