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

CDownloadWithSearch Class Reference

#include <DownloadWithSearch.h>

Inheritance diagram for CDownloadWithSearch:

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

Public Member Functions

 CDownloadWithSearch ()
virtual ~CDownloadWithSearch ()
BOOL FindSourcesAllowed (DWORD tNow) const
virtual BOOL FindMoreSources ()

Public Attributes

DWORD m_tLastED2KGlobal
DWORD m_tLastED2KLocal

Protected Member Functions

void RunSearch (DWORD tNow)
void StopSearch ()

Protected Attributes

CManagedSearchm_pSearch
DWORD m_tSearchTime
DWORD m_tSearchCheck

Private Member Functions

void StartManualSearch ()
void StartAutomaticSearch ()
BOOL CanSearch () const
void PrepareSearch ()

Constructor & Destructor Documentation

CDownloadWithSearch::CDownloadWithSearch  ) 
 

Definition at line 40 of file DownloadWithSearch.cpp.

References m_pSearch, m_tLastED2KGlobal, m_tLastED2KLocal, m_tSearchCheck, m_tSearchTime, and NULL.

CDownloadWithSearch::~CDownloadWithSearch  )  [virtual]
 

Definition at line 49 of file DownloadWithSearch.cpp.

References m_pSearch.


Member Function Documentation

BOOL CDownloadWithSearch::CanSearch  )  const [private]
 

Definition at line 151 of file DownloadWithSearch.cpp.

References CDownloadBase::m_bBTH, CDownloadBase::m_bED2K, CDownloadBase::m_bSHA1, CDownloadBase::m_bTiger, CDownloadWithFile::m_pFile, and NULL.

Referenced by FindMoreSources(), and RunSearch().

BOOL CDownloadWithSearch::FindMoreSources  )  [virtual]
 

Reimplemented from CDownloadWithTorrent.

Definition at line 69 of file DownloadWithSearch.cpp.

References CanSearch(), CSettings::Downloads, CDownloadWithTorrent::FindMoreSources(), m_pSearch, m_tSearchTime, NULL, CSettings::sDownloads::SearchPeriod, Settings, and CManagedSearch::Stop().

Referenced by CDownloadsWnd::OnDownloadsSources(), and CDownload::Resume().

BOOL CDownloadWithSearch::FindSourcesAllowed DWORD  tNow  )  const
 

Definition at line 58 of file DownloadWithSearch.cpp.

References m_tSearchTime.

Referenced by CDownloadsWnd::Prepare().

void CDownloadWithSearch::PrepareSearch  )  [private]
 

Definition at line 159 of file DownloadWithSearch.cpp.

References CQuerySearch::BuildWordList(), CManagedSearch::m_bAllowED2K, CQuerySearch::m_bAndG1, CQuerySearch::m_bBTH, CDownloadBase::m_bBTH, CQuerySearch::m_bED2K, CDownloadBase::m_bED2K, CQuerySearch::m_bSHA1, CDownloadBase::m_bSHA1, CQuerySearch::m_bTiger, CDownloadBase::m_bTiger, CQuerySearch::m_bWantCOM, CQuerySearch::m_bWantDN, CQuerySearch::m_bWantPFS, CQuerySearch::m_bWantURL, CQuerySearch::m_bWantXML, CQuerySearch::m_nMaxSize, CQuerySearch::m_nMinSize, CDownloadBase::m_nSize, CDownloadBase::m_pBTH, CQuerySearch::m_pBTH, CDownloadBase::m_pED2K, CQuerySearch::m_pED2K, CManagedSearch::m_pSearch, m_pSearch, CDownloadBase::m_pSHA1, CQuerySearch::m_pSHA1, CDownloadBase::m_pTiger, CQuerySearch::m_pTiger, CDownloadBase::m_sRemoteName, CQuerySearch::m_sSearch, NULL, and SIZE_UNKNOWN.

Referenced by StartAutomaticSearch(), and StartManualSearch().

void CDownloadWithSearch::RunSearch DWORD  tNow  )  [protected]
 

Definition at line 90 of file DownloadWithSearch.cpp.

References CanSearch(), CSettings::Downloads, CDownloadWithSources::GetSourceCount(), CDownloadBase::IsPaused(), CDownloadWithFile::m_tReceived, m_tSearchCheck, m_tSearchTime, CSettings::sDownloads::MinSources, CSettings::sDownloads::SearchPeriod, Settings, StartAutomaticSearch(), StartManualSearch(), CSettings::sDownloads::StarveTimeout, and StopSearch().

Referenced by CDownload::OnRun().

void CDownloadWithSearch::StartAutomaticSearch  )  [private]
 

Definition at line 137 of file DownloadWithSearch.cpp.

References CManagedSearch::m_nPriority, m_pSearch, CSearchManager::m_pSection, PrepareSearch(), SearchManager, CManagedSearch::spLowest, and CManagedSearch::Start().

Referenced by RunSearch().

void CDownloadWithSearch::StartManualSearch  )  [private]
 

Definition at line 123 of file DownloadWithSearch.cpp.

References CManagedSearch::m_nPriority, m_pSearch, CSearchManager::m_pSection, PrepareSearch(), SearchManager, CManagedSearch::spHighest, and CManagedSearch::Start().

Referenced by RunSearch().

void CDownloadWithSearch::StopSearch  )  [protected]
 

Definition at line 218 of file DownloadWithSearch.cpp.

References m_pSearch, NULL, and CManagedSearch::Stop().

Referenced by RunSearch(), and CDownload::StopTrying().


Member Data Documentation

CManagedSearch* CDownloadWithSearch::m_pSearch [protected]
 

Definition at line 41 of file DownloadWithSearch.h.

Referenced by CDownloadWithSearch(), FindMoreSources(), PrepareSearch(), StartAutomaticSearch(), StartManualSearch(), StopSearch(), and ~CDownloadWithSearch().

DWORD CDownloadWithSearch::m_tLastED2KGlobal
 

Definition at line 45 of file DownloadWithSearch.h.

Referenced by CDownloadWithSearch(), and CQuerySearch::WriteHashesToEDPacket().

DWORD CDownloadWithSearch::m_tLastED2KLocal
 

Definition at line 46 of file DownloadWithSearch.h.

Referenced by CDownloadWithSearch(), and CQuerySearch::WriteHashesToEDPacket().

DWORD CDownloadWithSearch::m_tSearchCheck [protected]
 

Definition at line 43 of file DownloadWithSearch.h.

Referenced by CDownloadWithSearch(), and RunSearch().

DWORD CDownloadWithSearch::m_tSearchTime [protected]
 

Definition at line 42 of file DownloadWithSearch.h.

Referenced by CDownloadWithSearch(), FindMoreSources(), FindSourcesAllowed(), and RunSearch().


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