Mercurial > pidgin
annotate plugins/icq/udp.h @ 1912:8ed70631ed15
[gaim-migrate @ 1922]
new icqlib
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 29 May 2001 10:32:53 +0000 |
parents | 201ec77f3a60 |
children | 7b3f1eb1ef7d |
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:
1152
diff
changeset
|
2 |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
3 /* |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
4 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
5 * Bill Soudan <soudan@kde.org> |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
6 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
10 * (at your option) any later version. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
11 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
15 * GNU General Public License for more details. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
16 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
20 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
21 */ |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
22 |
1152 | 23 #ifndef _UDP_H_ |
24 #define _UDP_H_ | |
25 | |
26 #ifdef HAVE_CONFIG_H | |
27 #include <config.h> | |
28 #endif | |
29 | |
30 #include "icq.h" | |
31 #include "util.h" | |
32 #include "icqpacket.h" | |
33 | |
34 #define UDP_CMD_ACK 0x000A | |
35 #define UDP_CMD_SEND_THRU_SRV 0x010E | |
36 #define UDP_CMD_LOGIN 0x03E8 | |
37 #define UDP_CMD_CONT_LIST 0x0406 | |
38 #define UDP_CMD_SEARCH_UIN 0x041A | |
39 #define UDP_CMD_SEARCH_USER 0x0424 | |
40 #define UDP_CMD_KEEP_ALIVE 0x042E | |
41 #define UDP_CMD_KEEP_ALIVE2 0x051E | |
42 #define UDP_CMD_SEND_TEXT_CODE 0x0438 | |
43 #define UDP_CMD_LOGIN_1 0x044C | |
44 #define UDP_CMD_INFO_REQ 0x0460 | |
45 #define UDP_CMD_EXT_INFO_REQ 0x046A | |
46 #define UDP_CMD_CHANGE_PW 0x049C | |
47 #define UDP_CMD_STATUS_CHANGE 0x04D8 | |
48 #define UDP_CMD_LOGIN_2 0x0528 | |
49 #define UDP_CMD_UPDATE_INFO 0x050A | |
50 #define UDP_CMD_UPDATE_AUTH 0x0514 | |
51 #define UDP_CMD_UPDATE_EXT_INFO 0x04B0 | |
52 #define UDP_CMD_ADD_TO_LIST 0x053C | |
53 #define UDP_CMD_REQ_ADD_LIST 0x0456 | |
54 #define UDP_CMD_QUERY_SERVERS 0x04BA | |
55 #define UDP_CMD_QUERY_ADDONS 0x04C4 | |
56 #define UDP_CMD_NEW_USER_1 0x04EC | |
57 #define UDP_CMD_NEW_USER_INFO 0x04A6 | |
58 #define UDP_CMD_ACK_MESSAGES 0x0442 | |
59 #define UDP_CMD_MSG_TO_NEW_USER 0x0456 | |
60 #define UDP_CMD_REG_NEW_USER 0x03FC | |
61 #define UDP_CMD_VIS_LIST 0x06AE | |
62 #define UDP_CMD_INVIS_LIST 0x06A4 | |
63 #define UDP_CMD_META_USER 0x064A | |
64 #define UDP_CMD_RAND_SEARCH 0x056E | |
65 #define UDP_CMD_RAND_SET 0x0564 | |
66 #define UDP_CMD_REVERSE_TCP_CONN 0x015E | |
67 | |
68 #define UDP_SRV_ACK 0x000A | |
69 #define UDP_SRV_LOGIN_REPLY 0x005A | |
70 #define UDP_SRV_USER_ONLINE 0x006E | |
71 #define UDP_SRV_USER_OFFLINE 0x0078 | |
72 #define UDP_SRV_USER_FOUND 0x008C | |
73 #define UDP_SRV_OFFLINE_MESSAGE 0x00DC | |
74 #define UDP_SRV_END_OF_SEARCH 0x00A0 | |
75 #define UDP_SRV_INFO_REPLY 0x0118 | |
76 #define UDP_SRV_EXT_INFO_REPLY 0x0122 | |
77 #define UDP_SRV_STATUS_UPDATE 0x01A4 | |
78 #define UDP_SRV_X1 0x021C | |
79 #define UDP_SRV_X2 0x00E6 | |
80 #define UDP_SRV_UPDATE 0x01E0 | |
81 #define UDP_SRV_UPDATE_EXT 0x00C8 | |
82 #define UDP_SRV_NEW_UIN 0x0046 | |
83 #define UDP_SRV_NEW_USER 0x00B4 | |
84 #define UDP_SRV_QUERY 0x0082 | |
85 #define UDP_SRV_SYSTEM_MESSAGE 0x01C2 | |
86 #define UDP_SRV_ONLINE_MESSAGE 0x0104 | |
87 #define UDP_SRV_GO_AWAY 0x00F0 | |
88 #define UDP_SRV_TRY_AGAIN 0x00FA | |
89 #define UDP_SRV_FORCE_DISCONNECT 0x0028 | |
90 #define UDP_SRV_MULTI_PACKET 0x0212 | |
91 #define UDP_SRV_WRONG_PASSWORD 0x0064 | |
92 #define UDP_SRV_INVALID_UIN 0x012C | |
93 #define UDP_SRV_META_USER 0x03DE | |
94 #define UDP_SRV_RAND_USER 0x024E | |
95 #define UDP_SRV_AUTH_UPDATE 0x01F4 | |
96 | |
97 #define META_CMD_SET_INFO 1000 | |
98 #define META_CMD_SET_HOMEPAGE 1020 | |
99 #define META_CMD_SET_ABOUT 1030 | |
100 #define META_CMD_SET_SECURE 1060 | |
101 #define META_CMD_SET_PASS 1070 | |
102 #define META_CMD_REQ_INFO 1200 | |
103 #define META_SRV_RES_INFO 100 | |
104 #define META_SRV_RES_HOMEPAGE 120 | |
105 #define META_SRV_RES_ABOUT 130 | |
106 #define META_SRV_RES_SECURE 160 | |
107 #define META_SRV_RES_PASS 170 | |
108 #define META_SRV_USER_INFO 200 | |
109 #define META_SRV_USER_WORK 210 | |
110 #define META_SRV_USER_MORE 220 | |
111 #define META_SRV_USER_ABOUT 230 | |
112 #define META_SRV_USER_INTERESTS 240 | |
113 #define META_SRV_USER_AFFILIATIONS 250 | |
114 #define META_SRV_USER_HPCATEGORY 270 | |
115 #define META_SRV_USER_FOUND 410 | |
116 | |
117 #define META_SRV_SUCCESS 10 | |
118 #define META_SRV_FAILURE 50 | |
119 | |
120 #define TYPE_MSG 0x0001 | |
121 #define TYPE_CHAT 0x0002 | |
122 #define TYPE_FILE 0x0003 | |
123 #define TYPE_URL 0x0004 | |
124 #define TYPE_AUTH_REQ 0x0006 | |
125 #define TYPE_AUTH 0x0008 | |
126 #define TYPE_ADDED 0x000C | |
127 #define TYPE_WEBPAGER 0x000D | |
128 #define TYPE_EXPRESS 0x000E | |
129 #define TYPE_CONTACT 0x0013 | |
130 #define TYPE_MASS_MASK 0x8000 | |
131 | |
132 #define LOGIN_X1_DEF 0x00000098 | |
133 /*#define LOGIN_X1_DEF 0x000000D5*/ | |
134 #define LOGIN_X3_DEF 0x00000003 | |
135 /*#define LOGIN_X3_DEF 0x00000006*/ | |
136 #define LOGIN_X4_DEF 0x00000000 | |
137 #define LOGIN_X5_DEF 0x00980010 | |
138 /*#define LOGIN_X5_DEF 0x00D50008*/ | |
139 #define LOGIN_X6_DEF 0x00000050 | |
140 #define LOGIN_X7_DEF 0x00000003 | |
141 #define LOGIN_X8_DEF 0x00000000 | |
142 | |
143 #define LOGIN_SNDONLY_TCP 0x02 | |
144 #define LOGIN_SNDRCV_TCP 0x04 | |
145 #define LOGIN_NO_TCP 0x06 | |
146 | |
1912
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
147 void icq_SendGotMessages(icq_Link *icqlink); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
148 void icq_SendLogin1(icq_Link *icqlink); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
149 void icq_StatusUpdate(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
150 void icq_AckSrv(icq_Link *icqlink, int seq); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
151 void icq_HandleUserOffline(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
152 void icq_HandleUserOnline(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
153 void icq_DoMsg(icq_Link *icqlink, DWORD type, WORD len, char *data, DWORD uin, |
1152 | 154 BYTE hour, BYTE minute, BYTE day, BYTE month, WORD year); |
1912
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
155 int icq_UDPSockWriteDirect(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
156 int icq_UDPSockWrite(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
157 int icq_UDPSockRead(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
158 void icq_ServerResponse(icq_Link *icqlink, icq_Packet*); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
159 void icq_HandleMultiPacket(icq_Link *icqlink, icq_Packet*); |
1152 | 160 |
1912
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
161 void icq_UDPAck(icq_Link *icqlink, int seq); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
162 WORD icq_UDPSendMessage(icq_Link *icqlink, DWORD uin, const char *text); |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
163 WORD icq_UDPSendURL(icq_Link *icqlink, DWORD uin, const char *url, const char *descr); |
1152 | 164 |
165 #endif /* _UDP_H_ */ |