Sun, 17 Mar 2002 22:23:18 +0000
[gaim-migrate @ 3090]
CLeaner PID stuff. Thanks, BMIller :)
committer: Rob Flynn <gaim@robflynn.com>
| 2086 | 1 | /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 | ||
| 3 | /* | |
| 4 | * $Id: stdpackets.h 2096 2001-07-31 01:00:39Z warmenhoven $ | |
| 5 | * | |
| 6 | * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and | |
| 7 | * Bill Soudan <soudan@kde.org> | |
| 8 | * | |
| 9 | * This program is free software; you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
| 22 | * | |
| 23 | */ | |
| 24 | ||
| 25 | #ifndef _ICQTCPPACKETS_H | |
| 26 | #define _ICQTCPPACKETS_H | |
| 27 | ||
| 28 | #ifdef HAVE_CONFIG_H | |
| 29 | #include <config.h> | |
| 30 | #endif | |
| 31 | ||
| 32 | #define ICQ_UDP_VER 0x0005 | |
| 33 | #define ICQ_TCP_VER 0x0003 | |
| 34 | ||
| 35 | /* TCP Packet Commands */ | |
| 36 | #define ICQ_TCP_HELLO 0xFF | |
| 37 | #define ICQ_TCP_CANCEL 0x07D0 | |
| 38 | #define ICQ_TCP_ACK 0x07DA | |
| 39 | #define ICQ_TCP_MESSAGE 0x07EE | |
| 40 | ||
| 41 | /* TCP Message Types */ | |
| 42 | #define ICQ_TCP_MSG_MSG 0x0001 | |
| 43 | #define ICQ_TCP_MSG_CHAT 0x0002 | |
| 44 | #define ICQ_TCP_MSG_FILE 0x0003 | |
| 45 | #define ICQ_TCP_MSG_URL 0x0004 | |
| 46 | #define ICQ_TCP_MSG_CONTACTLIST 0x0013 | |
| 47 | #define ICQ_TCP_MSG_READAWAY 0x03E8 | |
| 48 | #define ICQ_TCP_MSG_READOCCUPIED 0x03E9 | |
| 49 | #define ICQ_TCP_MSG_READNA 0x03EA | |
| 50 | #define ICQ_TCP_MSG_READDND 0x03EB | |
| 51 | #define ICQ_TCP_MSG_READFFC 0x03EC | |
| 52 | #define ICQ_TCP_MASS_MASK 0x8000 | |
| 53 | ||
| 54 | /* TCP Message Command Types */ | |
| 55 | #define ICQ_TCP_MSG_ACK 0x0000 | |
| 56 | #define ICQ_TCP_MSG_AUTO 0x0000 | |
| 57 | #define ICQ_TCP_MSG_REAL 0x0010 | |
| 58 | #define ICQ_TCP_MSG_LIST 0x0020 | |
| 59 | #define ICQ_TCP_MSG_URGENT 0x0040 | |
| 60 | #define ICQ_TCP_MSG_INVISIBLE 0x0090 | |
| 61 | #define ICQ_TCP_MSG_UNK_1 0x00A0 | |
| 62 | #define ICQ_TCP_MSG_AWAY 0x0110 | |
| 63 | #define ICQ_TCP_MSG_OCCUPIED 0x0210 | |
| 64 | #define ICQ_TCP_MSG_UNK_2 0x0802 | |
| 65 | #define ICQ_TCP_MSG_NA 0x0810 | |
| 66 | #define ICQ_TCP_MSG_NA_2 0x0820 | |
| 67 | #define ICQ_TCP_MSG_DND 0x1010 | |
| 68 | ||
| 69 | /* TCP Message Statuses */ | |
| 70 | #define ICQ_TCP_STATUS_ONLINE 0x0000 | |
| 71 | #define ICQ_TCP_STATUS_REFUSE 0x0001 | |
| 72 | #define ICQ_TCP_STATUS_AWAY 0x0004 | |
| 73 | #define ICQ_TCP_STATUS_OCCUPIED 0x0009 | |
| 74 | #define ICQ_TCP_STATUS_DND 0x000A | |
| 75 | #define ICQ_TCP_STATUS_NA 0x000E | |
| 76 | #define ICQ_TCP_STATUS_FREE_CHAT ICQ_TCP_STATUS_ONLINE | |
| 77 | #define ICQ_TCP_STATUS_INVISIBLE ICQ_TCP_STATUS_ONLINE | |
| 78 | ||
| 79 | #include "tcplink.h" | |
| 80 | ||
| 81 | icq_Packet *icq_TCPCreateInitPacket(icq_TCPLink *plink); | |
| 82 | icq_Packet *icq_TCPCreateStdPacket(icq_TCPLink *plink, WORD icq_TCPCommand, | |
| 83 | WORD type, const char *msg, WORD status, WORD msg_command); | |
| 84 | icq_Packet *icq_TCPCreateMessagePacket(icq_TCPLink *plink, const char *message); | |
| 85 | icq_Packet *icq_TCPCreateURLPacket(icq_TCPLink *plink, const char *message, | |
| 86 | const char *url); | |
| 87 | icq_Packet *icq_TCPCreateAwayReqPacket(icq_TCPLink *plink, WORD statusMode); | |
| 88 | icq_Packet *icq_TCPCreateChatReqPacket(icq_TCPLink *plink, const char *message); | |
| 89 | icq_Packet *icq_TCPCreateFileReqPacket(icq_TCPLink *plink, | |
| 90 | const char *message, const char *filename, DWORD size); | |
| 91 | void icq_TCPAppendSequence(icq_Link *icqlink, icq_Packet *p); | |
| 92 | void icq_TCPAppendSequenceN(icq_Link *icqlink, icq_Packet *p, DWORD seq); | |
| 93 | ||
| 94 | icq_Packet *icq_TCPCreateMessageAck(icq_TCPLink *plink, const char *message); | |
| 95 | icq_Packet *icq_TCPCreateURLAck(icq_TCPLink *plink, const char *message); | |
| 96 | icq_Packet *icq_TCPCreateContactListAck(icq_TCPLink *plink, const char *message); | |
| 97 | icq_Packet *icq_TCPCreateWebPagerAck(icq_TCPLink *plink, const char *message); | |
| 98 | icq_Packet *icq_TCPCreateChatReqAck(icq_TCPLink *plink, WORD port); | |
| 99 | icq_Packet *icq_TCPCreateChatReqCancel(icq_TCPLink *plink, WORD port); | |
| 100 | icq_Packet *icq_TCPCreateChatReqRefuse(icq_TCPLink *plink, WORD port, | |
| 101 | const char *reason); | |
| 102 | icq_Packet *icq_TCPCreateFileReqAck(icq_TCPLink *plink, WORD port); | |
| 103 | icq_Packet *icq_TCPCreateFileReqCancel(icq_TCPLink *plink, WORD port); | |
| 104 | icq_Packet *icq_TCPCreateFileReqRefuse(icq_TCPLink *plink, WORD port, | |
| 105 | const char *reason); | |
| 106 | ||
| 107 | icq_Packet *icq_TCPCreateChatInfoPacket(icq_TCPLink *plink, const char *name, | |
| 108 | DWORD foreground, DWORD background); | |
| 109 | icq_Packet *icq_TCPCreateChatInfo2Packet(icq_TCPLink *plink, const char *name, | |
| 110 | DWORD foreground, DWORD background); | |
| 111 | icq_Packet *icq_TCPCreateChatFontInfoPacket(icq_TCPLink *plink); | |
| 112 | ||
| 113 | icq_Packet *icq_TCPCreateFile00Packet(DWORD num_files, DWORD total_bytes, DWORD speed, const char *name); | |
| 114 | icq_Packet *icq_TCPCreateFile01Packet(DWORD speed, const char *name); | |
| 115 | icq_Packet *icq_TCPCreateFile02Packet(const char *filename, DWORD filesize, DWORD speed); | |
| 116 | icq_Packet *icq_TCPCreateFile03Packet(DWORD filesize, DWORD speed); | |
| 117 | icq_Packet *icq_TCPCreateFile04Packet(DWORD filenum); | |
| 118 | icq_Packet *icq_TCPCreateFile05Packet(DWORD speed); | |
| 119 | icq_Packet *icq_TCPCreateFile06Packet(int length, void *data); | |
| 120 | ||
| 121 | icq_Packet *icq_UDPCreateStdPacket(icq_Link *icqlink, WORD cmd); | |
| 122 | icq_Packet *icq_UDPCreateStdSeqPacket(icq_Link *icqlink, WORD cmd, WORD seq); | |
| 123 | ||
| 124 | #endif /* _ICQTCPPACKETS_H */ | |
| 125 | ||
| 126 | /* From `tcppackets.c': */ | |
| 127 |