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