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

CBitziDownloader Class Reference

#include <BitziDownloader.h>

List of all members.

Public Member Functions

 CBitziDownloader ()
virtual ~CBitziDownloader ()
void AddFile (DWORD nIndex)
int GetFileCount ()
BOOL Start (CBitziDownloadDlg *pDlg=NULL)
void Stop ()
BOOL IsWorking ()

Protected Member Functions

void OnRun ()
BOOL BuildRequest ()
BOOL ExecuteRequest ()
BOOL DecodeResponse ()
CString LookupValue (LPCTSTR pszPath)
CXMLElementImportData (CSchema *pSchema)
BOOL SubmitMetaData (CXMLElement *pXML)
BOOL MergeMetaData (CXMLElement *pOutput, CXMLElement *pInput)

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CPtrList m_pFiles
CCriticalSection m_pSection
CBitziDownloadDlgm_pDlg
HANDLE m_hThread
HINTERNET m_hInternet
HINTERNET m_hSession
HINTERNET m_hRequest
BOOL m_bFinished
DWORD m_nDelay
DWORD m_nFailures
DWORD m_nFileIndex
CString m_sFileName
CString m_sFileHash
CString m_sURL
CString m_sResponse
CXMLElementm_pXML


Constructor & Destructor Documentation

CBitziDownloader::CBitziDownloader  ) 
 

Definition at line 44 of file BitziDownloader.cpp.

References m_bFinished, m_hInternet, m_hRequest, m_hSession, m_hThread, m_nDelay, m_nFailures, m_pDlg, m_pXML, and NULL.

CBitziDownloader::~CBitziDownloader  )  [virtual]
 

Definition at line 57 of file BitziDownloader.cpp.

References m_pXML, NULL, and Stop().


Member Function Documentation

void CBitziDownloader::AddFile DWORD  nIndex  ) 
 

Definition at line 68 of file BitziDownloader.cpp.

References m_pFiles, and m_pSection.

Referenced by CBitziDownloadDlg::AddFile().

BOOL CBitziDownloader::BuildRequest  )  [protected]
 

Definition at line 235 of file BitziDownloader.cpp.

References CSettings::sLibrary::BitziXML, CSHA::HashToString(), CSettings::Library, Library, CLibrary::LookupFile(), CLibraryFile::m_bSHA1, m_nFileIndex, CLibrary::m_pSection, CLibraryFile::m_pSHA1, m_sFileHash, m_sFileName, CLibraryFile::m_sName, m_sURL, Replace(), and Settings.

Referenced by OnRun().

BOOL CBitziDownloader::DecodeResponse  )  [protected]
 

Definition at line 356 of file BitziDownloader.cpp.

References CXMLElement::FromString(), CSchemaCache::GetIterator(), CSchemaCache::GetNext(), ImportData(), LookupValue(), m_pXML, CSchema::m_sBitziTest, m_sResponse, NULL, SchemaCache, and SubmitMetaData().

Referenced by OnRun().

BOOL CBitziDownloader::ExecuteRequest  )  [protected]
 

Definition at line 261 of file BitziDownloader.cpp.

References m_hInternet, m_hRequest, m_hSession, m_nDelay, m_sResponse, m_sURL, and NULL.

Referenced by OnRun().

int CBitziDownloader::GetFileCount  ) 
 

Definition at line 74 of file BitziDownloader.cpp.

References m_pFiles, and m_pSection.

Referenced by CBitziDownloadDlg::OnInitDialog().

CXMLElement * CBitziDownloader::ImportData CSchema pSchema  )  [protected]
 

Definition at line 427 of file BitziDownloader.cpp.

References CXMLElement::AddAttribute(), CXMLElement::AddElement(), LookupValue(), CSchemaBitzi::m_nFactor, CSchemaBitzi::m_sFrom, CSchemaBitzi::m_sTo, and NULL.

Referenced by DecodeResponse().

BOOL CBitziDownloader::IsWorking  ) 
 

Definition at line 142 of file BitziDownloader.cpp.

References m_bFinished, m_hThread, and NULL.

Referenced by CBitziDownloadDlg::OnTimer().

CString CBitziDownloader::LookupValue LPCTSTR  pszPath  )  [protected]
 

Definition at line 383 of file BitziDownloader.cpp.

References CXMLElement::GetAttributeValue(), CXMLElement::GetElementByName(), CXMLNode::GetName(), m_pXML, and NULL.

Referenced by DecodeResponse(), and ImportData().

BOOL CBitziDownloader::MergeMetaData CXMLElement pOutput,
CXMLElement pInput
[protected]
 

Definition at line 496 of file BitziDownloader.cpp.

References CXMLAttribute::Clone(), CXMLElement::Clone(), CXMLElement::GetAttributeIterator(), CXMLElement::GetElementIterator(), CXMLNode::GetName(), CXMLElement::GetNextAttribute(), CXMLElement::GetNextElement(), and NULL.

Referenced by SubmitMetaData().

void CBitziDownloader::OnRun  )  [protected]
 

Definition at line 160 of file BitziDownloader.cpp.

References BuildRequest(), DecodeResponse(), ExecuteRequest(), m_bFinished, m_hInternet, m_hRequest, m_hSession, m_nDelay, m_nFailures, m_nFileIndex, m_pDlg, m_pFiles, m_pSection, m_pXML, m_sFileName, m_sResponse, NULL, CBitziDownloadDlg::OnFailure(), CBitziDownloadDlg::OnFinishedFile(), CBitziDownloadDlg::OnNextFile(), CBitziDownloadDlg::OnRequesting(), and CBitziDownloadDlg::OnSuccess().

Referenced by ThreadStart().

BOOL CBitziDownloader::Start CBitziDownloadDlg pDlg = NULL  ) 
 

Definition at line 83 of file BitziDownloader.cpp.

References m_bFinished, m_hInternet, m_hRequest, m_hSession, m_hThread, m_nDelay, m_nFailures, m_pDlg, NULL, Settings, CSettings::SmartAgent(), and ThreadStart().

Referenced by CBitziDownloadDlg::OnInitDialog().

void CBitziDownloader::Stop  ) 
 

Definition at line 108 of file BitziDownloader.cpp.

References m_hInternet, m_hSession, m_hThread, m_pDlg, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

Referenced by CBitziDownloadDlg::OnCancel(), and ~CBitziDownloader().

BOOL CBitziDownloader::SubmitMetaData CXMLElement pXML  )  [protected]
 

Definition at line 472 of file BitziDownloader.cpp.

References Library, CLibrary::LookupFile(), m_nFileIndex, CLibraryFile::m_pMetadata, CLibrary::m_pSection, MergeMetaData(), NULL, and CLibraryFile::SetMetadata().

Referenced by DecodeResponse().

UINT CBitziDownloader::ThreadStart LPVOID  pParam  )  [static, protected]
 

Definition at line 150 of file BitziDownloader.cpp.

References OnRun().

Referenced by Start().


Member Data Documentation

BOOL CBitziDownloader::m_bFinished [protected]
 

Definition at line 49 of file BitziDownloader.h.

Referenced by CBitziDownloader(), IsWorking(), OnRun(), and Start().

HINTERNET CBitziDownloader::m_hInternet [protected]
 

Definition at line 46 of file BitziDownloader.h.

Referenced by CBitziDownloader(), ExecuteRequest(), OnRun(), Start(), and Stop().

HINTERNET CBitziDownloader::m_hRequest [protected]
 

Definition at line 48 of file BitziDownloader.h.

Referenced by CBitziDownloader(), ExecuteRequest(), OnRun(), and Start().

HINTERNET CBitziDownloader::m_hSession [protected]
 

Definition at line 47 of file BitziDownloader.h.

Referenced by CBitziDownloader(), ExecuteRequest(), OnRun(), Start(), and Stop().

HANDLE CBitziDownloader::m_hThread [protected]
 

Definition at line 45 of file BitziDownloader.h.

Referenced by CBitziDownloader(), IsWorking(), Start(), and Stop().

DWORD CBitziDownloader::m_nDelay [protected]
 

Definition at line 50 of file BitziDownloader.h.

Referenced by CBitziDownloader(), ExecuteRequest(), OnRun(), and Start().

DWORD CBitziDownloader::m_nFailures [protected]
 

Definition at line 51 of file BitziDownloader.h.

Referenced by CBitziDownloader(), OnRun(), and Start().

DWORD CBitziDownloader::m_nFileIndex [protected]
 

Definition at line 53 of file BitziDownloader.h.

Referenced by BuildRequest(), OnRun(), and SubmitMetaData().

CBitziDownloadDlg* CBitziDownloader::m_pDlg [protected]
 

Definition at line 43 of file BitziDownloader.h.

Referenced by CBitziDownloader(), OnRun(), Start(), and Stop().

CPtrList CBitziDownloader::m_pFiles [protected]
 

Definition at line 41 of file BitziDownloader.h.

Referenced by AddFile(), GetFileCount(), and OnRun().

CCriticalSection CBitziDownloader::m_pSection [protected]
 

Definition at line 42 of file BitziDownloader.h.

Referenced by AddFile(), GetFileCount(), and OnRun().

CXMLElement* CBitziDownloader::m_pXML [protected]
 

Definition at line 58 of file BitziDownloader.h.

Referenced by CBitziDownloader(), DecodeResponse(), LookupValue(), OnRun(), and ~CBitziDownloader().

CString CBitziDownloader::m_sFileHash [protected]
 

Definition at line 55 of file BitziDownloader.h.

Referenced by BuildRequest().

CString CBitziDownloader::m_sFileName [protected]
 

Definition at line 54 of file BitziDownloader.h.

Referenced by BuildRequest(), and OnRun().

CString CBitziDownloader::m_sResponse [protected]
 

Definition at line 57 of file BitziDownloader.h.

Referenced by DecodeResponse(), ExecuteRequest(), and OnRun().

CString CBitziDownloader::m_sURL [protected]
 

Definition at line 56 of file BitziDownloader.h.

Referenced by BuildRequest(), and ExecuteRequest().


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