Mercurial > pidgin
annotate plugins/icq/icq.h @ 1492:638b57b1801d
[gaim-migrate @ 1502]
bah.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 17 Feb 2001 00:08:45 +0000 |
parents | 7f7857c5036e |
children | 0ef6603d986e |
rev | line source |
---|---|
1152 | 1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 #ifndef _ICQ_H_ | |
3 #define _ICQ_H_ | |
4 | |
5 #ifdef HAVE_CONFIG_H | |
6 #include <config.h> | |
7 #endif | |
8 | |
9 #ifndef _WIN32 | |
10 #include <sys/time.h> | |
11 #include <sys/types.h> | |
12 #include <unistd.h> | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
13 #else |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
14 #include <winsock.h> |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
15 #endif /* _WIN32 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
16 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
17 #include <time.h> |
1152 | 18 |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
19 /* ICQLIB version defines */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
20 #define ICQLIBVER 0x010105 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
21 #define ICQLIBMAJOR 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
22 #define ICQLIBMINOR 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
23 #define ICQLIBMICRO 5 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
24 |
1152 | 25 |
26 #define ICQ_LOG_OFF 0 | |
27 #define ICQ_LOG_FATAL 1 | |
28 #define ICQ_LOG_ERROR 2 | |
29 #define ICQ_LOG_WARNING 3 | |
30 #define ICQ_LOG_MESSAGE 4 | |
31 | |
32 #define STATUS_OFFLINE (-1L) | |
33 #define STATUS_ONLINE 0x0000L | |
34 #define STATUS_AWAY 0x0001L | |
35 #define STATUS_DND 0x0002L /* 0x13L */ | |
36 #define STATUS_NA 0x0004L /* 0x05L */ | |
37 #define STATUS_OCCUPIED 0x0010L /* 0x11L */ | |
38 #define STATUS_FREE_CHAT 0x0020L | |
39 #define STATUS_INVISIBLE 0x0100L | |
40 | |
41 #define ICQ_SEND_THRUSERVER 0 | |
42 #define ICQ_SEND_DIRECT 1 | |
43 #define ICQ_SEND_BESTWAY 2 | |
44 | |
45 #define ICQ_NOTIFY_SUCCESS 0 | |
46 #define ICQ_NOTIFY_FAILED 1 | |
47 #define ICQ_NOTIFY_CONNECTING 2 | |
48 #define ICQ_NOTIFY_CONNECTED 3 | |
49 #define ICQ_NOTIFY_SENT 4 | |
50 #define ICQ_NOTIFY_ACK 5 | |
51 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
52 #define ICQ_NOTIFY_CHATSESSION 7 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
53 #define ICQ_NOTIFY_FILESESSION 8 |
1152 | 54 |
55 #ifdef __cplusplus | |
56 extern "C" { | |
57 #endif /* __cplusplus */ | |
58 | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
59 typedef struct |
1152 | 60 { |
61 const char *name; | |
62 unsigned short code; | |
63 } icq_ArrayType; | |
64 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
65 /* dummy forward declarations */ |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
66 struct icq_link_private; |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
67 typedef struct icq_TCPLink_s icq_TCPLink; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
68 typedef struct icq_FileSession_s icq_FileSession; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
69 typedef struct icq_ChatSession_s icq_ChatSession; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
70 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
71 /** |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
72 * The ICQLINK structure represents a single connection to the ICQ servers. |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
73 * It is returned as the result of an icq_ICQLINKNew function, and contains |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
74 * connection-specific parameters such as uin, sockets, current status, etc. |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
75 * |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
76 * This structure should be considered read-only. Modifying it will cause |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
77 * undefined results. |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
78 */ |
1152 | 79 typedef struct icq_link |
80 { | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
81 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
82 /* General parameters */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
83 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
84 /** User Identification Number. This is your ICQ 'account' number. */ |
1152 | 85 unsigned long icq_Uin; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
86 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
87 /** Our IP as understood by the ICQ server. This will be set once an |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
88 * UDP_SRV_LOGIN_REPLY has been received from the ICQ servers, in host |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
89 * byteorder. Note this may be different from the actual IP in cases |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
90 * such as firewalls, ip masquerading, etc. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
91 unsigned long icq_OurIP; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
92 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
93 /** The UDP port used to connect to the ICQ server, in host byteorder. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
94 unsigned short icq_OurPort; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
95 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
96 /** Our current ICQ status: one of the STATUS_* defines. |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
97 * @see icq_StatusUpdate */ |
1152 | 98 unsigned long icq_Status; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
99 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
100 /** The password used to log into the ICQ server. */ |
1152 | 101 char *icq_Password; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
102 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
103 /** The user's desired nickname. */ |
1152 | 104 char *icq_Nick; |
105 | |
106 /* UDP stuff */ | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
107 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
108 /** socket used to send and received UDP messages */ |
1152 | 109 int icq_UDPSok; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
110 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
111 /** Time, in seconds, that a sent UDP message can go without an ACK from the |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
112 * server before being retransmitted. */ |
1152 | 113 int icq_UDPExpireInterval; |
114 | |
115 /* TCP stuff */ | |
116 | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
117 /** TCP listen port, in host byte order. The TCP implementation will listen |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
118 * here for new connections from other clients. This is transmitted as |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
119 * part of the ICQ login process. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
120 unsigned short icq_TCPSrvPort; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
121 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
122 /** Has TCP been enabled for this connection? |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
123 * @see icq_NewICQLINK */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
124 unsigned char icq_UseTCP; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
125 |
1152 | 126 /* SOCKS5 Proxy stuff */ |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
127 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
128 /** Should all network traffic be redirected through a proxy? |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
129 * @see icq_SetProxy */ |
1152 | 130 unsigned char icq_UseProxy; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
131 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
132 /** Hostname of the SOCKS5 proxy to use. */ |
1152 | 133 char *icq_ProxyHost; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
134 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
135 /** IP Address of the SOCKS5 proxy after DNS resolution, in host byteorder. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
136 unsigned long icq_ProxyIP; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
137 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
138 /** Port of the SOCKS5 proxy to use, in host byteorder. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
139 unsigned short icq_ProxyPort; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
140 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
141 /** What's this? :) */ |
1152 | 142 int icq_ProxyAuth; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
143 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
144 /** Username used when logging into the proxy. */ |
1152 | 145 char *icq_ProxyName; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
146 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
147 /** Password used when logging into the proxy. */ |
1152 | 148 char *icq_ProxyPass; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
149 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
150 /** TCP socket used to communicate with the proxy. */ |
1152 | 151 int icq_ProxySok; |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
152 |
1152 | 153 unsigned short icq_ProxyOurPort; /* HOST byteorder */ |
154 unsigned long icq_ProxyDestIP; /* HOST byteorder */ | |
155 unsigned short icq_ProxyDestPort; /* HOST byteorder */ | |
156 | |
157 /*** Callbacks ***/ | |
158 void (*icq_Logged)(struct icq_link *link); | |
159 void (*icq_Disconnected)(struct icq_link *link); | |
160 void (*icq_RecvMessage)(struct icq_link *link, unsigned long uin, | |
161 unsigned char hour, unsigned char minute, unsigned char day, | |
162 unsigned char month, unsigned short year, const char *msg); | |
163 void (*icq_RecvURL)(struct icq_link *link, unsigned long uin, | |
164 unsigned char hour, unsigned char minute, unsigned char day, | |
165 unsigned char month, unsigned short year, const char *url, | |
166 const char *descr); | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
167 void (*icq_RecvContactList)(struct icq_link *link, unsigned long uin, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
168 int nr, const char **contact_uin, const char **contact_nick); |
1152 | 169 void (*icq_RecvWebPager)(struct icq_link *link,unsigned char hour, |
170 unsigned char minute, unsigned char day, unsigned char month, | |
171 unsigned short year, const char *nick, const char *email, | |
172 const char *msg); | |
173 void (*icq_RecvMailExpress)(struct icq_link *link,unsigned char hour, | |
174 unsigned char minute, unsigned char day, unsigned char month, | |
175 unsigned short year, const char *nick, const char *email, | |
176 const char *msg); | |
177 void (*icq_RecvChatReq)(struct icq_link *link, unsigned long uin, | |
178 unsigned char hour, unsigned char minute, unsigned char day, | |
179 unsigned char month, unsigned short year, const char *descr, | |
180 unsigned long seq); | |
181 void (*icq_RecvFileReq)(struct icq_link *link, unsigned long uin, | |
182 unsigned char hour, unsigned char minute, unsigned char day, | |
183 unsigned char month, unsigned short year, const char *descr, | |
184 const char *filename, unsigned long filesize, unsigned long seq); | |
185 void (*icq_RecvAdded)(struct icq_link *link, unsigned long uin, | |
186 unsigned char hour, unsigned char minute, unsigned char day, | |
187 unsigned char month, unsigned short year, const char *nick, | |
188 const char *first, const char *last, const char *email); | |
189 void (*icq_RecvAuthReq)(struct icq_link *link, unsigned long uin, | |
190 unsigned char hour, unsigned char minute, unsigned char day, | |
191 unsigned char month, unsigned short year, const char *nick, | |
192 const char *first, const char *last, const char *email, | |
193 const char *reason); | |
194 void (*icq_UserFound)(struct icq_link *link, unsigned long uin, | |
195 const char *nick, const char *first, const char *last, | |
196 const char *email, char auth); | |
197 void (*icq_SearchDone)(struct icq_link *link); | |
198 void (*icq_UserOnline)(struct icq_link *link, unsigned long uin, | |
199 unsigned long status, unsigned long ip, unsigned short port, | |
200 unsigned long real_ip, unsigned char tcp_flag ); | |
201 void (*icq_UserOffline)(struct icq_link *link, unsigned long uin); | |
202 void (*icq_UserStatusUpdate)(struct icq_link *link, unsigned long uin, | |
203 unsigned long status); | |
204 void (*icq_InfoReply)(struct icq_link *link, unsigned long uin, | |
205 const char *nick, const char *first, const char *last, | |
206 const char *email, char auth); | |
207 void (*icq_ExtInfoReply)(struct icq_link *link, unsigned long uin, | |
208 const char *city, unsigned short country_code, char country_stat, | |
209 const char *state, unsigned short age, char gender, | |
210 const char *phone, const char *hp, const char *about); | |
211 void (*icq_WrongPassword)(struct icq_link *link); | |
212 void (*icq_InvalidUIN)(struct icq_link *link); | |
213 void (*icq_Log)(struct icq_link *link, time_t time, unsigned char level, | |
214 const char *str); | |
215 void (*icq_SrvAck)(struct icq_link *link, unsigned short seq); | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
216 void (*icq_RequestNotify)(struct icq_link *link, unsigned long id, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
217 int type, int arg, void *data); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
218 void (*icq_FileNotify)(icq_FileSession *session, int type, int arg, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
219 void *data); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
220 void (*icq_ChatNotify)(icq_ChatSession *session, int type, int arg, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
221 void *data); |
1152 | 222 void (*icq_NewUIN)(struct icq_link *link, unsigned long uin); |
223 void (*icq_SetTimeout)(struct icq_link *link, long interval); | |
224 void (*icq_MetaUserFound)(struct icq_link *link, unsigned short seq2, | |
225 unsigned long uin, const char *nick, const char *first, | |
226 const char *last, const char *email, char auth); | |
227 void (*icq_MetaUserInfo)(struct icq_link *link, unsigned short seq2, | |
228 const char *nick, const char *first, const char *last, | |
229 const char *pri_eml, const char *sec_eml, const char *old_eml, | |
230 const char *city, const char *state, const char *phone, const char *fax, | |
231 const char *street, const char *cellular, unsigned long zip, | |
232 unsigned short country, unsigned char timezone, unsigned char auth, | |
233 unsigned char webaware, unsigned char hideip); | |
234 void (*icq_MetaUserWork)(struct icq_link *link, unsigned short seq2, | |
235 const char *wcity, const char *wstate, const char *wphone, | |
236 const char *wfax, const char *waddress, unsigned long wzip, | |
237 unsigned short wcountry, const char *company, const char *department, | |
238 const char *job, unsigned short occupation, const char *whomepage); | |
239 void (*icq_MetaUserMore)(struct icq_link *link, unsigned short seq2, | |
240 unsigned short age, unsigned char gender, const char *homepage, | |
241 unsigned char byear, unsigned char bmonth, unsigned char bday, | |
242 unsigned char lang1, unsigned char lang2, unsigned char lang3); | |
243 void (*icq_MetaUserAbout)(struct icq_link *link, unsigned short seq2, | |
244 const char *about); | |
245 void (*icq_MetaUserInterests)(struct icq_link *link, unsigned short seq2, | |
246 unsigned char num, unsigned short icat1, const char *int1, | |
247 unsigned short icat2, const char *int2, unsigned short icat3, | |
248 const char *int3, unsigned short icat4, const char *int4); | |
249 void (*icq_MetaUserAffiliations)(struct icq_link *link, unsigned short seq2, | |
250 unsigned char anum, unsigned short acat1, const char *aff1, | |
251 unsigned short acat2, const char *aff2, unsigned short acat3, | |
252 const char *aff3, unsigned short acat4, const char *aff4, | |
253 unsigned char bnum, unsigned short bcat1, const char *back1, | |
254 unsigned short bcat2, const char *back2, unsigned short bcat3, | |
255 const char *back3, unsigned short bcat4, const char *back4); | |
256 void (*icq_MetaUserHomePageCategory)(struct icq_link *link, | |
257 unsigned short seq2, unsigned char num, unsigned short hcat1, | |
258 const char *htext1); | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
259 |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
260 /** Private data pointer. */ |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
261 struct icq_link_private *d; |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
262 |
1467
7f7857c5036e
[gaim-migrate @ 1477]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1432
diff
changeset
|
263 /** Space for user data */ |
7f7857c5036e
[gaim-migrate @ 1477]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1432
diff
changeset
|
264 void* icq_UserData; |
1152 | 265 } ICQLINK; |
266 | |
267 extern int icq_Russian; | |
268 extern unsigned char icq_LogLevel; | |
269 extern icq_ArrayType icq_Countries[]; | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
270 extern icq_ArrayType icq_Genders[]; |
1152 | 271 |
272 void icq_SetProxy(ICQLINK *link, const char *phost, unsigned short pport, | |
273 int pauth, const char *pname, const char *ppass); | |
274 void icq_UnsetProxy(ICQLINK *link); | |
275 | |
1309
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
276 ICQLINK *icq_ICQLINKNew(unsigned long uin, const char *password, |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
277 const char *nick, unsigned char useTCP); |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
278 void icq_ICQLINKDelete(ICQLINK *link); |
0a766047b4fd
[gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
279 |
1152 | 280 int icq_Connect(ICQLINK *link, const char *hostname, int port); |
281 void icq_Disconnect(ICQLINK *link); | |
282 int icq_GetSok(ICQLINK *link); | |
283 int icq_GetProxySok(ICQLINK *link); | |
284 void icq_HandleServerResponse(ICQLINK *link); | |
285 void icq_HandleProxyResponse(ICQLINK *link); | |
286 void icq_HandleTimeout(ICQLINK *link); | |
287 void icq_Main(ICQLINK *link); | |
288 unsigned short icq_KeepAlive(ICQLINK *link); | |
289 void icq_Login(ICQLINK *link, unsigned long status); | |
290 void icq_Logout(ICQLINK *link); | |
291 void icq_SendContactList(ICQLINK *link); | |
292 void icq_SendVisibleList(ICQLINK *link); | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
293 void icq_SendInvisibleList(ICQLINK *link); |
1152 | 294 void icq_SendNewUser(ICQLINK * link, unsigned long uin); |
295 unsigned long icq_SendMessage(ICQLINK *link, unsigned long uin, | |
296 const char *text, unsigned char thruSrv); | |
297 unsigned long icq_SendURL(ICQLINK *link, unsigned long uin, const char *url, | |
298 const char *descr, unsigned char thruSrv); | |
299 void icq_ChangeStatus(ICQLINK *link, unsigned long status); | |
300 unsigned short icq_SendInfoReq(ICQLINK *link, unsigned long uin); | |
301 unsigned short icq_SendExtInfoReq(ICQLINK *link, unsigned long uin); | |
302 unsigned short icq_SendAuthMsg(ICQLINK *link, unsigned long uin); | |
303 void icq_SendSearchReq(ICQLINK *link, const char *email, const char *nick, | |
304 const char* first, const char* last); | |
305 void icq_SendSearchUINReq(ICQLINK *link, unsigned long uin); | |
306 | |
307 const char *icq_GetCountryName(unsigned short code); | |
308 const char *icq_GetMetaOccupationName(unsigned short code); | |
309 const char *icq_GetMetaBackgroundName(unsigned short code); | |
310 const char *icq_GetMetaAffiliationName(unsigned short code); | |
311 const char *icq_GetMetaLanguageName(unsigned short code); | |
312 void icq_RegNewUser(ICQLINK *link, const char *pass); | |
313 unsigned short icq_UpdateUserInfo(ICQLINK *link, const char *nick, | |
314 const char *first, const char *last, const char *email); | |
315 unsigned short icq_UpdateAuthInfo(ICQLINK *link, unsigned long auth); | |
316 unsigned short icq_UpdateMetaInfoSet(ICQLINK *link, const char *nick, | |
317 const char *first, const char *last, const char *email, | |
318 const char *email2, const char *email3, const char *city, | |
319 const char *state, const char *phone, const char *fax, const char *street, | |
320 const char *cellular, unsigned long zip, unsigned short cnt_code, | |
321 unsigned char cnt_stat, unsigned char emailhide); | |
322 unsigned short icq_UpdateMetaInfoHomepage(ICQLINK *link, unsigned char age, | |
323 const char *homepage, unsigned char year, unsigned char month, | |
324 unsigned char day, unsigned char lang1, unsigned char lang2, | |
325 unsigned char lang3); | |
326 unsigned short icq_UpdateMetaInfoAbout(ICQLINK *link, const char *about); | |
327 unsigned short icq_UpdateMetaInfoSecurity(ICQLINK *link, unsigned char reqauth, | |
328 unsigned char webpresence, unsigned char pubip); | |
329 unsigned short icq_UpdateNewUserInfo(ICQLINK *link, const char *nick, | |
330 const char *first, const char *last, const char *email); | |
331 unsigned short icq_SendMetaInfoReq(ICQLINK *link, unsigned long uin); | |
332 | |
333 void icq_FmtLog(ICQLINK *link, int level, const char *fmt, ...); | |
334 | |
335 void icq_ContactAdd(ICQLINK *link, unsigned long cuin); | |
336 void icq_ContactRemove(ICQLINK *link, unsigned long cuin); | |
337 void icq_ContactClear(ICQLINK *link ); | |
338 void icq_ContactSetVis(ICQLINK *link, unsigned long cuin, unsigned char vu); | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
339 void icq_ContactSetInvis(ICQLINK *link, unsigned long cuin, unsigned char vu); |
1152 | 340 |
341 /*** TCP ***/ | |
342 void icq_TCPMain(ICQLINK *link); | |
343 | |
344 void icq_TCPProcessReceived(ICQLINK *link); | |
345 | |
346 unsigned long icq_TCPSendMessage(ICQLINK *link, unsigned long uin, | |
347 const char *message); | |
348 unsigned long icq_TCPSendURL(ICQLINK *link, unsigned long uin, | |
349 const char *message, const char *url); | |
350 unsigned long icq_SendChatRequest(ICQLINK *link, unsigned long uin, | |
351 const char *message); | |
352 void icq_AcceptChatRequest(ICQLINK *link, unsigned long uin, unsigned long seq); | |
353 | |
354 void icq_CancelChatRequest(ICQLINK *link, unsigned long uin, | |
355 unsigned long sequence); | |
356 void icq_RefuseChatRequest(ICQLINK *link, unsigned long uin, | |
357 unsigned long sequence, const char *reason); | |
358 | |
359 /*** TCP ***/ | |
360 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
361 /** \defgroup ChatSession Chat Session Documentation |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
362 * icqlib's 'Chat Session' abstraction represents ICQ's 'chat' function |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
363 * between two participants. Multi-party chat is not yet supported. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
364 * |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
365 * An icq_ChatSession is instantiated when a 'Chat Request' event is |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
366 * accepted. Upon receipt of a 'Chat Accept' event or a call to |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
367 * icq_AcceptChatRequest, icqlib will create a new chat session and pass the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
368 * new chat session pointer back to the library client through the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
369 * icq_RequestNotify / ICQ_NOTIFY_CHATSESSION callback. This pointer should |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
370 * be stored by the library client, as multiple chat sessions may be in |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
371 * progress at any given time. The icq_ChatSession pointer is used as a key |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
372 * for all future communication between the library and the library client to |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
373 * indicate which icq_ChatSession is currently being dealt with. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
374 * |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
375 * icqlib communicates chat session events through use of the icq_ChatNotify |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
376 * callback, such as the CHAT_NOTIFY_DATA event. The library client |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
377 * can perform operations on a chat session by use of the icq_ChatSession* |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
378 * functions, such as sending data to the remote uin by using the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
379 * icq_ChatSessionSendData function. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
380 * |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
381 * A new chat session must first undergo an initialization sequence before is |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
382 * ready to transmit and receive data. As this initialization is in progress |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
383 * the chat session will transition through various statuses depending on |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
384 * whether icqlib sent the accept event or it received the accept event. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
385 * Each change in chat session status will be reported to the library |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
386 * client through use of the icq_ChatNotify callback, with a @type parameter |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
387 * of CHAT_NOTIFY_STATUS and an @a arg parameter of the status value. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
388 * |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
389 * Once the chat session initialization is complete, both sides will enter |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
390 * the CHAT_STATUS_READY state, indicating that the chat session is |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
391 * ready to send and receive data. Received data is reported through the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
392 * icq_ChatNotify callback, with a @type of CHAT_NOTIFY_DATA. The library |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
393 * client can send data using icq_ChatSessionSendData or |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
394 * icq_ChatSessionSendData_n. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
395 * |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
396 * Chat sessions may be terminated at any time, by either side. The library |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
397 * client may terminate a chat session by using icq_ChatSessionClose, or |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
398 * the remote uin may terminate a chat session. In either instance, a |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
399 * CHAT_STATUS_CLOSE event will be reported through the icq_ChatNotify |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
400 * callback. Once this callback is complete (e.g. your application's |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
401 * callback handler returns), the icq_ChatSession will be deleted by icqlib |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
402 * and the session pointer becomes invalid. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
403 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
404 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
405 /** @name Type Constants |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
406 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
407 * These values are used as the @a type parameter in the icq_ChatNotify |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
408 * callback to indicate the type of chat session event that has occured. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
409 * The remaining @a arg and @a data parameters passed by the callback |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
410 * are specific to each event; see the documentation for each type |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
411 * constant. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
412 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
413 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
414 /*@{*/ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
415 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
416 /** Status has changed. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
417 * @param arg new session status - one of the CHAT_STATUS_* defines |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
418 * @param data unused. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
419 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
420 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
421 #define CHAT_NOTIFY_STATUS 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
422 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
423 /** Data has been received from a chat participant. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
424 * @param arg length of data received |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
425 * @param data pointer to buffer containing received data |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
426 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
427 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
428 #define CHAT_NOTIFY_DATA 2 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
429 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
430 /** Session has been closed, either automatically by icqlib or |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
431 * explicitly by a call to icq_ChatSessionClose. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
432 * @param arg unused |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
433 * @param data unused |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
434 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
435 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
436 #define CHAT_NOTIFY_CLOSE 3 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
437 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
438 /*@}*/ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
439 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
440 /** @name Status Constants |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
441 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
442 * These constants are used as the @a arg parameter during in the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
443 * icq_ChatNotify/CHAT_NOTIFY_STATUS callback to indicate the |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
444 * new status of the chat session. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
445 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
446 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
447 /*@{*/ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
448 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
449 /** icqlib is listening for a chat connection from the remote uin. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
450 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
451 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
452 #define CHAT_STATUS_LISTENING 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
453 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
454 /** A connection has been established with the remote uin. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
455 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
456 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
457 #define CHAT_STATUS_CONNECTED 3 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
458 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
459 /** icqlib is currently waiting for the remote uin to send the chat |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
460 * initialization packet which contains the remote uin's chat handle. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
461 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
462 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
463 #define CHAT_STATUS_WAIT_NAME 4 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
464 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
465 /** icqlib is currently waiting for the remote uin to send the chat |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
466 * initialization packet which contains the remote uin's font information. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
467 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
468 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
469 #define CHAT_STATUS_WAIT_FONT 6 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
470 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
471 /** A connection to the chat session port of the remote uin is in |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
472 * progress. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
473 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
474 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
475 /* chat session statuses - request sender */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
476 #define CHAT_STATUS_CONNECTING 2 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
477 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
478 /** icqlib is currently waiting for the remote uin to send the chat |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
479 * initialization packet which contains the remote uin's chat handle |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
480 * and font information. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
481 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
482 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
483 #define CHAT_STATUS_WAIT_ALLINFO 5 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
484 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
485 /** Chat session initialization has completed successfully. The session |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
486 * is now fully established - both sides can begin to send data and |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
487 * should be prepared to accept data. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
488 * @ingroup ChatSession |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
489 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
490 #define CHAT_STATUS_READY 7 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
491 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
492 /*@}*/ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
493 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
494 /** Chat Session state structure. This structure is used internally by |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
495 * icqlib to maintain state information about each chat session. All |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
496 * members should be considered read-only! Use the appropriate |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
497 * icq_ChatSession* function to change the state of a chat session, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
498 * results are undefined if your application attempts to manipulate this |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
499 * structure itself. |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
500 */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
501 struct icq_ChatSession_s { |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
502 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
503 /** For internal icqlib use only. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
504 unsigned long id; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
505 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
506 /** Current status of the chat session. See 'Status Constants' group. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
507 int status; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
508 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
509 /** ICQLINK that spawned this chat session. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
510 ICQLINK *icqlink; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
511 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
512 /** For internal icqlib use only. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
513 icq_TCPLink *tcplink; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
514 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
515 /** Remote uin number. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
516 unsigned long remote_uin; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
517 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
518 /** Remote uin's chat handle. */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
519 char remote_handle[64]; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
520 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
521 }; |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
522 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
523 void icq_ChatSessionClose(icq_ChatSession *session); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
524 void icq_ChatSessionSendData(icq_ChatSession *session, const char *data); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
525 void icq_ChatSessionSendData_n(icq_ChatSession *session, const char *data, |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
526 int length); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
527 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
528 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
529 /* FileNotify constants */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
530 #define FILE_NOTIFY_DATAPACKET 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
531 #define FILE_NOTIFY_STATUS 2 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
532 #define FILE_NOTIFY_CLOSE 3 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
533 #define FILE_NOTIFY_NEW_SPEED 4 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
534 #define FILE_NOTIFY_STOP_FILE 5 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
535 |
1152 | 536 /* file session statuses- request receiver */ |
537 #define FILE_STATUS_LISTENING 1 | |
538 #define FILE_STATUS_CONNECTED 3 | |
539 | |
540 /* file session statuses- request sender */ | |
541 #define FILE_STATUS_CONNECTING 2 | |
542 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
543 #define FILE_STATUS_INITIALIZING 4 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
544 |
1152 | 545 #define FILE_STATUS_NEXT_FILE 5 |
546 | |
547 /* once negotiation is complete, file session enters proper state */ | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
548 #define FILE_STATUS_SENDING 6 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
549 #define FILE_STATUS_RECEIVING 7 |
1152 | 550 |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
551 struct icq_FileSession_s { |
1152 | 552 |
553 unsigned long id; | |
554 int status; | |
555 ICQLINK *icqlink; | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
556 icq_TCPLink *tcplink; |
1152 | 557 |
558 int direction; | |
559 | |
560 unsigned long remote_uin; | |
561 char remote_handle[64]; | |
562 | |
563 char **files; | |
564 int total_files; | |
565 int current_file_num; | |
566 unsigned long total_bytes; | |
567 unsigned long total_transferred_bytes; | |
568 | |
569 char working_dir[512]; | |
570 char current_file[64]; | |
571 int current_fd; | |
572 unsigned long current_file_size; | |
573 unsigned long current_file_progress; | |
574 | |
575 int current_speed; | |
576 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
577 }; |
1152 | 578 |
579 icq_FileSession *icq_AcceptFileRequest(ICQLINK *link, unsigned long uin, | |
580 unsigned long sequence); | |
581 unsigned long icq_SendFileRequest(ICQLINK *link, unsigned long uin, | |
582 const char *message, char **files); | |
583 void icq_CancelFileRequest(ICQLINK *link, unsigned long uin, | |
584 unsigned long sequence); | |
585 void icq_RefuseFileRequest(ICQLINK *link, unsigned long uin, | |
586 unsigned long sequence, const char *reason); | |
587 | |
588 void icq_FileSessionSetSpeed(icq_FileSession *p, int speed); | |
589 void icq_FileSessionClose(icq_FileSession *p); | |
590 void icq_FileSessionSetWorkingDir(icq_FileSession *p, const char *dir); | |
591 void icq_FileSessionSetFiles(icq_FileSession *p, char **files); | |
592 | |
1432
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
593 /* Socket Manager */ |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
594 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
595 #define ICQ_SOCKET_READ 0 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
596 #define ICQ_SOCKET_WRITE 1 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
597 #define ICQ_SOCKET_MAX 2 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
598 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
599 extern void (*icq_SocketNotify)(int socket, int type, int status); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
600 |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
601 void icq_HandleReadySocket(int socket, int type); |
4c510ca3563f
[gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1309
diff
changeset
|
602 |
1152 | 603 #ifdef __cplusplus |
604 } | |
605 #endif /* __cplusplus */ | |
606 | |
607 #endif /* _ICQ_H_ */ |