Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

DownloadTransferHTTP.h

Go to the documentation of this file.
00001 //
00002 // DownloadTransferHTTP.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_DOWNLOADTRANSFERHTTP_H__EE18C980_54B9_40EF_A55B_42FC2AAEA3B0__INCLUDED_)
00023 #define AFX_DOWNLOADTRANSFERHTTP_H__EE18C980_54B9_40EF_A55B_42FC2AAEA3B0__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "DownloadTransfer.h"
00028 
00029 
00030 class CDownloadTransferHTTP : public CDownloadTransfer
00031 {
00032 // Construction
00033 public:
00034         CDownloadTransferHTTP(CDownloadSource* pSource);
00035         virtual ~CDownloadTransferHTTP();
00036 
00037 // Attributes
00038 protected:
00039         DWORD                   m_nRequests;
00040         DWORD                   m_tRequest;
00041         DWORD                   m_tContent;
00042         BOOL                    m_bBadResponse;
00043         BOOL                    m_bBusyFault;
00044         BOOL                    m_bRangeFault;
00045         BOOL                    m_bKeepAlive;
00046         BOOL                    m_bHashMatch;
00047         CString                 m_sTigerTree;
00048         BOOL                    m_bTigerFetch;
00049         BOOL                    m_bTigerIgnore;
00050         CString                 m_sMetadata;
00051         BOOL                    m_bMetaFetch;
00052         BOOL                    m_bMetaIgnore;
00053         BOOL                    m_bGotRange;
00054         BOOL                    m_bGotRanges;
00055         BOOL                    m_bQueueFlag;
00056         QWORD                   m_nContentLength;
00057         CString                 m_sContentType;
00058         DWORD                   m_nRetryDelay;
00059 
00060 // Operations
00061 public:
00062         virtual BOOL    Initiate();
00063         BOOL                    AcceptPush(CConnection* pConnection);
00064         virtual void    Close(TRISTATE bKeepSource);
00065         virtual void    Boost();
00066         virtual DWORD   GetAverageSpeed();
00067     virtual BOOL        SubtractRequested(FF::SimpleFragmentList& ppFragments);
00068         virtual BOOL    OnRun();
00069 protected:
00070         BOOL                    StartNextFragment();
00071         BOOL                    SendRequest();
00072         BOOL                    ReadResponseLine();
00073         BOOL                    ReadContent();
00074         BOOL                    ReadTiger();
00075         BOOL                    ReadMetadata();
00076         BOOL                    ReadFlush();
00077 protected:
00078         virtual BOOL    OnConnected();
00079         virtual BOOL    OnRead();
00080         virtual void    OnDropped(BOOL bError);
00081         virtual BOOL    OnHeaderLine(CString& strHeader, CString& strValue);
00082         virtual BOOL    OnHeadersComplete();
00083 
00084 };
00085 
00086 #endif // !defined(AFX_DOWNLOADTRANSFERHTTP_H__EE18C980_54B9_40EF_A55B_42FC2AAEA3B0__INCLUDED_)

Generated on Thu Dec 15 10:39:41 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2