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

CDownloadBase Class Reference

#include <DownloadBase.h>

Inheritance diagram for CDownloadBase:

CDownloadWithSources CDownloadWithTransfers CDownloadWithFile CDownloadWithTorrent CDownloadWithTiger CDownloadWithSearch CDownloadWithExtras CDownload List of all members.

Public Member Functions

 CDownloadBase ()
virtual ~CDownloadBase ()
virtual void Pause ()=0
virtual void Resume ()=0
virtual void Remove (BOOL bDelete=FALSE)=0
virtual void Boost ()=0
virtual BOOL IsPaused () const =0
virtual BOOL IsMoving () const =0
virtual BOOL IsCompleted () const =0
virtual BOOL IsTasking ()
virtual BOOL IsTrying () const =0
void SetModified ()

Public Attributes

int m_nCookie
CString m_sRemoteName
CString m_sLocalName
QWORD m_nSize
BOOL m_bSHA1
SHA1 m_pSHA1
BOOL m_bSHA1Trusted
BOOL m_bTiger
TIGEROOT m_pTiger
BOOL m_bTigerTrusted
BOOL m_bMD5
MD5 m_pMD5
BOOL m_bMD5Trusted
BOOL m_bED2K
MD4 m_pED2K
BOOL m_bED2KTrusted
BOOL m_bBTH
SHA1 m_pBTH
BOOL m_bBTHTrusted

Protected Member Functions

void GenerateLocalName ()
virtual void Serialize (CArchive &ar, int nVersion)

Protected Attributes

CDownloadTaskm_pTask

Constructor & Destructor Documentation

CDownloadBase::CDownloadBase  ) 
 

Definition at line 47 of file DownloadBase.cpp.

References m_bBTH, m_bBTHTrusted, m_bED2K, m_bED2KTrusted, m_bMD5, m_bMD5Trusted, m_bSHA1, m_bSHA1Trusted, m_bTiger, m_bTigerTrusted, m_nCookie, m_nSize, m_pTask, NULL, and SIZE_UNKNOWN.

CDownloadBase::~CDownloadBase  )  [virtual]
 

Definition at line 64 of file DownloadBase.cpp.


Member Function Documentation

virtual void CDownloadBase::Boost  )  [pure virtual]
 

Implemented in CDownload.

void CDownloadBase::GenerateLocalName  )  [protected]
 

Definition at line 79 of file DownloadBase.cpp.

References CSettings::Downloads, CED2K::HashToString(), CTigerNode::HashToString(), CSHA::HashToString(), CSettings::sDownloads::IncompletePath, m_bBTH, m_bED2K, m_bSHA1, m_bTiger, m_pBTH, m_pED2K, m_pSHA1, m_pTiger, m_sLocalName, m_sRemoteName, NULL, CDownloadTask::SafeFilename(), and Settings.

Referenced by CDownloadWithFile::OpenFile(), CDownload::Save(), CDownloadWithFile::Serialize(), and CDownload::SerializeOld().

virtual BOOL CDownloadBase::IsCompleted  )  const [pure virtual]
 

Implemented in CDownload.

Referenced by CDownloadWithTorrent::ChokeTorrent(), CDownloadWithTorrent::RunTorrent(), and CDownloadWithTorrent::SeedTorrent().

virtual BOOL CDownloadBase::IsMoving  )  const [pure virtual]
 

Implemented in CDownload.

Referenced by CDownloadWithTorrent::CreateTorrentTransfer(), CDownloadWithTorrent::RunTorrent(), and CDownloadWithTorrent::SeedTorrent().

virtual BOOL CDownloadBase::IsPaused  )  const [pure virtual]
 

Implemented in CDownload.

Referenced by CDownloadWithTorrent::CreateTorrentTransfer(), CDownloadWithSearch::RunSearch(), and CDownloadWithTorrent::RunTorrent().

virtual BOOL CDownloadBase::IsTasking  )  [inline, virtual]
 

Definition at line 72 of file DownloadBase.h.

References m_pTask, and NULL.

Referenced by CDownloadsCtrl::GetDownloadStatus(), and CDownloadsWnd::OnDownloadsHelp().

virtual BOOL CDownloadBase::IsTrying  )  const [pure virtual]
 

Implemented in CDownload.

Referenced by CDownloadWithTorrent::RunTorrent().

virtual void CDownloadBase::Pause  )  [pure virtual]
 

Implemented in CDownload.

virtual void CDownloadBase::Remove BOOL  bDelete = FALSE  )  [pure virtual]
 

Implemented in CDownload.

virtual void CDownloadBase::Resume  )  [pure virtual]
 

Implemented in CDownload.

void CDownloadBase::Serialize CArchive &  ar,
int  nVersion
[protected, virtual]
 

Reimplemented in CDownload, CDownloadWithExtras, CDownloadWithFile, CDownloadWithSources, CDownloadWithTiger, and CDownloadWithTorrent.

Definition at line 106 of file DownloadBase.cpp.

References CTigerNode::IsNull(), CSHA::IsNull(), m_bED2K, m_bED2KTrusted, m_bMD5, m_bMD5Trusted, m_bSHA1, m_bSHA1Trusted, m_bTiger, m_bTigerTrusted, m_nSize, m_pED2K, m_pMD5, m_pSHA1, m_pTiger, m_sRemoteName, and MD5.

Referenced by CDownloadWithSources::Serialize().

void CDownloadBase::SetModified  ) 
 

Definition at line 71 of file DownloadBase.cpp.

References m_nCookie.

Referenced by CDownloadSource::AddFragment(), CDownloadWithExtras::AddPreviewName(), CDownloadWithSources::AddSourceInternal(), CDownload::Boost(), CDownloadSource::CheckHash(), CDownloadWithSources::ClearSources(), CDownloadWithTiger::ClearVerification(), CDownloadWithFile::DeleteFile(), CDownloadWithExtras::DeletePreviews(), CDownloadWithFile::EraseRange(), CDownloadWithTiger::FinishValidation(), CDownload::OnDownloaded(), CDownloadSource::OnFailure(), CDownloadEditDlg::OnLButtonUp(), CDownload::OnMoved(), CDownload::OnVerify(), CDownloadWithFile::OpenFile(), CDownloadWithSources::RemoveSource(), CDownload::Rename(), CDownloadWithTiger::ResetVerification(), CDownload::Resume(), CDownloadWithTorrent::SeedTorrent(), CDownloadSource::SetAvailableRanges(), CDownloadSource::SetGnutella(), CDownloadWithTiger::SetHashset(), CDownloadSource::SetLastSeen(), CDownload::SetStartTimer(), CDownloadWithTiger::SetTigerTree(), CDownloadWithTorrent::SetTorrent(), CDownloadSource::SetValid(), CDownload::Share(), CDownload::StopTrying(), and CDownloadWithFile::SubmitData().


Member Data Documentation

BOOL CDownloadBase::m_bBTH
 

Definition at line 57 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CQueryHashMaster::Build(), CDownloadWithSearch::CanSearch(), CDownloadBase(), CDownloadTransferBT::CDownloadTransferBT(), CDownloadWithTorrent::CheckTorrentRatio(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByBTH(), GenerateLocalName(), CDownloads::GetActiveTorrentCount(), CDownloadsCtrl::GetDownloadStatus(), CDownloads::GetSeedCount(), CDownloads::GetTryingCount(), CDownload::IsShared(), CDownloadTipCtrl::OnCalcSize(), CDownloadsWnd::OnDownloadsHelp(), CDownloadEditDlg::OnLButtonUp(), CDownloadTipCtrl::OnPaint(), CDownload::OnRun(), CDownloadsCtrl::PaintDownload(), CDownloadWithSearch::PrepareSearch(), CDownload::Resume(), CDownloadWithTorrent::Serialize(), CDownloadWithTiger::Serialize(), CDownloadWithTorrent::SetTorrent(), CDownloadWithTransfers::StartNewTransfer(), CDownloadWithTransfers::StartTransfersIfNeeded(), CDownload::StopTrying(), and CDownloadWithFile::SubmitData().

BOOL CDownloadBase::m_bBTHTrusted
 

Definition at line 59 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), CDownloadTipCtrl::OnPaint(), and CDownloadWithTorrent::Serialize().

BOOL CDownloadBase::m_bED2K
 

Definition at line 54 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CQueryHashMaster::Build(), CDownloadWithSearch::CanSearch(), CDownloadBase(), CDownloadTransferED2K::CDownloadTransferED2K(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByED2K(), GenerateLocalName(), CEDPartImporter::ImportFile(), CDownloadTransferED2K::Initiate(), CDownloadsWnd::OnDownloadsCopy(), CDownloadEditDlg::OnInitDialog(), CDownload::OnMoved(), CDownloadsWnd::Prepare(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CDownloadWithTiger::Serialize(), Serialize(), CDownloadWithTiger::SetHashset(), and CQuerySearch::WriteHashesToEDPacket().

BOOL CDownloadBase::m_bED2KTrusted
 

Definition at line 56 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), CDownloadTipCtrl::OnPaint(), and Serialize().

BOOL CDownloadBase::m_bMD5
 

Definition at line 51 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), and Serialize().

BOOL CDownloadBase::m_bMD5Trusted
 

Definition at line 53 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), and Serialize().

BOOL CDownloadBase::m_bSHA1
 

Definition at line 45 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadWithSources::AddSourceURL(), CDownloadWithSources::AddSourceURLs(), CQueryHashMaster::Build(), CDownloadWithSearch::CanSearch(), CDownloadBase(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindBySHA1(), GenerateLocalName(), CDownloadWithFile::GetDisplayName(), CDownloadsWnd::OnDownloadsCopy(), CDownloadEditDlg::OnInitDialog(), CDownload::OnMoved(), CDownloadsWnd::Prepare(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), CDownloadWithTiger::Serialize(), Serialize(), and CDownload::SerializeOld().

BOOL CDownloadBase::m_bSHA1Trusted
 

Definition at line 47 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), CDownloadTipCtrl::OnPaint(), and Serialize().

BOOL CDownloadBase::m_bTiger
 

Definition at line 48 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadWithSearch::CanSearch(), CDownloadBase(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByTiger(), GenerateLocalName(), CDownloadsWnd::OnDownloadsCopy(), CDownloadEditDlg::OnInitDialog(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), CDownloadWithTiger::Serialize(), Serialize(), and CDownloadWithTiger::SetTigerTree().

BOOL CDownloadBase::m_bTigerTrusted
 

Definition at line 50 of file DownloadBase.h.

Referenced by CDownloads::Add(), CDownloadBase(), CDownloadTipCtrl::OnPaint(), and Serialize().

int CDownloadBase::m_nCookie
 

Definition at line 39 of file DownloadBase.h.

Referenced by CDownloadBase(), CDownload::Load(), CDownload::OnRun(), CDownloads::Save(), CDownload::Save(), and SetModified().

QWORD CDownloadBase::m_nSize
 

Definition at line 43 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadsCtrl::BubbleSortDownloads(), CDownloadBase(), CDownloadSource::CDownloadSource(), CDownloadTransferBT::CDownloadTransferBT(), CDownloadWithFile::ClipUploadRange(), CFragmentBar::DrawDownload(), CFragmentBar::DrawDownloadSimple(), CFragmentBar::DrawSource(), CFragmentBar::DrawSourceImpl(), CDownloads::FindByED2K(), CDownloadWithTiger::FindNewValidationBlock(), CDownloadWithTiger::FinishValidation(), CDownloadWithTiger::GetNextVerifyRange(), CDownloadWithFile::GetProgress(), CDownloadWithFile::GetVolumeComplete(), CDownloadWithFile::GetVolumeRemaining(), CDownloadSource::HasUsefulRanges(), CEDPartImporter::ImportFile(), CDownloadTransferED2K::Initiate(), CDownloadWithTiger::NeedHashset(), CDownloadWithTiger::NeedTigerTree(), CDownloadTransferBT::OnBitfield(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsHelp(), CDownloadTransferED2K::OnFileReqAnswer(), CDownloadTransferED2K::OnFileStatus(), CDownloadTransferED2K::OnHashsetAnswer(), CDownloadTransferBT::OnHave(), CDownloadTransferHTTP::OnHeaderLine(), CDownloadTransferFTP::OnHeaderLine(), CDownloadTransferHTTP::OnHeadersComplete(), CDownloadTipCtrl::OnPaint(), CDownloadMonitorDlg::OnTimer(), CDownloadWithFile::OpenFile(), CDownloadsCtrl::PaintSource(), CDownloadWithSearch::PrepareSearch(), CDownloadTransferHTTP::ReadTiger(), CUploadTransfer::RequestPartial(), CUploadQueues::SelectQueue(), CDownloadTransferED2K::SendPrimaryRequest(), CDownloadTransferHTTP::SendRequest(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CDownloadWithTiger::Serialize(), Serialize(), CDownload::SerializeOld(), CDownloadWithTiger::SetHashset(), CDownloadWithTiger::SetTigerTree(), CDownloadTransferHTTP::StartNextFragment(), CDownloadTransferFTP::StartNextFragment(), CDownloadWithTiger::SubtractHelper(), CHomeDownloadsBox::Update(), CQuerySearch::WriteHashesToEDPacket(), and CEDClient::WritePartStatus().

SHA1 CDownloadBase::m_pBTH
 

Definition at line 58 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CQueryHashMaster::Build(), CDownloadSource::CDownloadSource(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByBTH(), GenerateLocalName(), CBTClient::OnHandshake1(), CDownloadWithSearch::PrepareSearch(), CBTClient::SendHandshake(), CDownloadWithTorrent::Serialize(), and CDownloadWithTorrent::SetTorrent().

MD4 CDownloadBase::m_pED2K
 

Definition at line 55 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CQueryHashMaster::Build(), CDownloadSource::CDownloadSource(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByED2K(), GenerateLocalName(), CEDPartImporter::ImportFile(), CDownloadTransferED2K::OnCompressedPart(), CDownloadsWnd::OnDownloadsCopy(), CDownloadTransferED2K::OnFileStatus(), CDownloadTransferED2K::OnHashsetAnswer(), CDownloadEditDlg::OnInitDialog(), CDownload::OnMoved(), CDownloadTransferED2K::OnSendingPart(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), CDownloadTransferED2K::RunQueued(), CDownloadTransferED2K::SendFragmentRequests(), CDownloadTransferED2K::SendPrimaryRequest(), CDownloadTransferED2K::SendSecondaryRequest(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), Serialize(), CDownloadWithTiger::SetHashset(), and CQuerySearch::WriteHashesToEDPacket().

MD5 CDownloadBase::m_pMD5
 

Definition at line 52 of file DownloadBase.h.

Referenced by CDownloads::Add(), and Serialize().

SHA1 CDownloadBase::m_pSHA1
 

Definition at line 46 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadWithSources::AddSourceURL(), CDownloadWithSources::AddSourceURLs(), CQueryHashMaster::Build(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindBySHA1(), GenerateLocalName(), CDownloadWithFile::GetDisplayName(), CDownloadsWnd::OnDownloadsCopy(), CDownloadEditDlg::OnInitDialog(), CDownload::OnMoved(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), CDownloadTransferHTTP::SendRequest(), Serialize(), and CDownload::SerializeOld().

CDownloadTask* CDownloadBase::m_pTask [protected]
 

Definition at line 61 of file DownloadBase.h.

Referenced by CDownloadBase(), IsTasking(), CDownload::OnDownloaded(), CDownload::OnRun(), CDownload::OnTaskComplete(), CDownload::Remove(), CDownloadWithTorrent::RunTorrent(), CDownload::~CDownload(), and CDownloadTask::~CDownloadTask().

TIGEROOT CDownloadBase::m_pTiger
 

Definition at line 49 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadSource::CheckHash(), CDownloadEditDlg::Commit(), CLocalSearch::ExecutePartialFiles(), CDownloads::FindByTiger(), GenerateLocalName(), CDownloadsWnd::OnDownloadsCopy(), CDownloadEditDlg::OnInitDialog(), CDownloadWithSearch::PrepareSearch(), CUploadTransfer::RequestPartial(), Serialize(), and CDownloadWithTiger::SetTigerTree().

CString CDownloadBase::m_sLocalName
 

Definition at line 42 of file DownloadBase.h.

Referenced by CDownloadWithFile::AppendMetadata(), CDownloadWithExtras::CanPreview(), CDownloadWithTiger::ContinueValidation(), CDownloadWithFile::DeleteFile(), CHomeDownloadsBox::ExecuteDownload(), GenerateLocalName(), CEDPartImporter::ImportFile(), CDownload::Load(), CDownloadWithFile::MakeComplete(), CDownloadMonitorDlg::OnDownloadLaunch(), CDownloadsWnd::OnDownloadsEnqueue(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadsWnd::OnDownloadsLaunch(), CDownloadsWnd::OnDownloadsLaunchCopy(), CDownloadsWnd::OnDownloadsRate(), CDownload::OnMoved(), CDownload::OnVerify(), CDownloadWithFile::OpenFile(), CDownload::Remove(), CUploadTransfer::RequestPartial(), CDownloadWithTorrent::RunTorrent(), CDownloadWithTiger::RunValidation(), CDownload::Save(), CDownloadWithTorrent::SeedTorrent(), CDownloadTransferED2K::SendFragmentRequests(), CDownloadTransferBT::SendRequests(), CDownloadWithFile::Serialize(), CDownload::SerializeOld(), CFilePreviewDlg::SetDownload(), CDownloadWithFile::WriteMetadata(), and CDownload::~CDownload().

CString CDownloadBase::m_sRemoteName
 

Definition at line 41 of file DownloadBase.h.

Referenced by CDownloads::Add(), CLocalSearch::AddHit(), CDownloadWithSources::AddSourceHit(), CDownloadWithSources::AddSourceURL(), CDownloadWithExtras::CanPreview(), CDownloadEditDlg::Commit(), GenerateLocalName(), CDownloadWithFile::GetDisplayName(), CEDPartImporter::ImportFile(), CDownloadsWnd::OnDownloadsClear(), CDownloadsWnd::OnDownloadsClearIncomplete(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadMonitorDlg::OnDownloadStop(), CDownloadReviewDlg::OnInitDialog(), CDownloadMonitorDlg::OnInitDialog(), CDownloadEditDlg::OnInitDialog(), CDownloadMonitorDlg::OnTimer(), CDownloadWithFile::OpenFile(), CDownloadWithSearch::PrepareSearch(), CDownloadSource::PushRequest(), CDownloadWithSources::RemoveOverlappingSources(), CDownload::Rename(), CUploadTransfer::RequestPartial(), CUploadQueues::SelectQueue(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), Serialize(), CDownload::SerializeOld(), and CFilePreviewDlg::SetDownload().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:05 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2