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

CDownloads Class Reference

#include <Downloads.h>

List of all members.

Public Types

enum  { dlPathNull, dlPathComplete, dlPathIncomplete }

Public Member Functions

 CDownloads ()
virtual ~CDownloads ()
CDownloadAdd ()
CDownloadAdd (CQueryHit *pHit, BOOL bAddToHead=FALSE)
CDownloadAdd (CMatchFile *pFile, BOOL bAddToHead=FALSE)
CDownloadAdd (CShareazaURL *pURL)
void PauseAll ()
void ClearCompleted ()
void ClearPaused ()
void Clear (BOOL bClosing=FALSE)
void CloseTransfers ()
int GetSeedCount () const
int GetActiveTorrentCount () const
int GetCount (BOOL bActiveOnly=FALSE) const
int GetTransferCount () const
int GetTryingCount (BOOL bTorrentsOnly=FALSE) const
int GetConnectingTransferCount () const
BOOL Check (CDownloadSource *pSource) const
BOOL CheckActive (CDownload *pDownload, int nScope) const
BOOL Move (CDownload *pDownload, int nDelta)
BOOL Reorder (CDownload *pDownload, CDownload *pBefore)
BOOL Swap (CDownload *p1, CDownload *p2)
CDownloadFindByURN (LPCTSTR pszURN, BOOL bSharedOnly=FALSE) const
CDownloadFindBySHA1 (const SHA1 *pHash, BOOL bSharedOnly=FALSE) const
CDownloadFindByTiger (const TIGEROOT *pHash, BOOL bSharedOnly=FALSE) const
CDownloadFindByED2K (const MD4 *pED2K, BOOL bSharedOnly=FALSE) const
CDownloadFindByBTH (const SHA1 *pHash, BOOL bSharedOnly=FALSE) const
CDownloadFindBySID (DWORD nSerID) const
DWORD GetFreeSID ()
QWORD GetAmountDownloadedFrom (IN_ADDR *pAddress)
DWORD GetBandwidth () const
void Load ()
void Save (BOOL bForce=TRUE)
void OnRun ()
BOOL OnPush (GGUID *pGUID, CConnection *pConnection)
BOOL OnDonkeyCallback (CEDClient *pClient, CDownloadSource *pExcept=NULL)
void OnQueryHits (CQueryHit *pHits)
void OnVerify (LPCTSTR pszPath, BOOL bVerified)
void SetPerHostLimit (IN_ADDR *pAddress, int nLimit)
BOOL IsSpaceAvailable (QWORD nVolume, int nPath=dlPathNull)
POSITION GetIterator () const
POSITION GetReverseIterator () const
CDownloadGetNext (POSITION &pos) const
CDownloadGetPrevious (POSITION &pos) const
BOOL Check (CDownload *pDownload) const

Public Attributes

DWORD m_nLimitGeneric
DWORD m_nLimitDonkey
DWORD m_nTransfers
DWORD m_nBandwidth
DWORD m_nValidation
BOOL m_bAllowMoreDownloads
BOOL m_bAllowMoreTransfers
BOOL m_bClosing
DWORD m_tLastConnect

Protected Member Functions

void UpdateAllows (BOOL bNew)
BOOL AllowMoreDownloads () const
BOOL AllowMoreTransfers (IN_ADDR *pAdress=NULL) const
void Remove (CDownload *pDownload)
void LoadFromCompoundFiles ()
BOOL LoadFromCompoundFile (LPCTSTR pszFile)
BOOL LoadFromTimePair ()
void SerializeCompound (CArchive &ar)
void PurgeDeletes ()
void PurgePreviews ()

Protected Attributes

CPtrList m_pList
CMapPtrToPtr m_pHostLimits
int m_nRunCookie

Friends

class CDownload
class CDownloadBase
class CDownloadWithTransfers
class CDownloadSource


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dlPathNull 
dlPathComplete 
dlPathIncomplete 

Definition at line 60 of file Downloads.h.


Constructor & Destructor Documentation

CDownloads::CDownloads  ) 
 

Definition at line 59 of file Downloads.cpp.

References CSettings::Bandwidth, CSettings::sBandwidth::Downloads, m_bClosing, m_nBandwidth, m_nLimitDonkey, m_nLimitGeneric, m_nRunCookie, m_nTransfers, m_tLastConnect, and Settings.

CDownloads::~CDownloads  )  [virtual]
 

Definition at line 70 of file Downloads.cpp.


Member Function Documentation

CDownload * CDownloads::Add CShareazaURL pURL  ) 
 

Definition at line 218 of file Downloads.cpp.

References CDownloadWithSources::AddSourceURLs(), CSettings::BitTorrent, CDownload, DownloadGroups, CSettings::Downloads, CSettings::sBitTorrent::DownloadTorrents, FindByBTH(), FindByED2K(), FindBySHA1(), FindByTiger(), CDownloadWithFile::GetDisplayName(), GetTryingCount(), IDS_DOWNLOAD_ADDED, IDS_DOWNLOAD_ALREADY, CDownloadGroups::Link(), CDownloadBase::m_bBTH, CShareazaURL::m_bBTH, CDownloadBase::m_bBTHTrusted, CDownloadBase::m_bED2K, CShareazaURL::m_bED2K, CDownloadBase::m_bED2KTrusted, CDownloadBase::m_bMD5, CShareazaURL::m_bMD5, CDownloadBase::m_bMD5Trusted, CDownloadBase::m_bSHA1, CShareazaURL::m_bSHA1, CDownloadBase::m_bSHA1Trusted, CShareazaURL::m_bSize, CDownloadBase::m_bTiger, CShareazaURL::m_bTiger, CDownloadBase::m_bTigerTrusted, CShareazaURL::m_nAction, CShareazaURL::m_nSize, CDownloadBase::m_nSize, CDownloadBase::m_pBTH, CShareazaURL::m_pBTH, CDownloadBase::m_pED2K, CShareazaURL::m_pED2K, m_pList, CShareazaURL::m_pMD5, CDownloadBase::m_pMD5, CTransfers::m_pSection, CDownloadBase::m_pSHA1, CShareazaURL::m_pSHA1, CDownloadBase::m_pTiger, CShareazaURL::m_pTiger, CShareazaURL::m_pTorrent, CShareazaURL::m_sName, CDownloadBase::m_sRemoteName, CShareazaURL::m_sURL, CSettings::sDownloads::MaxFiles, CShareazaApp::Message(), MSG_DOWNLOAD, NULL, Settings, CDownloadWithTorrent::SetTorrent(), CDownload::Share(), CTransfers::StartThread(), theApp, Transfers, CShareazaURL::uriDownload, and CShareazaURL::uriSource.

CDownload * CDownloads::Add CMatchFile pFile,
BOOL  bAddToHead = FALSE
 

Definition at line 137 of file Downloads.cpp.

References CDownloadWithExtras::AddReview(), CDownloadWithSources::AddSourceHit(), CDownload, DownloadGroups, CSettings::Downloads, FindByED2K(), FindBySHA1(), FindByTiger(), GetTryingCount(), IDS_DOWNLOAD_ADDED, IDS_DOWNLOAD_ALREADY, CDownloadGroups::Link(), CMatchFile::m_bDownload, CMatchFile::m_bED2K, CMatchFile::m_bSHA1, CMatchFile::m_bTiger, CMatchFile::m_pBest, CMatchFile::m_pED2K, CMatchFile::m_pHits, m_pList, CQueryHit::m_pNext, CTransfers::m_pSection, CMatchFile::m_pSHA1, CMatchFile::m_pTiger, CQueryHit::m_sName, CSettings::sDownloads::MaxFiles, CShareazaApp::Message(), MSG_DOWNLOAD, NULL, CDownload::Resume(), Settings, CTransfers::StartThread(), theApp, and Transfers.

CDownload * CDownloads::Add CQueryHit pHit,
BOOL  bAddToHead = FALSE
 

Definition at line 87 of file Downloads.cpp.

References CDownloadWithSources::AddSourceHit(), CDownload, DownloadGroups, CSettings::Downloads, FindByED2K(), FindBySHA1(), FindByTiger(), GetTryingCount(), IDS_DOWNLOAD_ADDED, IDS_DOWNLOAD_ALREADY, CDownloadGroups::Link(), m_pList, CTransfers::m_pSection, CSettings::sDownloads::MaxFiles, CShareazaApp::Message(), MSG_DOWNLOAD, NULL, CDownload::Resume(), Settings, CTransfers::StartThread(), theApp, and Transfers.

CDownload * CDownloads::Add  ) 
 

Definition at line 77 of file Downloads.cpp.

References CDownload, and m_pList.

Referenced by CTorrentSeedDlg::CreateDownload(), CCollectionFile::File::Download(), CEDPartImporter::ImportFile(), CTorrentSeedDlg::OnDownload(), CUpgradeDlg::OnOK(), CBaseMatchWnd::OnSearchDownload(), CBaseMatchWnd::OnSearchDownloadNow(), CMainWnd::OnToolsDownload(), CURLActionDlg::OnUrlDownload(), CRemote::PageNewDownload(), and CRemote::PageSearch().

BOOL CDownloads::AllowMoreDownloads  )  const [protected]
 

Definition at line 770 of file Downloads.cpp.

References CSettings::Downloads, GetIterator(), GetNext(), GetTransferCount(), CSettings::sDownloads::MaxFiles, and Settings.

BOOL CDownloads::AllowMoreTransfers IN_ADDR *  pAdress = NULL  )  const [protected]
 

Definition at line 782 of file Downloads.cpp.

References CSettings::Downloads, dtsCountAll, GetIterator(), GetNext(), m_pHostLimits, CSettings::sDownloads::MaxTransfers, NULL, and Settings.

Referenced by CDownloadSource::CanInitiate().

BOOL CDownloads::Check CDownload pDownload  )  const [inline]
 

Definition at line 141 of file Downloads.h.

References m_pList, and NULL.

BOOL CDownloads::Check CDownloadSource pSource  )  const
 

Definition at line 497 of file Downloads.cpp.

References GetIterator(), and GetNext().

Referenced by CDownloadEditDlg::Commit(), CDownloadMonitorDlg::DrawProgressBar(), CDownloadTabBar::DropObjects(), CDownloadsCtrl::DropObjects(), CHomeDownloadsBox::ExecuteDownload(), CDownloadTipCtrl::OnCalcSize(), CFilePreviewDlg::OnDestroy(), CDownloadMonitorDlg::OnDestroy(), CTorrentSeedDlg::OnDownload(), CDownloadTabBar::OnDownloadGroupClear(), CDownloadTabBar::OnDownloadGroupPause(), CDownloadTabBar::OnDownloadGroupResume(), CDownloadMonitorDlg::OnDownloadLaunch(), CDownloadsWnd::OnDownloadsClear(), CDownloadsWnd::OnDownloadsClearIncomplete(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsEnqueue(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadsWnd::OnDownloadsLaunch(), CDownloadsWnd::OnDownloadsLaunchCopy(), CDownloadsWnd::OnDownloadsMonitor(), CDownloadMonitorDlg::OnDownloadStop(), CDownloadsWnd::OnDownloadsTorrentInfo(), CDownloadsWnd::OnDownloadsUrl(), CDownloadEditDlg::OnErase(), CDownloadMonitorDlg::OnInitDialog(), CDownloadEditDlg::OnInitDialog(), CDownloadEditDlg::OnLButtonUp(), CDownloadTipCtrl::OnPaint(), CDownloadMonitorDlg::OnTimer(), CDownloadTipCtrl::OnTimer(), CDownloadEditDlg::OnTorrentInfo(), CURLActionDlg::OnUrlDownload(), CBTTrackerRequest::Process(), and CDownloadTask::~CDownloadTask().

BOOL CDownloads::CheckActive CDownload pDownload,
int  nScope
const
 

Definition at line 506 of file Downloads.cpp.

References GetPrevious(), GetReverseIterator(), CDownload::IsCompleted(), and CDownload::IsPaused().

Referenced by CHomeDownloadsBox::Update().

void CDownloads::Clear BOOL  bClosing = FALSE  ) 
 

Definition at line 358 of file Downloads.cpp.

References GetIterator(), GetNext(), m_bClosing, m_pList, CTransfers::m_pSection, Remove(), and Transfers.

Referenced by CShareazaApp::ExitInstance(), LoadFromCompoundFile(), and LoadFromTimePair().

void CDownloads::ClearCompleted  ) 
 

Definition at line 336 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsCompleted(), CDownloadWithTorrent::IsSeeding(), CTransfers::m_pSection, CDownload::Remove(), and Transfers.

Referenced by CDownloadsWnd::OnDownloadsClearCompleted().

void CDownloads::ClearPaused  ) 
 

Definition at line 347 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsPaused(), CTransfers::m_pSection, CDownload::Remove(), and Transfers.

Referenced by CDownloadsWnd::OnDownloadsClearPaused().

void CDownloads::CloseTransfers  ) 
 

Definition at line 372 of file Downloads.cpp.

References GetIterator(), GetNext(), m_bClosing, m_nBandwidth, m_nTransfers, CTransfers::m_pSection, and Transfers.

Referenced by CShareazaApp::ExitInstance().

CDownload * CDownloads::FindByBTH const SHA1 pHash,
BOOL  bSharedOnly = FALSE
const
 

Definition at line 591 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsShared(), CDownloadBase::m_bBTH, CDownloadBase::m_pBTH, and NULL.

Referenced by Add(), CTorrentSeedDlg::CreateDownload(), CBTClient::OnHandshake1(), CTorrentSeedDlg::OnSeed(), and CHomeTorrentsBox::Update().

CDownload * CDownloads::FindByED2K const MD4 pED2K,
BOOL  bSharedOnly = FALSE
const
 

Definition at line 575 of file Downloads.cpp.

References ED2K_PART_SIZE, GetIterator(), GetNext(), CDownload::IsCompleted(), CDownload::IsShared(), CDownload::IsStarted(), CDownloadBase::m_bED2K, CDownloadBase::m_nSize, CDownloadBase::m_pED2K, and NULL.

Referenced by CMatchFile::Add(), Add(), FindByURN(), CEDPartImporter::ImportFile(), CCollectionFile::File::IsDownloading(), CEDClient::OnFileRequest(), CEDClient::OnFileStatusRequest(), CEDClient::OnHashsetRequest(), CEDClient::OnSourceAnswer(), CEDClient::OnSourceRequest(), and CUploadTransferED2K::Request().

CDownload * CDownloads::FindBySHA1 const SHA1 pHash,
BOOL  bSharedOnly = FALSE
const
 

Definition at line 545 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsShared(), CDownload::IsStarted(), CDownloadBase::m_bSHA1, CDownloadBase::m_pSHA1, and NULL.

Referenced by CMatchFile::Add(), Add(), FindByURN(), and CCollectionFile::File::IsDownloading().

CDownload * CDownloads::FindBySID DWORD  nSerID  )  const
 

Definition at line 610 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::m_nSerID, and NULL.

Referenced by CDownloadGroups::Serialize(), and CDownloadGroup::Serialize().

CDownload * CDownloads::FindByTiger const TIGEROOT pHash,
BOOL  bSharedOnly = FALSE
const
 

Definition at line 560 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsShared(), CDownload::IsStarted(), CDownloadBase::m_bTiger, CDownloadBase::m_pTiger, and NULL.

Referenced by CMatchFile::Add(), Add(), FindByURN(), and CCollectionFile::File::IsDownloading().

CDownload * CDownloads::FindByURN LPCTSTR  pszURN,
BOOL  bSharedOnly = FALSE
const
 

Definition at line 520 of file Downloads.cpp.

References FindByED2K(), FindBySHA1(), FindByTiger(), CED2K::HashFromURN(), CTigerNode::HashFromURN(), CSHA::HashFromURN(), NULL, and pTiger.

Referenced by CUploadTransferHTTP::OnHeadersComplete().

int CDownloads::GetActiveTorrentCount  )  const
 

Definition at line 408 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsCompleted(), CDownload::IsDownloading(), CDownload::IsMoving(), CDownload::IsPaused(), CDownloadWithTorrent::IsSeeding(), and CDownloadBase::m_bBTH.

QWORD CDownloads::GetAmountDownloadedFrom IN_ADDR *  pAddress  ) 
 

Definition at line 716 of file Downloads.cpp.

References CDownloadWithTransfers::GetAmountDownloadedFrom(), GetIterator(), GetNext(), and NULL.

Referenced by CUploadTransfer::CalculateRating().

DWORD CDownloads::GetBandwidth  )  const
 

Definition at line 734 of file Downloads.cpp.

References GetIterator(), and GetNext().

int CDownloads::GetConnectingTransferCount  )  const
 

Definition at line 473 of file Downloads.cpp.

References dtsConnecting, GetIterator(), GetNext(), and CDownloadWithTransfers::GetTransferCount().

Referenced by CDownloadWithTransfers::CanStartTransfers().

int CDownloads::GetCount BOOL  bActiveOnly = FALSE  )  const
 

Definition at line 425 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownloadWithSources::GetSourceCount(), CDownload::IsMoving(), CDownload::IsPaused(), and m_pList.

Referenced by CDownloadsCtrl::BubbleSortDownloads(), CTransfers::GetActiveCount(), CGraphItem::GetValue(), CTransfers::OnCheckExit(), CDownloadGroups::Serialize(), and CTransfers::StartThread().

DWORD CDownloads::GetFreeSID  ) 
 

Definition at line 621 of file Downloads.cpp.

References GetIterator(), GetNext(), and CDownload::m_nSerID.

Referenced by CDownload::CDownload().

POSITION CDownloads::GetIterator  )  const [inline]
 

Definition at line 121 of file Downloads.h.

References m_pList.

Referenced by AllowMoreDownloads(), AllowMoreTransfers(), CDownloadsCtrl::BubbleSortDownloads(), CQueryHashMaster::Build(), Check(), Clear(), ClearCompleted(), ClearPaused(), CloseTransfers(), CDownloadsCtrl::DeselectAll(), CLocalSearch::ExecutePartialFiles(), FindByBTH(), FindByED2K(), FindBySHA1(), FindBySID(), FindByTiger(), GetActiveTorrentCount(), GetAmountDownloadedFrom(), CDownloadsCtrl::GetAt(), GetBandwidth(), GetConnectingTransferCount(), GetCount(), GetFreeSID(), CDownloadsCtrl::GetRect(), GetSeedCount(), CDownloadsCtrl::GetSelectedCount(), GetTransferCount(), GetTryingCount(), CDownloadsCtrl::HitTest(), CDownloadGroup::LinkAll(), CDownloadsCtrl::MoveSelected(), CDownloadsCtrl::OnBeginDrag(), CDownloadsWnd::OnBrowseLaunch(), OnDonkeyCallback(), CDownloadsWnd::OnDownloadsBoost(), CDownloadsWnd::OnDownloadsClear(), CDownloadsWnd::OnDownloadsClearComplete(), CDownloadsWnd::OnDownloadsClearIncomplete(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsEdit(), CDownloadsWnd::OnDownloadsEnqueue(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadsWnd::OnDownloadsHelp(), CDownloadsWnd::OnDownloadsLaunch(), CDownloadsWnd::OnDownloadsLaunchCopy(), CDownloadsWnd::OnDownloadsMonitor(), CDownloadsWnd::OnDownloadsPause(), CDownloadsWnd::OnDownloadsRate(), CDownloadsWnd::OnDownloadsResume(), CDownloadsWnd::OnDownloadsShare(), CDownloadsWnd::OnDownloadsSources(), CDownloadsWnd::OnDownloadsTorrentInfo(), CDownloadsWnd::OnDownloadsUrl(), CDownloadsWnd::OnDownloadsViewReviews(), CDownloadsCtrl::OnPaint(), OnPush(), OnQueryHits(), OnRun(), CDownloadsCtrl::OnSize(), CDownloadsWnd::OnTimer(), CDownloadsWnd::OnTransfersChat(), CDownloadsWnd::OnTransfersConnect(), CDownloadsWnd::OnTransfersDisconnect(), CDownloadsWnd::OnTransfersForget(), OnVerify(), CRemote::PageDownloads(), PauseAll(), CDownloadsWnd::Prepare(), Save(), CDownloadsWnd::Select(), CDownloadsCtrl::SelectAll(), CEDNeighbour::SendSharedFiles(), CDownloadGroups::Serialize(), UpdateAllows(), and CQuerySearch::WriteHashesToEDPacket().

CDownload* CDownloads::GetNext POSITION &  pos  )  const [inline]
 

Definition at line 131 of file Downloads.h.

References m_pList.

Referenced by AllowMoreDownloads(), AllowMoreTransfers(), CDownloadsCtrl::BubbleSortDownloads(), CQueryHashMaster::Build(), Check(), Clear(), ClearCompleted(), ClearPaused(), CloseTransfers(), CDownloadsCtrl::DeselectAll(), CLocalSearch::ExecutePartialFiles(), FindByBTH(), FindByED2K(), FindBySHA1(), FindBySID(), FindByTiger(), GetActiveTorrentCount(), GetAmountDownloadedFrom(), CDownloadsCtrl::GetAt(), GetBandwidth(), GetConnectingTransferCount(), GetCount(), GetFreeSID(), CDownloadsCtrl::GetRect(), GetSeedCount(), CDownloadsCtrl::GetSelectedCount(), GetTransferCount(), GetTryingCount(), CDownloadsCtrl::HitTest(), CDownloadGroup::LinkAll(), CDownloadsCtrl::MoveSelected(), CDownloadsCtrl::OnBeginDrag(), CDownloadsWnd::OnBrowseLaunch(), OnDonkeyCallback(), CDownloadsWnd::OnDownloadsBoost(), CDownloadsWnd::OnDownloadsClear(), CDownloadsWnd::OnDownloadsClearComplete(), CDownloadsWnd::OnDownloadsClearIncomplete(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsEdit(), CDownloadsWnd::OnDownloadsEnqueue(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadsWnd::OnDownloadsHelp(), CDownloadsWnd::OnDownloadsLaunch(), CDownloadsWnd::OnDownloadsLaunchCopy(), CDownloadsWnd::OnDownloadsMonitor(), CDownloadsWnd::OnDownloadsPause(), CDownloadsWnd::OnDownloadsRate(), CDownloadsWnd::OnDownloadsResume(), CDownloadsWnd::OnDownloadsShare(), CDownloadsWnd::OnDownloadsSources(), CDownloadsWnd::OnDownloadsTorrentInfo(), CDownloadsWnd::OnDownloadsUrl(), CDownloadsWnd::OnDownloadsViewReviews(), CDownloadsCtrl::OnPaint(), OnPush(), OnQueryHits(), OnRun(), CDownloadsCtrl::OnSize(), CDownloadsWnd::OnTimer(), CDownloadsWnd::OnTransfersChat(), CDownloadsWnd::OnTransfersConnect(), CDownloadsWnd::OnTransfersDisconnect(), CDownloadsWnd::OnTransfersForget(), OnVerify(), CRemote::PageDownloads(), PauseAll(), CDownloadsWnd::Prepare(), Save(), CDownloadsWnd::Select(), CDownloadsCtrl::SelectAll(), CEDNeighbour::SendSharedFiles(), CDownloadGroups::Serialize(), UpdateAllows(), and CQuerySearch::WriteHashesToEDPacket().

CDownload* CDownloads::GetPrevious POSITION &  pos  )  const [inline]
 

Definition at line 136 of file Downloads.h.

References m_pList.

Referenced by CDownloadsCtrl::BubbleSortDownloads(), CheckActive(), and CHomeDownloadsBox::Update().

POSITION CDownloads::GetReverseIterator  )  const [inline]
 

Definition at line 126 of file Downloads.h.

References m_pList.

Referenced by CheckActive(), and CHomeDownloadsBox::Update().

int CDownloads::GetSeedCount  )  const
 

Definition at line 391 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsCompleted(), CDownloadWithTiger::IsFullyVerified(), CDownloadWithTorrent::IsSeeding(), and CDownloadBase::m_bBTH.

Referenced by CHomeTorrentsBox::Update().

int CDownloads::GetTransferCount  )  const
 

Definition at line 443 of file Downloads.cpp.

References GetIterator(), and GetNext().

Referenced by AllowMoreDownloads().

int CDownloads::GetTryingCount BOOL  bTorrentsOnly = FALSE  )  const
 

Definition at line 455 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsCompleted(), CDownload::IsPaused(), CDownload::IsTrying(), and CDownloadBase::m_bBTH.

Referenced by Add(), CDownload::OnRun(), and CDownload::Resume().

BOOL CDownloads::IsSpaceAvailable QWORD  nVolume,
int  nPath = dlPathNull
 

Definition at line 811 of file Downloads.cpp.

References CSettings::sDownloads::CompletePath, dlPathComplete, dlPathIncomplete, CSettings::Downloads, CSettings::sDownloads::IncompletePath, NULL, and Settings.

Referenced by CEDPartImporter::ImportFile(), CMainWnd::LocalSystemChecks(), CDownloadWithFile::OpenFile(), and CDownloadTask::RunCopyTorrent().

void CDownloads::Load  ) 
 

Definition at line 1048 of file Downloads.cpp.

References CDownload, CDownloadWithSources::ClearSources(), CDownloadGroups::CreateDefault(), DownloadGroups, CSettings::Downloads, CSettings::sDownloads::IncompletePath, CDownloadGroups::Load(), CDownload::Load(), LoadFromCompoundFiles(), m_pList, CTransfers::m_pSection, CShareazaApp::Message(), MSG_ERROR, PurgeDeletes(), PurgePreviews(), Save(), Settings, CTransfers::StartThread(), theApp, and Transfers.

Referenced by CShareazaApp::InitInstance().

BOOL CDownloads::LoadFromCompoundFile LPCTSTR  pszFile  )  [protected]
 

Definition at line 1129 of file Downloads.cpp.

References Clear(), and SerializeCompound().

Referenced by LoadFromCompoundFiles().

void CDownloads::LoadFromCompoundFiles  )  [protected]
 

Definition at line 1107 of file Downloads.cpp.

References CSettings::Downloads, CSettings::sDownloads::IncompletePath, LoadFromCompoundFile(), LoadFromTimePair(), and Settings.

Referenced by Load().

BOOL CDownloads::LoadFromTimePair  )  [protected]
 

Definition at line 1151 of file Downloads.cpp.

References Clear(), CSettings::Downloads, CSettings::sDownloads::IncompletePath, NULL, SerializeCompound(), and Settings.

Referenced by LoadFromCompoundFiles().

BOOL CDownloads::Move CDownload pDownload,
int  nDelta
 

Definition at line 644 of file Downloads.cpp.

References DownloadGroups, CDownloadGroups::IncBaseCookie(), m_pList, CTransfers::m_pSection, NULL, and Transfers.

Referenced by CDownloadsCtrl::MoveSelected().

BOOL CDownloads::OnDonkeyCallback CEDClient pClient,
CDownloadSource pExcept = NULL
 

Definition at line 1015 of file Downloads.cpp.

References GetIterator(), GetNext(), m_bClosing, CTransfers::m_pSection, CDownloadWithTransfers::OnDonkeyCallback(), and Transfers.

Referenced by CEDClient::SeekNewDownload().

BOOL CDownloads::OnPush GGUID pGUID,
CConnection pConnection
 

Definition at line 998 of file Downloads.cpp.

References GetIterator(), GetNext(), CTransfers::m_pSection, CDownloadWithTransfers::OnAcceptPush(), and Transfers.

Referenced by CHandshake::OnPush().

void CDownloads::OnQueryHits CQueryHit pHits  ) 
 

Definition at line 982 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownload::IsMoving(), CTransfers::m_pSection, CDownloadWithSources::OnQueryHits(), and Transfers.

Referenced by CHostBrowser::OnPacket(), CNetwork::OnQueryHits(), and CEDClients::OnUDP().

void CDownloads::OnRun  ) 
 

Definition at line 870 of file Downloads.cpp.

References CSettings::Bandwidth, DownloadGroups, CSettings::sBandwidth::Downloads, CSettings::Downloads, dtsDownloading, dtsQueued, dtsTorrent, CUploadQueues::GetCurrentDonkeyBandwidth(), CDownloadWithTransfers::GetFirstTransfer(), GetIterator(), CUploadQueues::GetMinimumDonkeyBandwidth(), GetNext(), CUploadQueues::IsDonkeyRatioActive(), m_bAllowMoreDownloads, m_bAllowMoreTransfers, CDownloadTransferBT::m_bChoked, CConnection::m_bConnected, m_nBandwidth, m_nLimitDonkey, m_nLimitGeneric, CDownload::m_nRunCookie, m_nRunCookie, CDownloadTransfer::m_nState, m_nTransfers, m_nValidation, CDownloadTransferED2K::m_pClient, CSettings::sDownloads::MaxFiles, CSettings::sDownloads::MaxTransfers, NULL, CDownload::OnRun(), PROTOCOL_BT, PROTOCOL_ED2K, CDownloadGroups::Save(), Settings, and UploadQueues.

Referenced by CTransfers::OnRun().

void CDownloads::OnVerify LPCTSTR  pszPath,
BOOL  bVerified
 

Definition at line 1034 of file Downloads.cpp.

References GetIterator(), GetNext(), CTransfers::m_pSection, and Transfers.

Referenced by CLibraryFile::OnVerifyDownload().

void CDownloads::PauseAll  ) 
 

Definition at line 326 of file Downloads.cpp.

References GetIterator(), GetNext(), CTransfers::m_pSection, and Transfers.

Referenced by CMainWnd::LocalSystemChecks().

void CDownloads::PurgeDeletes  )  [protected]
 

Definition at line 1232 of file Downloads.cpp.

References NULL.

Referenced by Load().

void CDownloads::PurgePreviews  )  [protected]
 

Definition at line 1262 of file Downloads.cpp.

References CSettings::Downloads, CSettings::sDownloads::IncompletePath, and Settings.

Referenced by Load().

void CDownloads::Remove CDownload pDownload  )  [protected]
 

Definition at line 487 of file Downloads.cpp.

References m_pList, and NULL.

Referenced by Clear(), and CDownload::Remove().

BOOL CDownloads::Reorder CDownload pDownload,
CDownload pBefore
 

Definition at line 688 of file Downloads.cpp.

References DownloadGroups, CDownloadGroups::IncBaseCookie(), m_pList, CTransfers::m_pSection, NULL, and Transfers.

Referenced by CDownloadsCtrl::DropObjects(), and CDownloadGroups::Serialize().

void CDownloads::Save BOOL  bForce = TRUE  ) 
 

Definition at line 1093 of file Downloads.cpp.

References GetIterator(), GetNext(), CDownloadBase::m_nCookie, CDownload::m_nSaveCookie, CTransfers::m_pSection, CDownload::Save(), and Transfers.

Referenced by CShareazaApp::ExitInstance(), Load(), and CEDPartImporter::Run().

void CDownloads::SerializeCompound CArchive &  ar  )  [protected]
 

Definition at line 1213 of file Downloads.cpp.

References CDownload, m_pList, and CDownload::Serialize().

Referenced by LoadFromCompoundFile(), and LoadFromTimePair().

void CDownloads::SetPerHostLimit IN_ADDR *  pAddress,
int  nLimit
 

Definition at line 803 of file Downloads.cpp.

References m_pHostLimits.

Referenced by CDownloadTransferHTTP::OnHeaderLine().

BOOL CDownloads::Swap CDownload p1,
CDownload p2
 

Definition at line 671 of file Downloads.cpp.

References m_pList, CTransfers::m_pSection, NULL, and Transfers.

Referenced by CDownloadsCtrl::BubbleSortDownloads().

void CDownloads::UpdateAllows BOOL  bNew  )  [protected]
 

Definition at line 747 of file Downloads.cpp.

References CSettings::Downloads, GetIterator(), GetNext(), CDownloadWithTransfers::GetTransferCount(), m_bAllowMoreDownloads, m_bAllowMoreTransfers, m_tLastConnect, CSettings::sDownloads::MaxFiles, CSettings::sDownloads::MaxTransfers, and Settings.

Referenced by CDownloadWithTransfers::StartTransfersIfNeeded().


Friends And Related Function Documentation

friend class CDownload [friend]
 

Definition at line 146 of file Downloads.h.

Referenced by Add(), Load(), and SerializeCompound().

friend class CDownloadBase [friend]
 

Definition at line 147 of file Downloads.h.

friend class CDownloadSource [friend]
 

Definition at line 149 of file Downloads.h.

friend class CDownloadWithTransfers [friend]
 

Definition at line 148 of file Downloads.h.


Member Data Documentation

BOOL CDownloads::m_bAllowMoreDownloads
 

Definition at line 51 of file Downloads.h.

Referenced by OnRun(), CDownloadWithTransfers::StartTransfersIfNeeded(), and UpdateAllows().

BOOL CDownloads::m_bAllowMoreTransfers
 

Definition at line 52 of file Downloads.h.

Referenced by OnRun(), CDownloadWithTransfers::StartTransfersIfNeeded(), and UpdateAllows().

BOOL CDownloads::m_bClosing
 

Definition at line 53 of file Downloads.h.

Referenced by CDownloads(), Clear(), CDownloadWithTransfers::CloseTransfers(), CloseTransfers(), and OnDonkeyCallback().

DWORD CDownloads::m_nBandwidth
 

Definition at line 49 of file Downloads.h.

Referenced by CDownloads(), CloseTransfers(), CGraphItem::GetValue(), CTransfers::OnRun(), OnRun(), and CTransfers::StopThread().

DWORD CDownloads::m_nLimitDonkey
 

Definition at line 47 of file Downloads.h.

Referenced by CDownloads(), CDownloadTransferED2K::Initiate(), CEDClient::Merge(), and OnRun().

DWORD CDownloads::m_nLimitGeneric
 

Definition at line 46 of file Downloads.h.

Referenced by CDownloadTransferHTTP::AcceptPush(), CDownloads(), CDownloadTransferHTTP::Initiate(), CDownloadTransferFTP::Initiate(), CDownloadTransferBT::OnConnected(), and OnRun().

int CDownloads::m_nRunCookie [protected]
 

Definition at line 58 of file Downloads.h.

Referenced by CDownloads(), and OnRun().

DWORD CDownloads::m_nTransfers
 

Definition at line 48 of file Downloads.h.

Referenced by CDownloads(), CloseTransfers(), CGraphItem::GetValue(), CTransfers::OnRun(), OnRun(), and CTransfers::StopThread().

DWORD CDownloads::m_nValidation
 

Definition at line 50 of file Downloads.h.

Referenced by OnRun(), and CDownloadWithTiger::RunValidation().

CMapPtrToPtr CDownloads::m_pHostLimits [protected]
 

Definition at line 57 of file Downloads.h.

Referenced by AllowMoreTransfers(), and SetPerHostLimit().

CPtrList CDownloads::m_pList [protected]
 

Definition at line 56 of file Downloads.h.

Referenced by Add(), Check(), Clear(), GetCount(), GetIterator(), GetNext(), GetPrevious(), GetReverseIterator(), Load(), Move(), Remove(), Reorder(), SerializeCompound(), and Swap().

DWORD CDownloads::m_tLastConnect
 

Definition at line 54 of file Downloads.h.

Referenced by CDownloadWithTransfers::CanStartTransfers(), CDownloads(), CNeighboursWithConnect::Maintain(), and UpdateAllows().


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