#include <Downloads.h>
Public Types | |
enum | { dlPathNull, dlPathComplete, dlPathIncomplete } |
Public Member Functions | |
CDownloads () | |
virtual | ~CDownloads () |
CDownload * | Add () |
CDownload * | Add (CQueryHit *pHit, BOOL bAddToHead=FALSE) |
CDownload * | Add (CMatchFile *pFile, BOOL bAddToHead=FALSE) |
CDownload * | Add (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) |
CDownload * | FindByURN (LPCTSTR pszURN, BOOL bSharedOnly=FALSE) const |
CDownload * | FindBySHA1 (const SHA1 *pHash, BOOL bSharedOnly=FALSE) const |
CDownload * | FindByTiger (const TIGEROOT *pHash, BOOL bSharedOnly=FALSE) const |
CDownload * | FindByED2K (const MD4 *pED2K, BOOL bSharedOnly=FALSE) const |
CDownload * | FindByBTH (const SHA1 *pHash, BOOL bSharedOnly=FALSE) const |
CDownload * | FindBySID (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 |
CDownload * | GetNext (POSITION &pos) const |
CDownload * | GetPrevious (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 |
|
Definition at line 60 of file Downloads.h. |
|
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. |
|
Definition at line 70 of file Downloads.cpp. |
|
|
|
|
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(). |
|
Definition at line 770 of file Downloads.cpp. References CSettings::Downloads, GetIterator(), GetNext(), GetTransferCount(), CSettings::sDownloads::MaxFiles, and Settings. |
|
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(). |
|
Definition at line 141 of file Downloads.h. |
|
|
Definition at line 506 of file Downloads.cpp. References GetPrevious(), GetReverseIterator(), CDownload::IsCompleted(), and CDownload::IsPaused(). Referenced by CHomeDownloadsBox::Update(). |
|
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(). |
|
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(). |
|
Definition at line 347 of file Downloads.cpp. References GetIterator(), GetNext(), CDownload::IsPaused(), CTransfers::m_pSection, CDownload::Remove(), and Transfers. Referenced by CDownloadsWnd::OnDownloadsClearPaused(). |
|
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(). |
|
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(). |
|
|
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(). |
|
Definition at line 610 of file Downloads.cpp. References GetIterator(), GetNext(), CDownload::m_nSerID, and NULL. Referenced by CDownloadGroups::Serialize(), and CDownloadGroup::Serialize(). |
|
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(). |
|
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(). |
|
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. |
|
Definition at line 716 of file Downloads.cpp. References CDownloadWithTransfers::GetAmountDownloadedFrom(), GetIterator(), GetNext(), and NULL. Referenced by CUploadTransfer::CalculateRating(). |
|
Definition at line 734 of file Downloads.cpp. References GetIterator(), and GetNext(). |
|
Definition at line 473 of file Downloads.cpp. References dtsConnecting, GetIterator(), GetNext(), and CDownloadWithTransfers::GetTransferCount(). Referenced by CDownloadWithTransfers::CanStartTransfers(). |
|
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(). |
|
Definition at line 621 of file Downloads.cpp. References GetIterator(), GetNext(), and CDownload::m_nSerID. Referenced by CDownload::CDownload(). |
|
|
|
Definition at line 136 of file Downloads.h. References m_pList. Referenced by CDownloadsCtrl::BubbleSortDownloads(), CheckActive(), and CHomeDownloadsBox::Update(). |
|
Definition at line 126 of file Downloads.h. References m_pList. Referenced by CheckActive(), and CHomeDownloadsBox::Update(). |
|
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(). |
|
Definition at line 443 of file Downloads.cpp. References GetIterator(), and GetNext(). Referenced by AllowMoreDownloads(). |
|
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(). |
|
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(). |
|
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(). |
|
Definition at line 1129 of file Downloads.cpp. References Clear(), and SerializeCompound(). Referenced by LoadFromCompoundFiles(). |
|
Definition at line 1107 of file Downloads.cpp. References CSettings::Downloads, CSettings::sDownloads::IncompletePath, LoadFromCompoundFile(), LoadFromTimePair(), and Settings. Referenced by Load(). |
|
Definition at line 1151 of file Downloads.cpp. References Clear(), CSettings::Downloads, CSettings::sDownloads::IncompletePath, NULL, SerializeCompound(), and Settings. Referenced by LoadFromCompoundFiles(). |
|
Definition at line 644 of file Downloads.cpp. References DownloadGroups, CDownloadGroups::IncBaseCookie(), m_pList, CTransfers::m_pSection, NULL, and Transfers. Referenced by CDownloadsCtrl::MoveSelected(). |
|
Definition at line 1015 of file Downloads.cpp. References GetIterator(), GetNext(), m_bClosing, CTransfers::m_pSection, CDownloadWithTransfers::OnDonkeyCallback(), and Transfers. Referenced by CEDClient::SeekNewDownload(). |
|
Definition at line 998 of file Downloads.cpp. References GetIterator(), GetNext(), CTransfers::m_pSection, CDownloadWithTransfers::OnAcceptPush(), and Transfers. Referenced by CHandshake::OnPush(). |
|
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(). |
|
|
Definition at line 1034 of file Downloads.cpp. References GetIterator(), GetNext(), CTransfers::m_pSection, and Transfers. Referenced by CLibraryFile::OnVerifyDownload(). |
|
Definition at line 326 of file Downloads.cpp. References GetIterator(), GetNext(), CTransfers::m_pSection, and Transfers. Referenced by CMainWnd::LocalSystemChecks(). |
|
Definition at line 1232 of file Downloads.cpp. References NULL. Referenced by Load(). |
|
Definition at line 1262 of file Downloads.cpp. References CSettings::Downloads, CSettings::sDownloads::IncompletePath, and Settings. Referenced by Load(). |
|
Definition at line 487 of file Downloads.cpp. Referenced by Clear(), and CDownload::Remove(). |
|
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(). |
|
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(). |
|
Definition at line 1213 of file Downloads.cpp. References CDownload, m_pList, and CDownload::Serialize(). Referenced by LoadFromCompoundFile(), and LoadFromTimePair(). |
|
Definition at line 803 of file Downloads.cpp. References m_pHostLimits. Referenced by CDownloadTransferHTTP::OnHeaderLine(). |
|
Definition at line 671 of file Downloads.cpp. References m_pList, CTransfers::m_pSection, NULL, and Transfers. Referenced by CDownloadsCtrl::BubbleSortDownloads(). |
|
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(). |
|
Definition at line 146 of file Downloads.h. Referenced by Add(), Load(), and SerializeCompound(). |
|
Definition at line 147 of file Downloads.h. |
|
Definition at line 149 of file Downloads.h. |
|
Definition at line 148 of file Downloads.h. |
|
Definition at line 51 of file Downloads.h. Referenced by OnRun(), CDownloadWithTransfers::StartTransfersIfNeeded(), and UpdateAllows(). |
|
Definition at line 52 of file Downloads.h. Referenced by OnRun(), CDownloadWithTransfers::StartTransfersIfNeeded(), and UpdateAllows(). |
|
Definition at line 53 of file Downloads.h. Referenced by CDownloads(), Clear(), CDownloadWithTransfers::CloseTransfers(), CloseTransfers(), and OnDonkeyCallback(). |
|
Definition at line 49 of file Downloads.h. Referenced by CDownloads(), CloseTransfers(), CGraphItem::GetValue(), CTransfers::OnRun(), OnRun(), and CTransfers::StopThread(). |
|
Definition at line 47 of file Downloads.h. Referenced by CDownloads(), CDownloadTransferED2K::Initiate(), CEDClient::Merge(), and OnRun(). |
|
Definition at line 46 of file Downloads.h. Referenced by CDownloadTransferHTTP::AcceptPush(), CDownloads(), CDownloadTransferHTTP::Initiate(), CDownloadTransferFTP::Initiate(), CDownloadTransferBT::OnConnected(), and OnRun(). |
|
Definition at line 58 of file Downloads.h. Referenced by CDownloads(), and OnRun(). |
|
Definition at line 48 of file Downloads.h. Referenced by CDownloads(), CloseTransfers(), CGraphItem::GetValue(), CTransfers::OnRun(), OnRun(), and CTransfers::StopThread(). |
|
Definition at line 50 of file Downloads.h. Referenced by OnRun(), and CDownloadWithTiger::RunValidation(). |
|
Definition at line 57 of file Downloads.h. Referenced by AllowMoreTransfers(), and SetPerHostLimit(). |
|
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(). |
|
Definition at line 54 of file Downloads.h. Referenced by CDownloadWithTransfers::CanStartTransfers(), CDownloads(), CNeighboursWithConnect::Maintain(), and UpdateAllows(). |