Mercurial > pidgin
annotate plugins/icq/icqpacket.h @ 2009:ac9dd6b00b34
[gaim-migrate @ 2019]
different way of specifying offline messages. Jeremy, I'm just about to look at your patch
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 13 Jun 2001 21:28:03 +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:
1152
diff
changeset
|
2 |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
3 /* |
1977
7b3f1eb1ef7d
[gaim-migrate @ 1987]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1912
diff
changeset
|
4 * $Id: icqpacket.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:
1152
diff
changeset
|
6 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
7 * Bill Soudan <soudan@kde.org> |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
8 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
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:
1152
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:
1152
diff
changeset
|
11 * the Free Software Foundation; either version 2 of the License, or |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
12 * (at your option) any later version. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
13 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
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:
1152
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
17 * GNU General Public License for more details. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
18 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
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:
1152
diff
changeset
|
20 * along with this program; if not, write to the Free Software |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
22 * |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
23 */ |
8ed70631ed15
[gaim-migrate @ 1922]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1152
diff
changeset
|
24 |
1152 | 25 #ifndef _ICQ_PACKET_H_ |
26 #define _ICQ_PACKET_H_ | |
27 | |
28 #ifdef HAVE_CONFIG_H | |
29 #include <config.h> | |
30 #endif | |
31 | |
32 #include "icqtypes.h" | |
33 | |
34 #define ICQ_PACKET_DATA_SIZE 4096 | |
35 | |
36 typedef struct icq_Packet_s | |
37 { | |
38 DWORD id; | |
39 WORD cursor; | |
40 WORD length; | |
41 BYTE data[ICQ_PACKET_DATA_SIZE]; | |
42 } icq_Packet; | |
43 | |
44 icq_Packet *icq_PacketNew(); | |
45 void icq_PacketDelete(void *); | |
46 | |
47 void icq_PacketAppend(icq_Packet *, const void *, int); | |
48 void icq_PacketAppend32(icq_Packet *, DWORD); | |
49 void icq_PacketAppend32n(icq_Packet *, DWORD); | |
50 void icq_PacketAppend16(icq_Packet *, WORD); | |
51 void icq_PacketAppend16n(icq_Packet *, WORD); | |
52 void icq_PacketAppend8(icq_Packet *, BYTE); | |
53 void icq_PacketAppendString(icq_Packet *, const char *); | |
54 void icq_PacketAppendStringFE(icq_Packet *, const char *); | |
55 void icq_PacketAppendString0(icq_Packet *, const char *); | |
56 | |
57 const void *icq_PacketRead(icq_Packet*, int); | |
58 DWORD icq_PacketRead32(icq_Packet*); | |
59 DWORD icq_PacketRead32n(icq_Packet*); | |
60 WORD icq_PacketRead16(icq_Packet*); | |
61 WORD icq_PacketRead16n(icq_Packet*); | |
62 BYTE icq_PacketRead8(icq_Packet*); | |
63 const char *icq_PacketReadString(icq_Packet*); | |
64 char *icq_PacketReadStringNew(icq_Packet*); | |
65 WORD icq_PacketReadUDPOutVer(icq_Packet*); | |
66 WORD icq_PacketReadUDPOutCmd(icq_Packet*); | |
67 WORD icq_PacketReadUDPOutSeq1(icq_Packet*); | |
68 WORD icq_PacketReadUDPOutSeq2(icq_Packet*); | |
69 WORD icq_PacketReadUDPInVer(icq_Packet*); | |
70 WORD icq_PacketReadUDPInCmd(icq_Packet*); | |
1977
7b3f1eb1ef7d
[gaim-migrate @ 1987]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1912
diff
changeset
|
71 WORD icq_PacketReadUDPInCmdV3(icq_Packet*); |
1152 | 72 WORD icq_PacketReadUDPInSeq1(icq_Packet*); |
73 WORD icq_PacketReadUDPInSeq2(icq_Packet*); | |
74 DWORD icq_PacketReadUDPInUIN(icq_Packet*); | |
75 | |
76 void icq_PacketDump(icq_Packet*); | |
77 void icq_PacketUDPDump(icq_Packet*); | |
78 void icq_PacketBegin(icq_Packet*); | |
79 void icq_PacketEnd(icq_Packet*); | |
80 void icq_PacketAdvance(icq_Packet*, int); | |
81 void icq_PacketGoto(icq_Packet*, int); | |
82 void icq_PacketGotoUDPOutData(icq_Packet*, int); | |
83 void icq_PacketGotoUDPInData(icq_Packet*, int); | |
84 WORD icq_PacketPos(icq_Packet*); | |
85 int icq_PacketSend(icq_Packet*, int); | |
86 | |
87 #endif /* _ICQ_PACKET_H_ */ |