annotate src/protocols/oscar/aim.h @ 3791:06762b8e1194

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