00001 // 00002 // Datagram.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 00022 #if !defined(AFX_DATAGRAM_H__72C119CA_1D67_4B22_A9DF_51398F17B756__INCLUDED_) 00023 #define AFX_DATAGRAM_H__72C119CA_1D67_4B22_A9DF_51398F17B756__INCLUDED_ 00024 00025 #pragma once 00026 00027 class CBuffer; 00028 class CG2Packet; 00029 00030 00031 class CDatagramIn 00032 { 00033 // Construction 00034 public: 00035 CDatagramIn(); 00036 virtual ~CDatagramIn(); 00037 00038 // Attributes 00039 public: 00040 CDatagramIn* m_pNextHash; 00041 CDatagramIn** m_pPrevHash; 00042 CDatagramIn* m_pNextTime; 00043 CDatagramIn* m_pPrevTime; 00044 public: 00045 SOCKADDR_IN m_pHost; 00046 BOOL m_bCompressed; 00047 WORD m_nSequence; 00048 BYTE m_nCount; 00049 BYTE m_nLeft; 00050 DWORD m_tStarted; 00051 public: 00052 CBuffer** m_pBuffer; 00053 BOOL* m_pLocked; 00054 BYTE m_nBuffer; 00055 00056 // Operations 00057 public: 00058 void Create(SOCKADDR_IN* pHost, BYTE nFlags, WORD nSequence, BYTE nCount); 00059 BOOL Add(BYTE nPart, LPCVOID pData, DWORD nLength); 00060 CG2Packet* ToG2Packet(); 00061 00062 }; 00063 00064 #endif // !defined(AFX_DATAGRAM_H__72C119CA_1D67_4B22_A9DF_51398F17B756__INCLUDED_)