annotate src/protocols/oscar/aim.h @ 12246:b7a51e68d0b8

[gaim-migrate @ 14548] Make some things static and namespace session_init and session_end committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 28 Nov 2005 06:20:06 +0000
parents d8042646da26
children 2a1961c1a345
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8978
8e69a730885c [gaim-migrate @ 9752]
Tim Ringenbach <marv@pidgin.im>
parents: 8880
diff changeset
1 /*
2086
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"
4194
9325df841a40 [gaim-migrate @ 4425]
Mark Doliner <mark@kingant.net>
parents: 4173
diff changeset
5 * -- Josh Myer
2086
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
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
12 #include "aim_cbtypes.h"
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
11253
7d31d61e6438 [gaim-migrate @ 13422]
Mark Doliner <mark@kingant.net>
parents: 11214
diff changeset
14 #include "debug.h"
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
15 #include "internal.h"
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 #include <stdio.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 #include <string.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 #include <fcntl.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 #include <sys/types.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 #include <stdlib.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 #include <stdarg.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 #include <errno.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 #include <time.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
26 #ifndef _WIN32
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 #include <sys/time.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 #include <unistd.h>
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
29 #include <netdb.h>
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 #include <netinet/in.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 #include <sys/socket.h>
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
32 #else
8244
5e7ffea3f76a [gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 8240
diff changeset
33 #include "libc_interface.h"
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 #endif
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35
6322
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
36 #ifdef __cplusplus
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
37 extern "C" {
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
38 #endif
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
39
11185
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
40 /* TODO: Remove these three typedefs and use guints everywhere. */
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
41 typedef guint8 fu8_t;
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
42 typedef guint16 fu16_t;
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
43 typedef guint32 fu32_t;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
44
11185
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
45 typedef guint32 aim_snacid_t;
1ce573a2e125 [gaim-migrate @ 13297]
Mark Doliner <mark@kingant.net>
parents: 11162
diff changeset
46 typedef guint16 flap_seqnum_t;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47
11338
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
48 #define WIN32_STATIC
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 #if defined(_WIN32) && !defined(WIN32_STATIC)
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 * For a win32 DLL, we define WIN32_INDLL if this file
11338
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
52 * is included while compiling the DLL. If it's not
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
53 * defined (it's included in a client app), the symbols
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54 * will be imported instead of exported.
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 #ifdef WIN32_INDLL
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 #define faim_export __declspec(dllexport)
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
58 #else
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 #define faim_export __declspec(dllimport)
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 #endif /* WIN32_INDLL */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61 #define faim_internal
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 #else
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 * Nothing normally needed for unix...
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 #define faim_export
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 #define faim_internal
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 #endif
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69
6322
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
70 #ifndef FALSE
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
71 #define FALSE (0)
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
72 #endif
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
73
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
74 #ifndef TRUE
6322
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
75 #define TRUE (!FALSE)
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
76 #endif
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
77
11338
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
78 #define FAIM_SNAC_HASH_SIZE 16
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
79
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
80 /*
17142948653e [gaim-migrate @ 13551]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
81 * Current Maximum Length for Screen Names (not including NULL)
2086
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 * Currently only names up to 16 characters can be registered
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8708
diff changeset
84 * however it is apparently legal for them to be larger.
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 */
4908
fd0a760786c5 [gaim-migrate @ 5242]
Sean Egan <seanegan@gmail.com>
parents: 4901
diff changeset
86 #define MAXSNLEN 97
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 * Current Maximum Length for Instant Messages
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 * This was found basically by experiment, but not wholly
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92 * accurate experiment. It should not be regarded
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 * as completely correct. But its a decent approximation.
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 * Note that although we can send this much, its impossible
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96 * for WinAIM clients (up through the latest (4.0.1957)) to
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 * send any more than 1kb. Amaze all your windows friends
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 * with utterly oversized instant messages!
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 * XXX: the real limit is the total SNAC size at 8192. Fix this.
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
101 *
2086
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 MAXMSGLEN 7987
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104
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 * Maximum size of a Buddy Icon.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108 #define MAXICONLEN 7168
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
109 #define AIM_ICONIDENT "AVT1picture.id"
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
111 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
112 * Current Maximum Length for Chat Room Messages
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 * This is actually defined by the protocol to be
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 * dynamic, but I have yet to see due cause to
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116 * define it dynamically here. Maybe later.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
117 *
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 MAXCHATMSGLEN 512
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120
5345
bfe98c4d331e [gaim-migrate @ 5721]
Mark Doliner <mark@kingant.net>
parents: 5146
diff changeset
121 /**
bfe98c4d331e [gaim-migrate @ 5721]
Mark Doliner <mark@kingant.net>
parents: 5146
diff changeset
122 * Maximum length for the password of an ICQ account
bfe98c4d331e [gaim-migrate @ 5721]
Mark Doliner <mark@kingant.net>
parents: 5146
diff changeset
123 */
bfe98c4d331e [gaim-migrate @ 5721]
Mark Doliner <mark@kingant.net>
parents: 5146
diff changeset
124 #define MAXICQPASSLEN 8
bfe98c4d331e [gaim-migrate @ 5721]
Mark Doliner <mark@kingant.net>
parents: 5146
diff changeset
125
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126 #define AIM_MD5_STRING "AOL Instant Messenger (SM)"
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 /*
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
129 * Client info. Filled in by the client and passed in to
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
130 * aim_send_login(). The information ends up getting passed to OSCAR
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
131 * through the initial login command.
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
133 */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134 struct client_info_s {
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
135 const char *clientstring;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
136 fu16_t clientid;
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
137 fu16_t major;
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
138 fu16_t minor;
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
139 fu16_t point;
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
140 fu16_t build;
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
141 fu32_t distrib;
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
142 const char *country; /* two-letter abbrev */
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
143 const char *lang; /* two-letter abbrev */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
146 /* Needs to be checked */
3458
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
147 #define CLIENTINFO_AIM_3_5_1670 { \
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
148 "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
149 0x0004, \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
150 0x0003, 0x0005, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
151 0x0000, 0x0686, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
152 0x0000002a, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
153 "us", "en", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
154 }
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
155
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
156 /* Needs to be checked */
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
157 /* Latest winaim without ssi */
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
158 #define CLIENTINFO_AIM_4_1_2010 { \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
159 "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
160 0x0004, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
161 0x0004, 0x0001, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
162 0x0000, 0x07da, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
163 0x0000004b, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
164 "us", "en", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
165 }
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
166
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
167 /* Needs to be checked */
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
168 #define CLIENTINFO_AIM_4_3_2188 { \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
169 "AOL Instant Messenger (SM), version 4.3.2188/WIN32", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
170 0x0109, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
171 0x0400, 0x0003, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
172 0x0000, 0x088c, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
173 0x00000086, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
174 "us", "en", \
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
175 }
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
176
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
177 /* Needs to be checked */
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
178 #define CLIENTINFO_AIM_4_8_2540 { \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
179 "AOL Instant Messenger (SM), version 4.8.2540/WIN32", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
180 0x0109, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
181 0x0004, 0x0008, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
182 0x0000, 0x09ec, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
183 0x000000af, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
184 "us", "en", \
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
185 }
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
186
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
187 /* Needs to be checked */
3595
1e60a05c7482 [gaim-migrate @ 3697]
Mark Doliner <mark@kingant.net>
parents: 3466
diff changeset
188 #define CLIENTINFO_AIM_5_0_2938 { \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
189 "AOL Instant Messenger, version 5.0.2938/WIN32", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
190 0x0109, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
191 0x0005, 0x0000, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
192 0x0000, 0x0b7a, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
193 0x00000000, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
194 "us", "en", \
3595
1e60a05c7482 [gaim-migrate @ 3697]
Mark Doliner <mark@kingant.net>
parents: 3466
diff changeset
195 }
1e60a05c7482 [gaim-migrate @ 3697]
Mark Doliner <mark@kingant.net>
parents: 3466
diff changeset
196
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
197 #define CLIENTINFO_AIM_5_1_3036 { \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
198 "AOL Instant Messenger, version 5.1.3036/WIN32", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
199 0x0109, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
200 0x0005, 0x0001, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
201 0x0000, 0x0bdc, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
202 0x000000d2, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
203 "us", "en", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
204 }
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
205
7253
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
206 #define CLIENTINFO_AIM_5_5_3415 { \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
207 "AOL Instant Messenger, version 5.5.3415/WIN32", \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
208 0x0109, \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
209 0x0005, 0x0005, \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
210 0x0000, 0x0057, \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
211 0x000000ef, \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
212 "us", "en", \
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
213 }
0ed4d53c46f9 [gaim-migrate @ 7830]
Mark Doliner <mark@kingant.net>
parents: 7172
diff changeset
214
10464
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
215 #define CLIENTINFO_AIM_5_9_3702 { \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
216 "AOL Instant Messenger, version 5.9.3702/WIN32", \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
217 0x0109, \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
218 0x0005, 0x0009, \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
219 0x0000, 0x0e76, \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
220 0x00000111, \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
221 "us", "en", \
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
222 }
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
223
5917
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
224 #define CLIENTINFO_ICHAT_1_0 { \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
225 "Apple iChat", \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
226 0x311a, \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
227 0x0001, 0x0000, \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
228 0x0000, 0x003c, \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
229 0x000000c6, \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
230 "us", "en", \
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
231 }
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
232
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
233 /* Needs to be checked */
3458
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
234 #define CLIENTINFO_ICQ_4_65_3281 { \
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
235 "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
236 0x010a, \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
237 0x0004, 0x0041, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
238 0x0001, 0x0cd1, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
239 0x00000055, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
240 "us", "en", \
3458
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
241 }
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
242
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
243 /* Needs to be checked */
3458
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
244 #define CLIENTINFO_ICQ_5_34_3728 { \
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
245 "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
246 0x010a, \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
247 0x0005, 0x0022, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
248 0x0001, 0x0e8f, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
249 0x00000055, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
250 "us", "en", \
3458
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
251 }
66b1ad9782a9 [gaim-migrate @ 3506]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
252
4071
2532f1192da3 [gaim-migrate @ 4283]
Mark Doliner <mark@kingant.net>
parents: 4070
diff changeset
253 #define CLIENTINFO_ICQ_5_45_3777 { \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
254 "ICQ Inc. - Product of ICQ (TM).2003a.5.45.1.3777.85", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
255 0x010a, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
256 0x0005, 0x002d, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
257 0x0001, 0x0ec1, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
258 0x00000055, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
259 "us", "en", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
260 }
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
261
7313
be7c1468c6a7 [gaim-migrate @ 7897]
Mark Doliner <mark@kingant.net>
parents: 7285
diff changeset
262 #define CLIENTINFO_ICQBASIC_14_3_1068 { \
4070
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
263 "ICQBasic", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
264 0x010a, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
265 0x0014, 0x0003, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
266 0x0000, 0x042c, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
267 0x0000043d, \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
268 "us", "en", \
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
269 }
6efe00ee7de8 [gaim-migrate @ 4282]
Mark Doliner <mark@kingant.net>
parents: 3952
diff changeset
270
7313
be7c1468c6a7 [gaim-migrate @ 7897]
Mark Doliner <mark@kingant.net>
parents: 7285
diff changeset
271 #define CLIENTINFO_NETSCAPE_7_0_1 { \
4317
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
272 "Netscape 2000 an approved user of AOL Instant Messenger (SM)", \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
273 0x1d0d, \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
274 0x0007, 0x0000, \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
275 0x0001, 0x0000, \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
276 0x00000058, \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
277 "us", "en", \
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
278 }
7c9f3d0fe8b2 [gaim-migrate @ 4571]
Mark Doliner <mark@kingant.net>
parents: 4293
diff changeset
279
12049
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
280 #define CLIENTINFO_GAIM { \
12178
d8042646da26 [gaim-migrate @ 14480]
Mark Doliner <mark@kingant.net>
parents: 12177
diff changeset
281 "Gaim/" VERSION, \
12177
6ecd4f75cc9d [gaim-migrate @ 14479]
Mark Doliner <mark@kingant.net>
parents: 12091
diff changeset
282 0x0109, \
6ecd4f75cc9d [gaim-migrate @ 14479]
Mark Doliner <mark@kingant.net>
parents: 12091
diff changeset
283 0x0005, 0x0001, \
6ecd4f75cc9d [gaim-migrate @ 14479]
Mark Doliner <mark@kingant.net>
parents: 12091
diff changeset
284 0x0000, 0x0bdc, \
6ecd4f75cc9d [gaim-migrate @ 14479]
Mark Doliner <mark@kingant.net>
parents: 12091
diff changeset
285 0x000000d2, \
12049
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
286 "us", "en", \
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
287 }
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
288
4071
2532f1192da3 [gaim-migrate @ 4283]
Mark Doliner <mark@kingant.net>
parents: 4070
diff changeset
289 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
2532f1192da3 [gaim-migrate @ 4283]
Mark Doliner <mark@kingant.net>
parents: 4070
diff changeset
290 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
291
12049
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
292 /*
d854a6fc7b82 [gaim-migrate @ 14344]
Mark Doliner <mark@kingant.net>
parents: 11401
diff changeset
293 * These could be arbitrary, but its easier to use the actual AIM values
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
294 */
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
295 #define AIM_CONN_TYPE_BOS 0x0002
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
296 #define AIM_CONN_TYPE_ADS 0x0005
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
297 #define AIM_CONN_TYPE_AUTH 0x0007
7806
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
298 #define AIM_CONN_TYPE_CHATNAV 0x000d
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
299 #define AIM_CONN_TYPE_CHAT 0x000e
7806
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
300 #define AIM_CONN_TYPE_SEARCH 0x000f
4804
9810ce8e7a96 [gaim-migrate @ 5124]
Mark Doliner <mark@kingant.net>
parents: 4763
diff changeset
301 #define AIM_CONN_TYPE_ICON 0x0010
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
302 #define AIM_CONN_TYPE_EMAIL 0x0018
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
303
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
304 /* they start getting arbitrary for rendezvous stuff =) */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
305 #define AIM_CONN_TYPE_RENDEZVOUS_PROXY 0xfffd /* these speak a strange language */
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
306 #define AIM_CONN_TYPE_RENDEZVOUS 0xfffe /* these do not speak FLAP! */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
307 #define AIM_CONN_TYPE_LISTENER 0xffff /* socket waiting for accept() */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
308
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
309 /* Command types for doing a rendezvous proxy login
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
310 * Thanks to Keith Lea and the Joust project for documenting these commands well */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
311 #define AIM_RV_PROXY_PACKETVER_DFLT 0x044a
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
312 #define AIM_RV_PROXY_ERROR 0x0001
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
313 #define AIM_RV_PROXY_INIT_SEND 0x0002 /* First command sent when creating a connection */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
314 #define AIM_RV_PROXY_INIT_RECV 0x0004 /* First command sent when receiving existing connection */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
315 #define AIM_RV_PROXY_ACK 0x0003
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
316 #define AIM_RV_PROXY_READY 0x0005
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
317
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
318 /* Number of bytes expected in each of the above packets, including the 2 bytes specifying length */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
319 #define AIM_RV_PROXY_ERROR_LEN 14
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
320 #define AIM_RV_PROXY_INIT_SEND_LEN 55
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
321 #define AIM_RV_PROXY_INIT_RECV_LEN 57
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
322 #define AIM_RV_PROXY_ACK_LEN 18
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
323 #define AIM_RV_PROXY_READY_LEN 12
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
324 #define AIM_RV_PROXY_HDR_LEN 12 /* Bytes in just the header alone */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
325
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
326 /* Default values for unknown/unused values in rendezvous proxy negotiation packets */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
327 #define AIM_RV_PROXY_SERVER_FLAGS 0x0220 /* Default flags sent by proxy server */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
328 #define AIM_RV_PROXY_CLIENT_FLAGS 0x0000 /* Default flags sent by client */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
329 #define AIM_RV_PROXY_UNKNOWNA_DFLT 0x00000000 /* Default value for an unknown block */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
330 #define AIM_RV_PROXY_SERVER_URL "ars.oscar.aol.com"
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
331 #define AIM_RV_PROXY_CONNECT_PORT 5190 /* The port we should always connect to */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
332
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
333 /* What is the purpose of this transfer? (Who will end up with a new file?)
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
334 * These values are used in oft_info->send_or_recv */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
335 #define AIM_XFER_SEND 0x0001
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
336 #define AIM_XFER_RECV 0x0002
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
337
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
338 /* Via what method is the data getting routed?
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
339 * These values are used in oft_info->method */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
340 #define AIM_XFER_DIRECT 0x0001 /* Direct connection; receiver connects to sender */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
341 #define AIM_XFER_REDIR 0x0002 /* Redirected connection; sender connects to receiver */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
342 #define AIM_XFER_PROXY 0x0003 /* Proxied connection */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
343
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
344 /* Who requested the proxy?
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
345 * The difference between a stage 2 and stage 3 proxied transfer is that the receiver does the
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
346 * initial login for a stage 2, but the sender must do it for a stage 3.
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
347 * These values are used in oft_info->stage */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
348 #define AIM_XFER_PROXY_NONE 0x0001
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
349 #define AIM_XFER_PROXY_STG1 0x0002 /* Sender requested a proxy be used (stage1) */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
350 #define AIM_XFER_PROXY_STG2 0x0003 /* Receiver requested a proxy be used (stage2) */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
351 #define AIM_XFER_PROXY_STG3 0x0004 /* Receiver requested a proxy be used (stage3) */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
352
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
353 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
354 * Subtypes, we need these for OFT stuff.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
355 */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
356 #define AIM_CONN_SUBTYPE_OFT_DIRECTIM 0x0001
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
357 #define AIM_CONN_SUBTYPE_OFT_GETFILE 0x0002
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
358 #define AIM_CONN_SUBTYPE_OFT_SENDFILE 0x0003
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
359 #define AIM_CONN_SUBTYPE_OFT_BUDDYICON 0x0004
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
360 #define AIM_CONN_SUBTYPE_OFT_VOICE 0x0005
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
361
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
362 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
363 * Status values returned from aim_conn_new(). ORed together.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
364 */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
365 #define AIM_CONN_STATUS_READY 0x0001
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
366 #define AIM_CONN_STATUS_INTERNALERR 0x0002
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
367 #define AIM_CONN_STATUS_RESOLVERR 0x0040
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
368 #define AIM_CONN_STATUS_CONNERR 0x0080
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
369 #define AIM_CONN_STATUS_INPROGRESS 0x0100
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
370
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
371 #define AIM_FRAMETYPE_FLAP 0x0000
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
372 #define AIM_FRAMETYPE_OFT 0x0001
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
373
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
374 typedef struct aim_conn_s {
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
375 int fd;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
376 fu16_t type;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
377 fu16_t subtype;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
378 flap_seqnum_t seqnum;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
379 fu32_t status;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
380 void *priv; /* misc data the client may want to store */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
381 void *internal; /* internal conn-specific libfaim data */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
382 time_t lastactivity; /* time of last transmit */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
383 int forcedlatency;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
384 void *handlerlist;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
385 void *sessv; /* pointer to parent session */
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
386 void *inside; /* only accessible from inside libfaim */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
387 struct aim_conn_s *next;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
388 } aim_conn_t;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
389
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
390 /*
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
391 * Byte Stream type. Sort of.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
392 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
393 * Use of this type serves a couple purposes:
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
394 * - Buffer/buflen pairs are passed all around everywhere. This turns
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
395 * that into one value, as well as abstracting it slightly.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
396 * - Through the abstraction, it is possible to enable bounds checking
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
397 * 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
398 * weird packets is much better than a segfault.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
399 * - I like having variables named "bs".
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
400 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
401 * 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
402 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
403 */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
404 typedef struct aim_bstream_s {
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
405 fu8_t *data;
3033
1143524a2eaf [gaim-migrate @ 3046]
Sean Egan <seanegan@gmail.com>
parents: 3017
diff changeset
406 fu32_t len;
1143524a2eaf [gaim-migrate @ 3046]
Sean Egan <seanegan@gmail.com>
parents: 3017
diff changeset
407 fu32_t offset;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
408 } aim_bstream_t;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
409
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
410 typedef struct aim_frame_s {
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
411 fu8_t hdrtype; /* defines which piece of the union to use */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
412 union {
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
413 struct {
7806
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
414 fu8_t channel;
10021
2f41f462ab4e [gaim-migrate @ 10946]
Mark Doliner <mark@kingant.net>
parents: 9975
diff changeset
415 flap_seqnum_t seqnum;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
416 } flap;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
417 struct {
7806
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
418 fu8_t magic[4]; /* ODC2 or OFT2 */
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3912
diff changeset
419 fu16_t hdrlen;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
420 fu16_t type;
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3912
diff changeset
421 } rend;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
422 } hdr;
7806
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
423 aim_bstream_t data; /* payload stream */
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
424 aim_conn_t *conn; /* the connection it came in on/is going out on */
c86f075b269a [gaim-migrate @ 8453]
Mark Doliner <mark@kingant.net>
parents: 7582
diff changeset
425 fu8_t handled; /* 0 = new, !0 = been handled */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
426 struct aim_frame_s *next;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
427 } aim_frame_t;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
428
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
429 typedef struct aim_msgcookie_s {
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
430 guchar cookie[8];
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
431 int type;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
432 void *data;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
433 time_t addtime;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
434 struct aim_msgcookie_s *next;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
435 } aim_msgcookie_t;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
436
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
437 /*
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
438 * AIM Session: The main client-data interface.
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
439 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
440 */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
441 typedef struct aim_session_s {
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
442
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
443 /* ---- Client Accessible ------------------------ */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
444
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
445 /* Our screen name. */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
446 char sn[MAXSNLEN+1];
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
447
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
448 /*
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
449 * Pointer to anything the client wants to
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
450 * explicitly associate with this session.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
451 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
452 * This is for use in the callbacks mainly. In any
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
453 * callback, you can access this with sess->aux_data.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
454 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
455 */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
456 void *aux_data;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
457
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
458 /* ---- Internal Use Only ------------------------ */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
459
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
460 /* Connection information */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
461 aim_conn_t *connlist;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
462
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
463 /*
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
464 * Transmit/receive queues.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
465 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
466 * 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
467 * 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
468 * Its really bad and the API/event model is quirky at best.
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
469 *
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
470 */
8982
a4fd6666bb83 [gaim-migrate @ 9757]
Tim Ringenbach <marv@pidgin.im>
parents: 8978
diff changeset
471 aim_frame_t *queue_outgoing;
10021
2f41f462ab4e [gaim-migrate @ 10946]
Mark Doliner <mark@kingant.net>
parents: 9975
diff changeset
472 aim_frame_t *queue_incoming;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
473
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
474 /*
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
475 * Tx Enqueuing function.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
476 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
477 * This is how you override the transmit direction of libfaim's
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
478 * internal I/O. This function will be called whenever it needs
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
479 * to send something.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
480 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
481 */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
482 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
483
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
484 void *modlistv;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
485
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
486 struct {
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
487 char server[128];
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
488 char username[128];
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
489 char password[128];
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
490 } socksproxy;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
491
10035
4e7fe18a36b7 [gaim-migrate @ 10994]
Mark Doliner <mark@kingant.net>
parents: 10021
diff changeset
492 fu8_t nonblocking;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
493
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
494 /*
11154
0d58a17095db [gaim-migrate @ 13236]
Mark Doliner <mark@kingant.net>
parents: 11024
diff changeset
495 * Outstanding snac handling
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
496 *
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
497 * XXX: Should these be per-connection? -mid
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
498 */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
499 void *snac_hash[FAIM_SNAC_HASH_SIZE];
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
500 aim_snacid_t snacid_next;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
501
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
502 aim_msgcookie_t *msgcookies;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
503 struct aim_icq_info *icq_info;
4826
e6654fab588b [gaim-migrate @ 5151]
Mark Doliner <mark@kingant.net>
parents: 4811
diff changeset
504 struct aim_oft_info *oft_info;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
505 struct aim_authresp_info *authinfo;
7045
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
506 struct aim_emailinfo *emailinfo;
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
507
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
508 struct {
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
509 struct aim_userinfo_s *userinfo;
7466
fa0324675ed9 [gaim-migrate @ 8079]
Mark Doliner <mark@kingant.net>
parents: 7334
diff changeset
510 struct userinfo_node *torequest;
fa0324675ed9 [gaim-migrate @ 8079]
Mark Doliner <mark@kingant.net>
parents: 7334
diff changeset
511 struct userinfo_node *requested;
7045
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
512 int waiting_for_response;
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
513 } locate;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
514
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
515 /* Server-stored information (ssi) */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
516 struct {
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
517 int received_data;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
518 fu16_t numitems;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
519 struct aim_ssi_item *official;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
520 struct aim_ssi_item *local;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
521 struct aim_ssi_tmp *pending;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
522 time_t timestamp;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
523 int waiting_for_ack;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
524 } ssi;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
525 } aim_session_t;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
526
2507
1069b0940237 [gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2421
diff changeset
527 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
528 #define AIM_ICQ_STATE_NORMAL 0x00000000
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
529 #define AIM_ICQ_STATE_AWAY 0x00000001
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
530 #define AIM_ICQ_STATE_DND 0x00000002
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
531 #define AIM_ICQ_STATE_OUT 0x00000004
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
532 #define AIM_ICQ_STATE_BUSY 0x00000010
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
533 #define AIM_ICQ_STATE_CHAT 0x00000020
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
534 #define AIM_ICQ_STATE_INVISIBLE 0x00000100
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
535 #define AIM_ICQ_STATE_WEBAWARE 0x00010000
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
536 #define AIM_ICQ_STATE_HIDEIP 0x00020000
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
537 #define AIM_ICQ_STATE_BIRTHDAY 0x00080000
4342
051265d35a36 [gaim-migrate @ 4607]
Mark Doliner <mark@kingant.net>
parents: 4333
diff changeset
538 #define AIM_ICQ_STATE_DIRECTDISABLED 0x00100000
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
539 #define AIM_ICQ_STATE_ICQHOMEPAGE 0x00200000
4342
051265d35a36 [gaim-migrate @ 4607]
Mark Doliner <mark@kingant.net>
parents: 4333
diff changeset
540 #define AIM_ICQ_STATE_DIRECTREQUIREAUTH 0x10000000
051265d35a36 [gaim-migrate @ 4607]
Mark Doliner <mark@kingant.net>
parents: 4333
diff changeset
541 #define AIM_ICQ_STATE_DIRECTCONTACTLIST 0x20000000
2507
1069b0940237 [gaim-migrate @ 2520]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2421
diff changeset
542
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
543 /*
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
544 * Get command from connections
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
545 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
546 * 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
547 * XXX Make this easily overridable.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
548 *
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
549 */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
550 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
551
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
552 /*
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
553 * Dispatch commands that are in the rx queue.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
554 */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
555 faim_export void aim_rxdispatch(aim_session_t *);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
556
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
557 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
558
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
559 faim_export int aim_logoff(aim_session_t *);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
560
10344
5976491e07a7 [gaim-migrate @ 11554]
Mark Doliner <mark@kingant.net>
parents: 10271
diff changeset
561 #if !defined(FAIM_INTERNAL)
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
562 /* the library should never call aim_conn_kill */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
563 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
564 #endif
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
565
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
566 typedef int (*aim_rxcallback_t)(aim_session_t *, aim_frame_t *, ...);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
567
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
568
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
569 /* auth.c */
2704
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
570 struct aim_clientrelease {
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
571 char *name;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
572 fu32_t build;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
573 char *url;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
574 char *info;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
575 };
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
576
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
577 struct aim_authresp_info {
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
578 char *sn;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
579 fu16_t errorcode;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
580 char *errorurl;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
581 fu16_t regstatus;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
582 char *email;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
583 char *bosip;
4293
79d871c11eb9 [gaim-migrate @ 4546]
Mark Doliner <mark@kingant.net>
parents: 4269
diff changeset
584 fu16_t cookielen;
2704
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
585 fu8_t *cookie;
3912
e73c48cf1645 [gaim-migrate @ 4071]
Mark Doliner <mark@kingant.net>
parents: 3867
diff changeset
586 char *chpassurl;
2704
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
587 struct aim_clientrelease latestrelease;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
588 struct aim_clientrelease latestbeta;
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
589 };
fee85ed7fc3f [gaim-migrate @ 2717]
Adam Fritzler <mid@auk.cx>
parents: 2703
diff changeset
590
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
591 /* Callback data for redirect. */
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
592 struct aim_redirect_data {
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
593 fu16_t group;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
594 const char *ip;
4293
79d871c11eb9 [gaim-migrate @ 4546]
Mark Doliner <mark@kingant.net>
parents: 4269
diff changeset
595 fu16_t cookielen;
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
596 const fu8_t *cookie;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
597 struct { /* group == AIM_CONN_TYPE_CHAT */
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
598 fu16_t exchange;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
599 const char *room;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
600 fu16_t instance;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
601 } chat;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
602 };
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
603
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
604 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
605 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
606 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
607 faim_export int aim_send_login(aim_session_t *, aim_conn_t *, const char *, const char *, struct client_info_s *, const char *key);
10464
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
608 /* 0x000b */ faim_export int aim_auth_securid_send(aim_session_t *sess, const char *securid);
61ef9a964574 [gaim-migrate @ 11739]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
609
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
610 faim_export void aim_purge_rxqueue(aim_session_t *);
4333
cc2f780c0505 [gaim-migrate @ 4597]
Mark Doliner <mark@kingant.net>
parents: 4317
diff changeset
611 faim_export void aim_cleansnacs(aim_session_t *, int maxage);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
612
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
613 #define AIM_TX_QUEUED 0 /* default */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
614 #define AIM_TX_IMMEDIATE 1
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
615 #define AIM_TX_USER 2
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
616 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
617
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
618 faim_export int aim_tx_flushqueue(aim_session_t *);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
619 faim_export void aim_tx_purgequeue(aim_session_t *);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
620
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
621 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
622
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
623 faim_export int aim_conn_addhandler(aim_session_t *, aim_conn_t *conn, fu16_t family, fu16_t type, aim_rxcallback_t newhandler, fu16_t flags);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
624 faim_export int aim_clearhandlers(aim_conn_t *conn);
2086
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 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
627 faim_export aim_session_t *aim_conn_getsess(aim_conn_t *conn);
10271
361c9170d8af [gaim-migrate @ 11420]
Mark Doliner <mark@kingant.net>
parents: 10267
diff changeset
628 faim_export void aim_conn_close(aim_conn_t *deadconn);
11162
ccb38cf22483 [gaim-migrate @ 13263]
Mark Doliner <mark@kingant.net>
parents: 11159
diff changeset
629 faim_export aim_conn_t *aim_newconn(aim_session_t *, int type);
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
630 faim_export int aim_conn_in_sess(aim_session_t *sess, aim_conn_t *conn);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
631 faim_export int aim_conn_isready(aim_conn_t *);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
632 faim_export int aim_conn_setstatus(aim_conn_t *, int);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
633 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
634 faim_export int aim_conn_isconnecting(aim_conn_t *conn);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
635
11253
7d31d61e6438 [gaim-migrate @ 13422]
Mark Doliner <mark@kingant.net>
parents: 11214
diff changeset
636 faim_export void aim_session_init(aim_session_t *, fu8_t nonblocking);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
637 faim_export void aim_session_kill(aim_session_t *);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
638 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
639 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
640 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
641
7285
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
642 /* 0x0001 - service.c */
10199
76e296e16def [gaim-migrate @ 11316]
Mark Doliner <mark@kingant.net>
parents: 10035
diff changeset
643 faim_export int aim_srv_setavailmsg(aim_session_t *sess, const char *msg);
7474
2bdacd38528c [gaim-migrate @ 8087]
Mark Doliner <mark@kingant.net>
parents: 7466
diff changeset
644 faim_export int aim_srv_setidle(aim_session_t *sess, fu32_t idletime);
5917
a747e9e0e2cf [gaim-migrate @ 6349]
Mark Doliner <mark@kingant.net>
parents: 5844
diff changeset
645
3912
e73c48cf1645 [gaim-migrate @ 4071]
Mark Doliner <mark@kingant.net>
parents: 3867
diff changeset
646 /* misc.c */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
647
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
648 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
649 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
650 #define AIM_VISIBILITYCHANGE_DENYADD 0x07
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
651 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
652
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
653 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
654 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
655
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
656 #define AIM_WARN_ANON 0x01
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
657
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
658 faim_export int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn);
2703
441b84ab7f4e [gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2675
diff changeset
659 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
660 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
661 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
662 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
663 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
664 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *);
441b84ab7f4e [gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2675
diff changeset
665 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
666 faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
667 faim_export int aim_setextstatus(aim_session_t *sess, fu32_t status);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
668
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
669 #define AIM_CLIENTTYPE_UNKNOWN 0x0000
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
670 #define AIM_CLIENTTYPE_MC 0x0001
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
671 #define AIM_CLIENTTYPE_WINAIM 0x0002
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
672 #define AIM_CLIENTTYPE_WINAIM41 0x0003
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
673 #define AIM_CLIENTTYPE_AOL_TOC 0x0004
5800
ac418a9dea99 [gaim-migrate @ 6225]
Mark Doliner <mark@kingant.net>
parents: 5556
diff changeset
674 faim_export fu16_t aim_im_fingerprint(const fu8_t *msghdr, int len);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
675
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
676 #define AIM_RATE_CODE_CHANGE 0x0001
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
677 #define AIM_RATE_CODE_WARNING 0x0002
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
678 #define AIM_RATE_CODE_LIMIT 0x0003
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
679 #define AIM_RATE_CODE_CLEARLIMIT 0x0004
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
680 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
681
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
682
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
683
3912
e73c48cf1645 [gaim-migrate @ 4071]
Mark Doliner <mark@kingant.net>
parents: 3867
diff changeset
684 /* im.c */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
685 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
686 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
687 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
688 #define AIM_OPT_SUBTYPE_GET_LIST 0x0012
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
689
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
690 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
691 #define AIM_TRANSFER_DENY_DECLINE 0x0001
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
692 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
693
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
694 #define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED 0x00000001
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
695 #define AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED 0x00000002
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
696
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
697 /* This is what the server will give you if you don't set them yourself. */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
698 #define AIM_IMPARAM_DEFAULTS { \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
699 0, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
700 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
701 512, /* !! Note how small this is. */ \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
702 (99.9)*10, (99.9)*10, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
703 1000 /* !! And how large this is. */ \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
704 }
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
705
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
706 /* This is what most AIM versions use. */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
707 #define AIM_IMPARAM_REASONABLE { \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
708 0, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
709 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
710 8000, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
711 (99.9)*10, (99.9)*10, \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
712 0 \
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
713 }
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
714
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
715 struct aim_icbmparameters {
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
716 fu16_t maxchan;
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
717 fu32_t flags; /* AIM_IMPARAM_FLAG_ */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
718 fu16_t maxmsglen; /* message size that you will accept */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
719 fu16_t maxsenderwarn; /* this and below are *10 (999=99.9%) */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
720 fu16_t maxrecverwarn;
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
721 fu32_t minmsginterval; /* in milliseconds? */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
722 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
723
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
724 struct aim_chat_roominfo {
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
725 fu16_t exchange;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
726 char *name;
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
727 fu16_t instance;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
728 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
729
9806
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
730 #define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
731 #define AIM_IMFLAGS_ACK 0x0002 /* request a receipt notice */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
732 #define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
733 #define AIM_IMFLAGS_HASICON 0x0020 /* already has icon */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
734 #define AIM_IMFLAGS_SUBENC_MACINTOSH 0x0040 /* damn that Steve Jobs! */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
735 #define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */
9806
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
736 #define AIM_IMFLAGS_EXTDATA 0x0100
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
737 #define AIM_IMFLAGS_X 0x0200
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
738 #define AIM_IMFLAGS_MULTIPART 0x0400 /* ->mpmsg section valid */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
739 #define AIM_IMFLAGS_OFFLINE 0x0800 /* send to offline user */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
740 #define AIM_IMFLAGS_TYPINGNOT 0x1000 /* typing notification */
41b97d72e647 [gaim-migrate @ 10674]
Mark Doliner <mark@kingant.net>
parents: 8983
diff changeset
741
9826
6f2a90c36ee2 [gaim-migrate @ 10697]
Mark Doliner <mark@kingant.net>
parents: 9807
diff changeset
742 #define AIM_CHARSET_ASCII 0x0000
6f2a90c36ee2 [gaim-migrate @ 10697]
Mark Doliner <mark@kingant.net>
parents: 9807
diff changeset
743 #define AIM_CHARSET_UNICODE 0x0002 /* UCS-2BE */
6f2a90c36ee2 [gaim-migrate @ 10697]
Mark Doliner <mark@kingant.net>
parents: 9807
diff changeset
744 #define AIM_CHARSET_CUSTOM 0x0003
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
745
2270
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 * Multipart message structures.
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 typedef struct aim_mpmsg_section_s {
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
750 fu16_t charset;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
751 fu16_t charsubset;
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
752 gchar *data;
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
753 fu16_t datalen;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
754 struct aim_mpmsg_section_s *next;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
755 } aim_mpmsg_section_t;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
756
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
757 typedef struct aim_mpmsg_s {
10595
de34037a02c7 [gaim-migrate @ 12010]
Mark Doliner <mark@kingant.net>
parents: 10570
diff changeset
758 unsigned int numparts;
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
759 aim_mpmsg_section_t *parts;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
760 } aim_mpmsg_t;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
761
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
762 faim_export int aim_mpmsg_init(aim_session_t *sess, aim_mpmsg_t *mpm);
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
763 faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const gchar *data, fu16_t datalen);
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
764 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
765 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
766 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
767
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
768 /*
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
769 * Arguments to aim_send_im_ext().
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
770 *
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
771 * This is really complicated. But immensely versatile.
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
772 *
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
773 */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
774 struct aim_sendimext_args {
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
775
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
776 /* These are _required_ */
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
777 const char *destsn;
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
778 fu32_t flags; /* often 0 */
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
779
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
780 /* Only required if not using multipart messages */
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
781 const char *msg;
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
782 int msglen;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
783
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
784 /* Required if ->msg is not provided */
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
785 aim_mpmsg_t *mpmsg;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
786
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
787 /* Only used if AIM_IMFLAGS_HASICON is set */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
788 fu32_t iconlen;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
789 time_t iconstamp;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
790 fu32_t iconsum;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
791
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
792 /* Only used if AIM_IMFLAGS_CUSTOMFEATURES is set */
10595
de34037a02c7 [gaim-migrate @ 12010]
Mark Doliner <mark@kingant.net>
parents: 10570
diff changeset
793 fu16_t featureslen;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
794 fu8_t *features;
2270
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 /* 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
797 fu16_t charset;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
798 fu16_t charsubset;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
799 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
800
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
801 /*
2866
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
802 * Arguments to aim_send_rtfmsg().
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
803 */
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
804 struct aim_sendrtfmsg_args {
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
805 const char *destsn;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
806 fu32_t fgcolor;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
807 fu32_t bgcolor;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
808 const char *rtfmsg; /* must be in RTF */
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
809 };
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
810
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
811 /*
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
812 * This information is provided in the Incoming ICBM callback for
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
813 * Channel 1 ICBM's.
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
814 *
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
815 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
816 * are optional, both are always set by the current libfaim code.
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
817 * 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
818 * consistency with aim_sendimext_args.
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
819 *
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
820 * Multipart messages require some explanation. If you want to use them,
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
821 * I suggest you read all the comments in im.c.
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 */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
824 struct aim_incomingim_ch1_args {
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
825
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
826 /* Always provided */
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
827 aim_mpmsg_t mpmsg;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
828 fu32_t icbmflags; /* some flags apply only to ->msg, not all mpmsg */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
829
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
830 /* Only provided if message has a human-readable section */
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
831 gchar *msg;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
832 int msglen;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
833
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
834 /* Only provided if AIM_IMFLAGS_HASICON is set */
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
835 time_t iconstamp;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
836 fu32_t iconlen;
2626
93f9bbd62630 [gaim-migrate @ 2639]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2507
diff changeset
837 fu16_t iconsum;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
838
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
839 /* Only provided if AIM_IMFLAGS_CUSTOMFEATURES is set */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
840 fu8_t *features;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
841 fu8_t featureslen;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
842
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
843 /* Only provided if AIM_IMFLAGS_EXTDATA is set */
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
844 fu8_t extdatalen;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
845 fu8_t *extdata;
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
846
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
847 /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set */
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
848 fu16_t charset;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
849 fu16_t charsubset;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
850 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
851
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
852 /* Valid values for channel 2 args->status */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
853 #define AIM_RENDEZVOUS_PROPOSE 0x0000
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
854 #define AIM_RENDEZVOUS_CANCEL 0x0001
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
855 #define AIM_RENDEZVOUS_ACCEPT 0x0002
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
856
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
857 struct aim_incomingim_ch2_args {
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
858 fu16_t status;
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
859 guchar cookie[8];
6197
af2e34423e9c [gaim-migrate @ 6683]
Mark Doliner <mark@kingant.net>
parents: 6101
diff changeset
860 int reqclass;
4898
bd37db7531e4 [gaim-migrate @ 5230]
Mark Doliner <mark@kingant.net>
parents: 4889
diff changeset
861 const char *proxyip;
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
862 const char *clientip;
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
863 const char *verifiedip;
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
864 fu16_t port;
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
865 fu16_t errorcode;
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
866 const char *msg; /* invite message or file description */
9933
cee849d17167 [gaim-migrate @ 10825]
Mark Doliner <mark@kingant.net>
parents: 9826
diff changeset
867 fu16_t msglen;
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
868 const char *encoding;
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
869 const char *language;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
870 union {
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
871 struct {
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
872 fu32_t checksum;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
873 fu32_t length;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
874 time_t timestamp;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
875 fu8_t *icon;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
876 } icon;
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
877 struct {
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
878 struct aim_chat_roominfo roominfo;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
879 } chat;
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
880 struct {
8708
f71c0a3fcb3d [gaim-migrate @ 9461]
Mark Doliner <mark@kingant.net>
parents: 8341
diff changeset
881 fu16_t msgtype;
2866
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
882 fu32_t fgcolor;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
883 fu32_t bgcolor;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
884 const char *rtfmsg;
6d62d4520460 [gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2821
diff changeset
885 } rtfmsg;
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
886 struct {
3771
765769211688 [gaim-migrate @ 3910]
Rob Flynn <gaim@robflynn.com>
parents: 3694
diff changeset
887 fu16_t subtype;
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
888 fu16_t totfiles;
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
889 fu32_t totsize;
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
890 char *filename;
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
891 /* reqnum: 0x0001 usually; 0x0002 = reply request for stage 2 proxy transfer */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
892 fu16_t reqnum;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
893 fu8_t use_proxy; /* Did the user request that we use a rv proxy? */
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3595
diff changeset
894 } sendfile;
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
895 } info;
2869
9b029055cfba [gaim-migrate @ 2882]
Adam Fritzler <mid@auk.cx>
parents: 2866
diff changeset
896 void *destructor; /* used internally only */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
897 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
898
3141
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
899 /* Valid values for channel 4 args->type */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
900 #define AIM_ICQMSG_AUTHREQUEST 0x0006
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
901 #define AIM_ICQMSG_AUTHDENIED 0x0007
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
902 #define AIM_ICQMSG_AUTHGRANTED 0x0008
3141
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
903
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
904 struct aim_incomingim_ch4_args {
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
905 fu32_t uin; /* Of the sender of the ICBM */
4173
b66f960bfe60 [gaim-migrate @ 4403]
Mark Doliner <mark@kingant.net>
parents: 4151
diff changeset
906 fu8_t type;
b66f960bfe60 [gaim-migrate @ 4403]
Mark Doliner <mark@kingant.net>
parents: 4151
diff changeset
907 fu8_t flags;
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
908 gchar *msg; /* Reason for auth request, deny, or accept */
4076
91c4bd698d39 [gaim-migrate @ 4291]
Mark Doliner <mark@kingant.net>
parents: 4071
diff changeset
909 int msglen;
3141
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
910 };
bcdbffc2c3e6 [gaim-migrate @ 3156]
Rob Flynn <gaim@robflynn.com>
parents: 3140
diff changeset
911
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
912 /* SNAC sending functions */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
913 /* 0x0002 */ faim_export int aim_im_setparams(aim_session_t *sess, struct aim_icbmparameters *params);
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
914 /* 0x0004 */ faim_export int aim_im_reqparams(aim_session_t *sess);
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
915 /* 0x0006 */ faim_export int aim_im_sendch1_ext(aim_session_t *sess, struct aim_sendimext_args *args);
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
916 /* 0x0006 */ faim_export int aim_im_sendch1(aim_session_t *, const char *destsn, fu16_t flags, const char *msg);
8225
9790cda80d52 [gaim-migrate @ 8948]
Mark Doliner <mark@kingant.net>
parents: 8219
diff changeset
917 /* 0x0006 */ faim_export int aim_im_sendch2_chatinvite(aim_session_t *sess, const char *sn, const char *msg, fu16_t exchange, const char *roomname, fu16_t instance);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
918 /* 0x0006 */ faim_export int aim_im_sendch2_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum);
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
919 /* 0x0006 */ faim_export int aim_im_sendch2_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args);
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
920 /* 0x0006 */ faim_export int aim_im_sendch2_odcrequest(aim_session_t *sess, guchar *cookie, gboolean usecookie, const char *sn, const fu8_t *ip, fu16_t port);
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
921 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_ask(aim_session_t *sess, struct aim_oft_info *oft_info);
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
922 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_accept(aim_session_t *sess, struct aim_oft_info *info);
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
923 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_cancel(aim_session_t *sess, struct aim_oft_info *oft_info);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
924 /* 0x0006 */ faim_export int aim_im_sendch2_geticqaway(aim_session_t *sess, const char *sn, int type);
11000
218cccfb8e48 [gaim-migrate @ 12849]
Mark Doliner <mark@kingant.net>
parents: 10998
diff changeset
925 /* 0x0006 */ faim_export int aim_im_sendch4(aim_session_t *sess, const char *sn, fu16_t type, const char *message);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
926 /* 0x0008 */ faim_export int aim_im_warn(aim_session_t *sess, aim_conn_t *conn, const char *destsn, fu32_t flags);
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
927 /* 0x000b */ faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const guchar *cookie, fu16_t code);
6059
d8cd876e613e [gaim-migrate @ 6509]
Mark Doliner <mark@kingant.net>
parents: 5927
diff changeset
928 /* 0x0014 */ faim_export int aim_im_sendmtn(aim_session_t *sess, fu16_t type1, const char *sn, fu16_t type2);
11401
69b0378c79e0 [gaim-migrate @ 13636]
Mark Doliner <mark@kingant.net>
parents: 11399
diff changeset
929 faim_export void aim_icbm_makecookie(guchar* cookie);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
930
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
931
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
932 /* ft.c */
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
933 struct aim_fileheader_t {
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
934 #if 0
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
935 char magic[4]; /* 0 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
936 fu16_t hdrlen; /* 4 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
937 fu16_t hdrtype; /* 6 */
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
938 #endif
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
939 guchar bcookie[8]; /* 8 */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
940 fu16_t encrypt; /* 16 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
941 fu16_t compress; /* 18 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
942 fu16_t totfiles; /* 20 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
943 fu16_t filesleft; /* 22 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
944 fu16_t totparts; /* 24 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
945 fu16_t partsleft; /* 26 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
946 fu32_t totsize; /* 28 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
947 fu32_t size; /* 32 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
948 fu32_t modtime; /* 36 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
949 fu32_t checksum; /* 40 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
950 fu32_t rfrcsum; /* 44 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
951 fu32_t rfsize; /* 48 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
952 fu32_t cretime; /* 52 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
953 fu32_t rfcsum; /* 56 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
954 fu32_t nrecvd; /* 60 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
955 fu32_t recvcsum; /* 64 */
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
956 char idstring[32]; /* 68 */
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
957 fu8_t flags; /* 100 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
958 fu8_t lnameoffset; /* 101 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
959 fu8_t lsizeoffset; /* 102 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
960 char dummy[69]; /* 103 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
961 char macfileinfo[16]; /* 172 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
962 fu16_t nencode; /* 188 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
963 fu16_t nlanguage; /* 190 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
964 char name[64]; /* 192 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
965 /* 256 */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
966 };
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
967
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
968 struct aim_rv_proxy_info {
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
969 fu16_t packet_ver;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
970 fu16_t cmd_type;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
971 fu16_t flags;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
972 char* ip; /* IP address sent along with this packet */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
973 fu16_t port; /* This is NOT the port we should use to connect. Always connect to 5190 */
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
974 guchar cookie[8];
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
975 fu32_t unknownA;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
976 fu16_t err_code; /* Valid only for cmd_type of AIM_RV_PROXY_ERROR */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
977 aim_conn_t *conn;
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
978 aim_session_t *sess;
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
979 };
3595
1e60a05c7482 [gaim-migrate @ 3697]
Mark Doliner <mark@kingant.net>
parents: 3466
diff changeset
980
4826
e6654fab588b [gaim-migrate @ 5151]
Mark Doliner <mark@kingant.net>
parents: 4811
diff changeset
981 struct aim_oft_info {
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
982 guchar cookie[8];
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
983 char *sn;
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
984 char *proxyip;
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
985 char *clientip;
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
986 char *verifiedip;
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
987 fu16_t port;
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
988
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
989 int send_or_recv; /* Send or receive */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
990 int method; /* What method is being used to transfer this file? DIRECT, REDIR, or PROXY */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
991 int stage; /* At what stage was a proxy requested? NONE, STG1, STG2*/
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
992 int xfer_reffed; /* There are many timers, but we should only ref the xfer once */
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
993 fu32_t res_bytes; /* The bytes already received for resuming a transfer */
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
994
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
995 aim_conn_t *conn;
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
996 aim_session_t *sess;
11214
751de30689ef [gaim-migrate @ 13346]
Jonathan Clark <ardentlygnarly>
parents: 11185
diff changeset
997 int success; /* Was the connection successful? Used for timing out the transfer. */
4832
edfe778868e2 [gaim-migrate @ 5157]
Mark Doliner <mark@kingant.net>
parents: 4826
diff changeset
998 struct aim_fileheader_t fh;
4826
e6654fab588b [gaim-migrate @ 5151]
Mark Doliner <mark@kingant.net>
parents: 4811
diff changeset
999 struct aim_oft_info *next;
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1000 struct aim_rv_proxy_info *proxy_info;
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1001 };
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1002
4763
c050edba7b83 [gaim-migrate @ 5081]
Mark Doliner <mark@kingant.net>
parents: 4759
diff changeset
1003 faim_export fu32_t aim_oft_checksum_chunk(const fu8_t *buffer, int bufferlen, fu32_t prevcheck);
4650
4938d12f6d48 [gaim-migrate @ 4961]
Mark Doliner <mark@kingant.net>
parents: 4646
diff changeset
1004 faim_export fu32_t aim_oft_checksum_file(char *filename);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1005 faim_export int aim_handlerendconnect(aim_session_t *sess, aim_conn_t *cur);
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1006 faim_export int aim_odc_send_typing(aim_session_t *sess, aim_conn_t *conn, int typing);
4870
773135edda4a [gaim-migrate @ 5200]
Mark Doliner <mark@kingant.net>
parents: 4853
diff changeset
1007 faim_export int aim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *msg, int len, int encoding, int isawaymsg);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1008 faim_export const char *aim_odc_getsn(aim_conn_t *conn);
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
1009 faim_export const guchar *aim_odc_getcookie(aim_conn_t *conn);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1010 faim_export aim_conn_t *aim_odc_getconn(aim_session_t *sess, const char *sn);
8982
a4fd6666bb83 [gaim-migrate @ 9757]
Tim Ringenbach <marv@pidgin.im>
parents: 8978
diff changeset
1011 faim_export aim_conn_t *aim_odc_initiate(aim_session_t *sess, const char *sn, int listenfd,
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
1012 const fu8_t *localip, fu16_t port, const guchar *mycookie);
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
1013 faim_export aim_conn_t *aim_odc_connect(aim_session_t *sess, const char *sn, const char *addr, const guchar *cookie);
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
1014
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
1015 faim_export struct aim_oft_info *aim_oft_createinfo(aim_session_t *sess, const guchar *cookie, const char *sn,
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1016 const char *ip, fu16_t port, fu32_t size, fu32_t modtime, char *filename, int send_or_recv,
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1017 int method, int stage);
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
1018 faim_export int aim_oft_destroyinfo(struct aim_oft_info *oft_info);
11399
48244c196228 [gaim-migrate @ 13634]
Mark Doliner <mark@kingant.net>
parents: 11369
diff changeset
1019 faim_export struct aim_rv_proxy_info *aim_rv_proxy_createinfo(aim_session_t *sess, const guchar *cookie, fu16_t port);
8240
609a62b8e748 [gaim-migrate @ 8963]
Mark Doliner <mark@kingant.net>
parents: 8233
diff changeset
1020 faim_export int aim_sendfile_listen(aim_session_t *sess, struct aim_oft_info *oft_info, int listenfd);
5146
ac9ca88d4b25 [gaim-migrate @ 5510]
Mark Doliner <mark@kingant.net>
parents: 4908
diff changeset
1021 faim_export int aim_oft_sendheader(aim_session_t *sess, fu16_t type, struct aim_oft_info *oft_info);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1022
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1023 faim_export int aim_rv_proxy_init_recv(struct aim_rv_proxy_info *proxy_info);
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1024 faim_export int aim_rv_proxy_init_send(struct aim_rv_proxy_info *proxy_info);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1025
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1026 faim_export int aim_sendfile_listen(aim_session_t *sess, struct aim_oft_info *oft_info, int listenfd);
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1027 faim_export int aim_oft_sendheader(aim_session_t *sess, fu16_t type, struct aim_oft_info *oft_info);
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1028 int aim_bstream_send(aim_bstream_t *bs, aim_conn_t *conn, size_t count);
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1029 faim_internal struct aim_rv_proxy_info *aim_rv_proxy_read(aim_session_t *sess, aim_conn_t *conn);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1030
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1031 /* 0x0002 - locate.c */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1032 /*
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1033 * AIM User Info, Standard Form.
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1034 */
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1035 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1036 #define AIM_FLAG_ADMINISTRATOR 0x0002
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1037 #define AIM_FLAG_AOL 0x0004
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1038 #define AIM_FLAG_OSCAR_PAY 0x0008
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1039 #define AIM_FLAG_FREE 0x0010
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1040 #define AIM_FLAG_AWAY 0x0020
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1041 #define AIM_FLAG_ICQ 0x0040
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1042 #define AIM_FLAG_WIRELESS 0x0080
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1043 #define AIM_FLAG_UNKNOWN100 0x0100
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1044 #define AIM_FLAG_UNKNOWN200 0x0200
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1045 #define AIM_FLAG_ACTIVEBUDDY 0x0400
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1046 #define AIM_FLAG_UNKNOWN800 0x0800
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1047 #define AIM_FLAG_ABINTERNAL 0x1000
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1048 #define AIM_FLAG_ALLUSERS 0x001f
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1049
5836
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1050 #define AIM_USERINFO_PRESENT_FLAGS 0x00000001
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1051 #define AIM_USERINFO_PRESENT_MEMBERSINCE 0x00000002
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1052 #define AIM_USERINFO_PRESENT_ONLINESINCE 0x00000004
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1053 #define AIM_USERINFO_PRESENT_IDLE 0x00000008
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1054 #define AIM_USERINFO_PRESENT_ICQEXTSTATUS 0x00000010
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1055 #define AIM_USERINFO_PRESENT_ICQIPADDR 0x00000020
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1056 #define AIM_USERINFO_PRESENT_ICQDATA 0x00000040
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1057 #define AIM_USERINFO_PRESENT_CAPABILITIES 0x00000080
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1058 #define AIM_USERINFO_PRESENT_SESSIONLEN 0x00000100
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1059 #define AIM_USERINFO_PRESENT_CREATETIME 0x00000200
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1060
7045
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1061 struct userinfo_node {
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1062 char *sn;
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1063 struct userinfo_node *next;
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1064 };
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1065
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1066 typedef struct aim_userinfo_s {
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1067 char *sn;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1068 fu16_t warnlevel; /* evil percent * 10 (999 = 99.9%) */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1069 fu16_t idletime; /* in seconds */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1070 fu16_t flags;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1071 fu32_t createtime; /* time_t */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1072 fu32_t membersince; /* time_t */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1073 fu32_t onlinesince; /* time_t */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1074 fu32_t sessionlen; /* in seconds */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1075 fu32_t capabilities;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1076 struct {
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1077 fu32_t status;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1078 fu32_t ipaddr;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1079 fu8_t crap[0x25]; /* until we figure it out... */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1080 } icqinfo;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1081 fu32_t present;
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1082
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 11000
diff changeset
1083 fu8_t iconcsumtype;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1084 fu16_t iconcsumlen;
5836
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 5800
diff changeset
1085 fu8_t *iconcsum;
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1086
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1087 char *info;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1088 char *info_encoding;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1089 fu16_t info_len;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1090
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1091 char *avail;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1092 char *avail_encoding;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1093 fu16_t avail_len;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1094
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1095 char *away;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1096 char *away_encoding;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1097 fu16_t away_len;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1098
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1099 struct aim_userinfo_s *next;
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1100 } aim_userinfo_t;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1101
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1102 #define AIM_CAPS_BUDDYICON 0x00000001
8092
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1103 #define AIM_CAPS_TALK 0x00000002
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1104 #define AIM_CAPS_DIRECTIM 0x00000004
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1105 #define AIM_CAPS_CHAT 0x00000008
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1106 #define AIM_CAPS_GETFILE 0x00000010
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1107 #define AIM_CAPS_SENDFILE 0x00000020
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1108 #define AIM_CAPS_GAMES 0x00000040
8092
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1109 #define AIM_CAPS_ADDINS 0x00000080
4650
4938d12f6d48 [gaim-migrate @ 4961]
Mark Doliner <mark@kingant.net>
parents: 4646
diff changeset
1110 #define AIM_CAPS_SENDBUDDYLIST 0x00000100
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1111 #define AIM_CAPS_GAMES2 0x00000200
7141
af8ac078d4c2 [gaim-migrate @ 7708]
Mark Doliner <mark@kingant.net>
parents: 7091
diff changeset
1112 #define AIM_CAPS_ICQ_DIRECT 0x00000400
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1113 #define AIM_CAPS_APINFO 0x00000800
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1114 #define AIM_CAPS_ICQRTF 0x00001000
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1115 #define AIM_CAPS_EMPTY 0x00002000
4650
4938d12f6d48 [gaim-migrate @ 4961]
Mark Doliner <mark@kingant.net>
parents: 4646
diff changeset
1116 #define AIM_CAPS_ICQSERVERRELAY 0x00004000
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1117 #define AIM_CAPS_ICQUTF8OLD 0x00008000
4650
4938d12f6d48 [gaim-migrate @ 4961]
Mark Doliner <mark@kingant.net>
parents: 4646
diff changeset
1118 #define AIM_CAPS_TRILLIANCRYPT 0x00010000
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1119 #define AIM_CAPS_ICQUTF8 0x00020000
4811
22a7602ebe25 [gaim-migrate @ 5131]
Mark Doliner <mark@kingant.net>
parents: 4804
diff changeset
1120 #define AIM_CAPS_INTEROPERATE 0x00040000
7025
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1121 #define AIM_CAPS_ICHAT 0x00080000
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1122 #define AIM_CAPS_HIPTOP 0x00100000
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1123 #define AIM_CAPS_SECUREIM 0x00200000
db041f206848 [gaim-migrate @ 7588]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
1124 #define AIM_CAPS_SMS 0x00400000
7091
7b31e3e22f59 [gaim-migrate @ 7656]
Mark Doliner <mark@kingant.net>
parents: 7045
diff changeset
1125 #define AIM_CAPS_GENERICUNKNOWN 0x00800000
7582
3e0404393761 [gaim-migrate @ 8200]
Mark Doliner <mark@kingant.net>
parents: 7474
diff changeset
1126 #define AIM_CAPS_VIDEO 0x01000000
7945
0a0be07f066a [gaim-migrate @ 8619]
Mark Doliner <mark@kingant.net>
parents: 7806
diff changeset
1127 #define AIM_CAPS_ICHATAV 0x02000000
8092
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1128 #define AIM_CAPS_LIVEVIDEO 0x04000000
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1129 #define AIM_CAPS_CAMERA 0x08000000
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1130 #define AIM_CAPS_LAST 0x10000000
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1131
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1132 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1133 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1134
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1135 faim_export int aim_sendmemblock(aim_session_t *sess, aim_conn_t *conn, fu32_t offset, fu32_t len, const fu8_t *buf, fu8_t flag);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1136
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1137 struct aim_invite_priv {
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1138 char *sn;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1139 char *roomname;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1140 fu16_t exchange;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1141 fu16_t instance;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1142 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1143
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1144 #define AIM_COOKIETYPE_UNKNOWN 0x00
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1145 #define AIM_COOKIETYPE_ICBM 0x01
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1146 #define AIM_COOKIETYPE_ADS 0x02
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1147 #define AIM_COOKIETYPE_BOS 0x03
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1148 #define AIM_COOKIETYPE_IM 0x04
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1149 #define AIM_COOKIETYPE_CHAT 0x05
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1150 #define AIM_COOKIETYPE_CHATNAV 0x06
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1151 #define AIM_COOKIETYPE_INVITE 0x07
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1152 /* 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
1153 * matters. */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1154 #define AIM_COOKIETYPE_OFTIM 0x10
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1155 #define AIM_COOKIETYPE_OFTGET 0x11
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1156 #define AIM_COOKIETYPE_OFTSEND 0x12
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1157 #define AIM_COOKIETYPE_OFTVOICE 0x13
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1158 #define AIM_COOKIETYPE_OFTIMAGE 0x14
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1159 #define AIM_COOKIETYPE_OFTICON 0x15
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1160
7045
237ad253dd34 [gaim-migrate @ 7608]
Mark Doliner <mark@kingant.net>
parents: 7025
diff changeset
1161 faim_export aim_userinfo_t *aim_locate_finduserinfo(aim_session_t *sess, const char *sn);
8341
fec4c1fb2ac8 [gaim-migrate @ 9065]
Mark Doliner <mark@kingant.net>
parents: 8244
diff changeset
1162 faim_export void aim_locate_dorequest(aim_session_t *sess);
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1163
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1164 /* 0x0002 */ faim_export int aim_locate_reqrights(aim_session_t *sess);
11369
ab0fa7cd61cc [gaim-migrate @ 13593]
Jonathan Clark <ardentlygnarly>
parents: 11338
diff changeset
1165 /* 0x0004 */ faim_export int aim_locate_setcaps(aim_session_t *sess, fu32_t caps);
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
1166 /* 0x0004 */ faim_export int aim_locate_setprofile(aim_session_t *sess, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len);
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1167 /* 0x0005 */ faim_export int aim_locate_getinfo(aim_session_t *sess, const char *, fu16_t);
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1168 /* 0x0009 */ faim_export int aim_locate_setdirinfo(aim_session_t *sess, 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);
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1169 /* 0x000b */ faim_export int aim_locate_000b(aim_session_t *sess, const char *sn);
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1170 /* 0x000f */ faim_export int aim_locate_setinterests(aim_session_t *sess, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy);
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
1171 /* 0x0015 */ faim_export int aim_locate_getinfoshort(aim_session_t *sess, const char *sn, fu32_t flags);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1172
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2122
diff changeset
1173
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1174
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1175 /* 0x0003 - buddylist.c */
7285
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1176 /* 0x0002 */ faim_export int aim_buddylist_reqrights(aim_session_t *, aim_conn_t *);
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1177 /* 0x0004 */ faim_export int aim_buddylist_set(aim_session_t *, aim_conn_t *, const char *);
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1178 /* 0x0004 */ faim_export int aim_buddylist_addbuddy(aim_session_t *, aim_conn_t *, const char *);
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1179 /* 0x0005 */ faim_export int aim_buddylist_removebuddy(aim_session_t *, aim_conn_t *, const char *);
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1180 /* 0x000b */ faim_export int aim_buddylist_oncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info);
a50eea7628cb [gaim-migrate @ 7866]
Mark Doliner <mark@kingant.net>
parents: 7282
diff changeset
1181 /* 0x000c */ faim_export int aim_buddylist_offgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1182
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1183
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1184
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1185 /* 0x000a - search.c */
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1186 faim_export int aim_search_address(aim_session_t *, aim_conn_t *, const char *);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1187
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1188
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1189
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1190 /* 0x000d - chatnav.c */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1191 /* 0x000e - chat.c */
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1192 /* These apply to exchanges as well. */
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1193 #define AIM_CHATROOM_FLAG_EVILABLE 0x0001
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1194 #define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1195 #define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1196 #define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1197
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1198 struct aim_chat_exchangeinfo {
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1199 fu16_t number;
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2764
diff changeset
1200 fu16_t flags;
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1201 char *name;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1202 char *charset1;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1203 char *lang1;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1204 char *charset2;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1205 char *lang2;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1206 };
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1207
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1208 #define AIM_CHATFLAGS_NOREFLECT 0x0001
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1209 #define AIM_CHATFLAGS_AWAY 0x0002
11159
bd8ac1d4b2f2 [gaim-migrate @ 13246]
Mark Doliner <mark@kingant.net>
parents: 11154
diff changeset
1210 faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const gchar *msg, int msglen, const char *encoding, const char *language);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1211 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
1212 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
1213 faim_export char *aim_chat_getname(aim_conn_t *conn);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1214 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
1215
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1216 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
1217
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1218 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
1219 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
1220
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1221
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1222
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1223 /* 0x000f - odir.c */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1224 struct aim_odir {
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1225 char *first;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1226 char *last;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1227 char *middle;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1228 char *maiden;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1229 char *email;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1230 char *country;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1231 char *state;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1232 char *city;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1233 char *sn;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1234 char *interest;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1235 char *nick;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1236 char *zip;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1237 char *region;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1238 char *address;
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1239 struct aim_odir *next;
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1240 };
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1241
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1242 faim_export int aim_odir_email(aim_session_t *, const char *, const char *);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1243 faim_export int aim_odir_name(aim_session_t *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1244 faim_export int aim_odir_interest(aim_session_t *, const char *, const char *);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1245
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1246
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1247
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1248 /* 0x0010 - icon.c */
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 6871
diff changeset
1249 faim_export int aim_bart_upload(aim_session_t *sess, const fu8_t *icon, fu16_t iconlen);
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 11000
diff changeset
1250 faim_export int aim_bart_request(aim_session_t *sess, const char *sn, fu8_t iconcsumtype, const fu8_t *iconstr, fu16_t iconstrlen);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1251
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1252
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1253
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1254 /* 0x0013 - ssi.c */
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1255 #define AIM_SSI_TYPE_BUDDY 0x0000
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1256 #define AIM_SSI_TYPE_GROUP 0x0001
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1257 #define AIM_SSI_TYPE_PERMIT 0x0002
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1258 #define AIM_SSI_TYPE_DENY 0x0003
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1259 #define AIM_SSI_TYPE_PDINFO 0x0004
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1260 #define AIM_SSI_TYPE_PRESENCEPREFS 0x0005
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1261 #define AIM_SSI_TYPE_ICONINFO 0x0014
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1262
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1263 #define AIM_SSI_ACK_SUCCESS 0x0000
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1264 #define AIM_SSI_ACK_ITEMNOTFOUND 0x0002
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1265 #define AIM_SSI_ACK_IDNUMINUSE 0x000a
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1266 #define AIM_SSI_ACK_ATMAX 0x000c
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1267 #define AIM_SSI_ACK_INVALIDNAME 0x000d
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1268 #define AIM_SSI_ACK_AUTHREQUIRED 0x000e
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1269
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1270 struct aim_ssi_item {
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1271 char *name;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1272 fu16_t gid;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1273 fu16_t bid;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1274 fu16_t type;
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1275 struct aim_tlvlist_s *data;
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1276 struct aim_ssi_item *next;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1277 };
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1278
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1279 struct aim_ssi_tmp {
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1280 fu16_t action;
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1281 fu16_t ack;
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1282 char *name;
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1283 struct aim_ssi_item *item;
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1284 struct aim_ssi_tmp *next;
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1285 };
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1286
3109
51f49dcbd14b [gaim-migrate @ 3123]
Sean Egan <seanegan@gmail.com>
parents: 3079
diff changeset
1287 /* These build the actual SNACs and queue them to be sent */
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1288 /* 0x0002 */ faim_export int aim_ssi_reqrights(aim_session_t *sess);
6350
34c07f5f34a0 [gaim-migrate @ 6849]
Mark Doliner <mark@kingant.net>
parents: 6323
diff changeset
1289 /* 0x0004 */ faim_export int aim_ssi_reqdata(aim_session_t *sess);
34c07f5f34a0 [gaim-migrate @ 6849]
Mark Doliner <mark@kingant.net>
parents: 6323
diff changeset
1290 /* 0x0005 */ faim_export int aim_ssi_reqifchanged(aim_session_t *sess, time_t localstamp, fu16_t localrev);
4642
c0abcd675ca6 [gaim-migrate @ 4952]
Mark Doliner <mark@kingant.net>
parents: 4625
diff changeset
1291 /* 0x0007 */ faim_export int aim_ssi_enable(aim_session_t *sess);
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1292 /* 0x0008 */ faim_export int aim_ssi_addmoddel(aim_session_t *sess);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1293 /* 0x0011 */ faim_export int aim_ssi_modbegin(aim_session_t *sess);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1294 /* 0x0012 */ faim_export int aim_ssi_modend(aim_session_t *sess);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1295 /* 0x0014 */ faim_export int aim_ssi_sendauth(aim_session_t *sess, char *sn, char *msg);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1296 /* 0x0018 */ faim_export int aim_ssi_sendauthrequest(aim_session_t *sess, char *sn, char *msg);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1297 /* 0x001a */ faim_export int aim_ssi_sendauthreply(aim_session_t *sess, char *sn, fu8_t reply, char *msg);
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2669
diff changeset
1298
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1299 /* Client functions for retrieving SSI data */
3210
5e90ecb578c5 [gaim-migrate @ 3227]
Sean Egan <seanegan@gmail.com>
parents: 3141
diff changeset
1300 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
1301 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *sn, fu16_t type);
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1302 faim_export struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *sn);
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1303 faim_export char *aim_ssi_itemlist_findparentname(struct aim_ssi_item *list, const char *sn);
3210
5e90ecb578c5 [gaim-migrate @ 3227]
Sean Egan <seanegan@gmail.com>
parents: 3141
diff changeset
1304 faim_export int aim_ssi_getpermdeny(struct aim_ssi_item *list);
5e90ecb578c5 [gaim-migrate @ 3227]
Sean Egan <seanegan@gmail.com>
parents: 3141
diff changeset
1305 faim_export fu32_t aim_ssi_getpresence(struct aim_ssi_item *list);
4238
0e4be672f516 [gaim-migrate @ 4484]
Mark Doliner <mark@kingant.net>
parents: 4230
diff changeset
1306 faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn);
7172
895cd1d03efb [gaim-migrate @ 7740]
Mark Doliner <mark@kingant.net>
parents: 7167
diff changeset
1307 faim_export char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn);
4243
eae97ca4bbea [gaim-migrate @ 4493]
Mark Doliner <mark@kingant.net>
parents: 4238
diff changeset
1308 faim_export int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn);
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1309
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1310 /* Client functions for changing SSI data */
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1311 faim_export int aim_ssi_addbuddy(aim_session_t *sess, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1312 faim_export int aim_ssi_addpermit(aim_session_t *sess, const char *name);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1313 faim_export int aim_ssi_adddeny(aim_session_t *sess, const char *name);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1314 faim_export int aim_ssi_delbuddy(aim_session_t *sess, const char *name, const char *group);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1315 faim_export int aim_ssi_delpermit(aim_session_t *sess, const char *name);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1316 faim_export int aim_ssi_deldeny(aim_session_t *sess, const char *name);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1317 faim_export int aim_ssi_movebuddy(aim_session_t *sess, const char *oldgn, const char *newgn, const char *sn);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1318 faim_export int aim_ssi_aliasbuddy(aim_session_t *sess, const char *gn, const char *sn, const char *alias);
7172
895cd1d03efb [gaim-migrate @ 7740]
Mark Doliner <mark@kingant.net>
parents: 7167
diff changeset
1319 faim_export int aim_ssi_editcomment(aim_session_t *sess, const char *gn, const char *sn, const char *alias);
4889
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1320 faim_export int aim_ssi_rename_group(aim_session_t *sess, const char *oldgn, const char *newgn);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1321 faim_export int aim_ssi_cleanlist(aim_session_t *sess);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1322 faim_export int aim_ssi_deletelist(aim_session_t *sess);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1323 faim_export int aim_ssi_setpermdeny(aim_session_t *sess, fu8_t permdeny, fu32_t vismask);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1324 faim_export int aim_ssi_setpresence(aim_session_t *sess, fu32_t presence);
f7150929332b [gaim-migrate @ 5219]
Mark Doliner <mark@kingant.net>
parents: 4870
diff changeset
1325 faim_export int aim_ssi_seticon(aim_session_t *sess, fu8_t *iconsum, fu16_t iconsumlen);
7313
be7c1468c6a7 [gaim-migrate @ 7897]
Mark Doliner <mark@kingant.net>
parents: 7285
diff changeset
1326 faim_export int aim_ssi_delicon(aim_session_t *sess);
2991
9d11dbb33b6f [gaim-migrate @ 3004]
Rob Flynn <gaim@robflynn.com>
parents: 2979
diff changeset
1327
4230
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1328
9f729d6d88a6 [gaim-migrate @ 4475]
Mark Doliner <mark@kingant.net>
parents: 4194
diff changeset
1329
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1330 /* 0x0015 - icq.c */
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1331 #define AIM_ICQ_INFO_SIMPLE 0x001
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1332 #define AIM_ICQ_INFO_SUMMARY 0x002
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1333 #define AIM_ICQ_INFO_EMAIL 0x004
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1334 #define AIM_ICQ_INFO_PERSONAL 0x008
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1335 #define AIM_ICQ_INFO_ADDITIONAL 0x010
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1336 #define AIM_ICQ_INFO_WORK 0x020
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1337 #define AIM_ICQ_INFO_INTERESTS 0x040
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1338 #define AIM_ICQ_INFO_ORGS 0x080
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1339 #define AIM_ICQ_INFO_UNKNOWN 0x100
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1340 #define AIM_ICQ_INFO_HAVEALL 0x1ff
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1341
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1342 struct aim_icq_offlinemsg {
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1343 fu32_t sender;
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1344 fu16_t year;
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1345 fu8_t month, day, hour, minute;
4173
b66f960bfe60 [gaim-migrate @ 4403]
Mark Doliner <mark@kingant.net>
parents: 4151
diff changeset
1346 fu8_t type;
b66f960bfe60 [gaim-migrate @ 4403]
Mark Doliner <mark@kingant.net>
parents: 4151
diff changeset
1347 fu8_t flags;
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1348 char *msg;
4076
91c4bd698d39 [gaim-migrate @ 4291]
Mark Doliner <mark@kingant.net>
parents: 4071
diff changeset
1349 int msglen;
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1350 };
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1351
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1352 struct aim_icq_info {
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1353 fu16_t reqid;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1354
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1355 /* simple */
2742
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1356 fu32_t uin;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1357
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1358 /* general and "home" information (0x00c8) */
2742
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1359 char *nick;
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1360 char *first;
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1361 char *last;
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1362 char *email;
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1363 char *homecity;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1364 char *homestate;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1365 char *homephone;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1366 char *homefax;
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1367 char *homeaddr;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1368 char *mobile;
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1369 char *homezip;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1370 fu16_t homecountry;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1371 /* fu8_t timezone;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1372 fu8_t hideemail; */
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1373
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1374 /* personal (0x00dc) */
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1375 fu8_t age;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1376 fu8_t unknown;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1377 fu8_t gender;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1378 char *personalwebpage;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1379 fu16_t birthyear;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1380 fu8_t birthmonth;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1381 fu8_t birthday;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1382 fu8_t language1;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1383 fu8_t language2;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1384 fu8_t language3;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1385
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1386 /* work (0x00d2) */
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1387 char *workcity;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1388 char *workstate;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1389 char *workphone;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1390 char *workfax;
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1391 char *workaddr;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1392 char *workzip;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1393 fu16_t workcountry;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1394 char *workcompany;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1395 char *workdivision;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1396 char *workposition;
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1397 char *workwebpage;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1398
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1399 /* additional personal information (0x00e6) */
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1400 char *info;
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1401
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1402 /* email (0x00eb) */
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1403 fu16_t numaddresses;
4625
819ba05f5b1b [gaim-migrate @ 4916]
Mark Doliner <mark@kingant.net>
parents: 4624
diff changeset
1404 char **email2;
4624
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1405
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1406 /* we keep track of these in a linked list because we're 1337 */
a964972cb361 [gaim-migrate @ 4915]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
1407 struct aim_icq_info *next;
2742
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1408 };
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1409
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1410 faim_export int aim_icq_reqofflinemsgs(aim_session_t *sess);
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1411 faim_export int aim_icq_ackofflinemsgs(aim_session_t *sess);
10570
2b05acfeec65 [gaim-migrate @ 11960]
Mark Doliner <mark@kingant.net>
parents: 10464
diff changeset
1412 faim_export int aim_icq_setsecurity(aim_session_t *sess, const int auth, const int web, const int hide);
2b05acfeec65 [gaim-migrate @ 11960]
Mark Doliner <mark@kingant.net>
parents: 10464
diff changeset
1413 faim_export int aim_icq_setauthsetting(aim_session_t *sess, int auth_required);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1414 faim_export int aim_icq_changepasswd(aim_session_t *sess, const char *passwd);
2742
6f527cbd899d [gaim-migrate @ 2755]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
1415 faim_export int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin);
4759
1762496d502a [gaim-migrate @ 5076]
Mark Doliner <mark@kingant.net>
parents: 4664
diff changeset
1416 faim_export int aim_icq_getalias(aim_session_t *sess, const char *uin);
4151
1a5dcfa1823e [gaim-migrate @ 4377]
Mark Doliner <mark@kingant.net>
parents: 4102
diff changeset
1417 faim_export int aim_icq_getallinfo(aim_session_t *sess, const char *uin);
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1418
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1419
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1420
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1421 /* 0x0017 - auth.c */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1422 faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const fu16_t length, const fu8_t *);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1423 faim_export int aim_admin_changepasswd(aim_session_t *, aim_conn_t *, const char *newpw, const char *curpw);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1424 faim_export int aim_admin_reqconfirm(aim_session_t *sess, aim_conn_t *conn);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1425 faim_export int aim_admin_getinfo(aim_session_t *sess, aim_conn_t *conn, fu16_t info);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1426 faim_export int aim_admin_setemail(aim_session_t *sess, aim_conn_t *conn, const char *newemail);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1427 faim_export int aim_admin_setnick(aim_session_t *sess, aim_conn_t *conn, const char *newnick);
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1428
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1429
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1430
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1431 /* 0x0018 - email.c */
3694
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1432 struct aim_emailinfo {
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1433 fu8_t *cookie16;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1434 fu8_t *cookie8;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1435 char *url;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1436 fu16_t nummsgs;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1437 fu8_t unread;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1438 char *domain;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1439 fu16_t flag;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1440 struct aim_emailinfo *next;
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1441 };
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1442
7282
ad243bc63184 [gaim-migrate @ 7861]
Mark Doliner <mark@kingant.net>
parents: 7260
diff changeset
1443 faim_export int aim_email_sendcookies(aim_session_t *sess);
ad243bc63184 [gaim-migrate @ 7861]
Mark Doliner <mark@kingant.net>
parents: 7260
diff changeset
1444 faim_export int aim_email_activate(aim_session_t *sess);
3694
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
1445
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1446
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1447
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1448 #if defined(FAIM_INTERNAL) || defined(FAIM_NEED_TLV)
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1449 /* tlv.c - TLV handling */
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1450
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1451 /* TLV structure */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1452 typedef struct aim_tlv_s {
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1453 fu16_t type;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1454 fu16_t length;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1455 fu8_t *value;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1456 } aim_tlv_t;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1457
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1458 /* TLV List structure */
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1459 typedef struct aim_tlvlist_s {
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1460 aim_tlv_t *tlv;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1461 struct aim_tlvlist_s *next;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1462 } aim_tlvlist_t;
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1463
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1464 /* TLV handling functions */
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1465 faim_internal aim_tlv_t *aim_tlv_gettlv(aim_tlvlist_t *list, fu16_t type, const int nth);
9933
cee849d17167 [gaim-migrate @ 10825]
Mark Doliner <mark@kingant.net>
parents: 9826
diff changeset
1466 faim_internal int aim_tlv_getlength(aim_tlvlist_t *list, fu16_t type, const int nth);
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1467 faim_internal char *aim_tlv_getstr(aim_tlvlist_t *list, const fu16_t type, const int nth);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1468 faim_internal fu8_t aim_tlv_get8(aim_tlvlist_t *list, const fu16_t type, const int nth);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1469 faim_internal fu16_t aim_tlv_get16(aim_tlvlist_t *list, const fu16_t type, const int nth);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1470 faim_internal fu32_t aim_tlv_get32(aim_tlvlist_t *list, const fu16_t type, const int nth);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1471
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1472 /* TLV list handling functions */
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1473 faim_internal aim_tlvlist_t *aim_tlvlist_read(aim_bstream_t *bs);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1474 faim_internal aim_tlvlist_t *aim_tlvlist_readnum(aim_bstream_t *bs, fu16_t num);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1475 faim_internal aim_tlvlist_t *aim_tlvlist_readlen(aim_bstream_t *bs, fu16_t len);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1476 faim_internal aim_tlvlist_t *aim_tlvlist_copy(aim_tlvlist_t *orig);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1477
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1478 faim_internal int aim_tlvlist_count(aim_tlvlist_t **list);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1479 faim_internal int aim_tlvlist_size(aim_tlvlist_t **list);
6101
e4a5085fb870 [gaim-migrate @ 6560]
Mark Doliner <mark@kingant.net>
parents: 6059
diff changeset
1480 faim_internal int aim_tlvlist_cmp(aim_tlvlist_t *one, aim_tlvlist_t *two);
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1481 faim_internal int aim_tlvlist_write(aim_bstream_t *bs, aim_tlvlist_t **list);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1482 faim_internal void aim_tlvlist_free(aim_tlvlist_t **list);
7166
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1483
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1484 faim_internal int aim_tlvlist_add_raw(aim_tlvlist_t **list, const fu16_t type, const fu16_t length, const fu8_t *value);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1485 faim_internal int aim_tlvlist_add_noval(aim_tlvlist_t **list, const fu16_t type);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1486 faim_internal int aim_tlvlist_add_8(aim_tlvlist_t **list, const fu16_t type, const fu8_t value);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1487 faim_internal int aim_tlvlist_add_16(aim_tlvlist_t **list, const fu16_t type, const fu16_t value);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1488 faim_internal int aim_tlvlist_add_32(aim_tlvlist_t **list, const fu16_t type, const fu32_t value);
10991
1798ad0be460 [gaim-migrate @ 12829]
Mark Doliner <mark@kingant.net>
parents: 10986
diff changeset
1489 faim_internal int aim_tlvlist_add_str(aim_tlvlist_t **list, const fu16_t type, const char *value);
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1490 faim_internal int aim_tlvlist_add_caps(aim_tlvlist_t **list, const fu16_t type, const fu32_t caps);
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1491 faim_internal int aim_tlvlist_add_userinfo(aim_tlvlist_t **list, fu16_t type, aim_userinfo_t *userinfo);
8225
9790cda80d52 [gaim-migrate @ 8948]
Mark Doliner <mark@kingant.net>
parents: 8219
diff changeset
1492 faim_internal int aim_tlvlist_add_chatroom(aim_tlvlist_t **list, fu16_t type, fu16_t exchange, const char *roomname, fu16_t instance);
7167
6d3d8f11e765 [gaim-migrate @ 7734]
Mark Doliner <mark@kingant.net>
parents: 7166
diff changeset
1493 faim_internal int aim_tlvlist_add_frozentlvlist(aim_tlvlist_t **list, fu16_t type, aim_tlvlist_t **tl);
7166
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1494
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1495 faim_internal int aim_tlvlist_replace_raw(aim_tlvlist_t **list, const fu16_t type, const fu16_t lenth, const fu8_t *value);
10993
b6ca6d3c5332 [gaim-migrate @ 12831]
Mark Doliner <mark@kingant.net>
parents: 10991
diff changeset
1496 faim_internal int aim_tlvlist_replace_str(aim_tlvlist_t **list, const fu16_t type, const char *str);
7166
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1497 faim_internal int aim_tlvlist_replace_noval(aim_tlvlist_t **list, const fu16_t type);
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1498 faim_internal int aim_tlvlist_replace_8(aim_tlvlist_t **list, const fu16_t type, const fu8_t value);
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1499 faim_internal int aim_tlvlist_replace_16(aim_tlvlist_t **list, const fu16_t type, const fu16_t value);
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1500 faim_internal int aim_tlvlist_replace_32(aim_tlvlist_t **list, const fu16_t type, const fu32_t value);
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1501
e6b01bd8d6cd [gaim-migrate @ 7733]
Mark Doliner <mark@kingant.net>
parents: 7141
diff changeset
1502 faim_internal void aim_tlvlist_remove(aim_tlvlist_t **list, const fu16_t type);
4901
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1503 #endif /* FAIM_INTERNAL */
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1504
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1505
ad589b887af9 [gaim-migrate @ 5235]
Mark Doliner <mark@kingant.net>
parents: 4898
diff changeset
1506
3912
e73c48cf1645 [gaim-migrate @ 4071]
Mark Doliner <mark@kingant.net>
parents: 3867
diff changeset
1507 /* util.c */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1508 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1509 * 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
1510 *
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1511 * 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
1512 * their use.
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1513 *
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1514 */
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1515 #define aimutil_put8(buf, data) ((*(buf) = (fu8_t)(data)&0xff),1)
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1516 #define aimutil_get8(buf) ((*(buf))&0xff)
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1517 #define aimutil_put16(buf, data) ( \
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1518 (*(buf) = (fu8_t)((data)>>8)&0xff), \
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1519 (*((buf)+1) = (fu8_t)(data)&0xff), \
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1520 2)
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1521 #define aimutil_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1522 #define aimutil_put32(buf, data) ( \
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1523 (*((buf)) = (fu8_t)((data)>>24)&0xff), \
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1524 (*((buf)+1) = (fu8_t)((data)>>16)&0xff), \
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1525 (*((buf)+2) = (fu8_t)((data)>>8)&0xff), \
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1526 (*((buf)+3) = (fu8_t)(data)&0xff), \
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1527 4)
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1528 #define aimutil_get32(buf) ((((*(buf))<<24)&0xff000000) + \
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1529 (((*((buf)+1))<<16)&0x00ff0000) + \
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1530 (((*((buf)+2))<< 8)&0x0000ff00) + \
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2196
diff changeset
1531 (((*((buf)+3) )&0x000000ff)))
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1532
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1533 /* Little-endian versions (damn ICQ) */
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1534 #define aimutil_putle8(buf, data) ( \
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1535 (*(buf) = (fu8_t)(data) & 0xff), \
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1536 1)
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1537 #define aimutil_getle8(buf) ( \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1538 (*(buf)) & 0xff \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1539 )
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1540 #define aimutil_putle16(buf, data) ( \
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1541 (*((buf)+0) = (fu8_t)((data) >> 0) & 0xff), \
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1542 (*((buf)+1) = (fu8_t)((data) >> 8) & 0xff), \
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1543 2)
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1544 #define aimutil_getle16(buf) ( \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1545 (((*((buf)+0)) << 0) & 0x00ff) + \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1546 (((*((buf)+1)) << 8) & 0xff00) \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1547 )
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1548 #define aimutil_putle32(buf, data) ( \
5556
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1549 (*((buf)+0) = (fu8_t)((data) >> 0) & 0xff), \
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1550 (*((buf)+1) = (fu8_t)((data) >> 8) & 0xff), \
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1551 (*((buf)+2) = (fu8_t)((data) >> 16) & 0xff), \
8ab1875e6d09 [gaim-migrate @ 5957]
Mark Doliner <mark@kingant.net>
parents: 5414
diff changeset
1552 (*((buf)+3) = (fu8_t)((data) >> 24) & 0xff), \
2706
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1553 4)
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1554 #define aimutil_getle32(buf) ( \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1555 (((*((buf)+0)) << 0) & 0x000000ff) + \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1556 (((*((buf)+1)) << 8) & 0x0000ff00) + \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1557 (((*((buf)+2)) << 16) & 0x00ff0000) + \
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1558 (((*((buf)+3)) << 24) & 0xff000000))
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1559
e841b14b5b89 [gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2704
diff changeset
1560
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5917
diff changeset
1561 faim_export int aimutil_putstr(char *, const char *, int);
4617
858979ab3867 [gaim-migrate @ 4908]
Mark Doliner <mark@kingant.net>
parents: 4342
diff changeset
1562 faim_export fu16_t aimutil_iconsum(const fu8_t *buf, int buflen);
6323
5d7063e137da [gaim-migrate @ 6822]
Mark Doliner <mark@kingant.net>
parents: 6322
diff changeset
1563 faim_export int aimutil_tokslen(char *toSearch, int theindex, char dl);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1564 faim_export int aimutil_itemcnt(char *toSearch, char dl);
6323
5d7063e137da [gaim-migrate @ 6822]
Mark Doliner <mark@kingant.net>
parents: 6322
diff changeset
1565 faim_export char *aimutil_itemindex(char *toSearch, int theindex, char dl);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1566
8092
697221d5d0ff [gaim-migrate @ 8791]
Mark Doliner <mark@kingant.net>
parents: 7945
diff changeset
1567 faim_export int aim_snvalid(const char *sn);
9975
c66345b33b88 [gaim-migrate @ 10886]
Mark Doliner <mark@kingant.net>
parents: 9933
diff changeset
1568 faim_export int aim_sn_is_icq(const char *sn);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1569 faim_export int aim_snlen(const char *sn);
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1570 faim_export int aim_sncmp(const char *sn1, const char *sn2);
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1571
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1572 #include <aim_internal.h>
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1573
6322
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
1574 #ifdef __cplusplus
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
1575 }
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
1576 #endif
dd2be7cd66df [gaim-migrate @ 6821]
Mark Doliner <mark@kingant.net>
parents: 6318
diff changeset
1577
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1578 #endif /* __AIM_H__ */