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