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

CVersionChecker Class Reference

#include <VersionChecker.h>

List of all members.

Public Member Functions

 CVersionChecker ()
virtual ~CVersionChecker ()
BOOL NeedToCheck ()
BOOL Start (HWND hWndNotify)
void Stop ()
void SetNextCheck (int nDays)
BOOL CheckUpgradeHash (const SHA1 *pHash, LPCTSTR pszPath)

Public Attributes

CString m_sMessage
CString m_sQuote
BOOL m_bUpgrade
CString m_sUpgradePrompt
CString m_sUpgradeFile
CString m_sUpgradeSHA1
CString m_sUpgradeTiger
CString m_sUpgradeSize
CString m_sUpgradeSources
CString m_sUpgradePath
CString m_sUpgradeVersion

Protected Member Functions

void OnRun ()
void BuildRequest (CString &strRequest)
BOOL UndertakeRequest (CString &strPost)
void ProcessResponse ()

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

HANDLE m_hThread
CHttpRequest m_pRequest
CMapStringToString m_pResponse
HWND m_hWndNotify


Constructor & Destructor Documentation

CVersionChecker::CVersionChecker  ) 
 

Definition at line 46 of file VersionChecker.cpp.

References m_bUpgrade, m_hThread, m_hWndNotify, and NULL.

CVersionChecker::~CVersionChecker  )  [virtual]
 

Definition at line 53 of file VersionChecker.cpp.

References Stop().


Member Function Documentation

void CVersionChecker::BuildRequest CString &  strRequest  )  [protected]
 

Definition at line 160 of file VersionChecker.cpp.

References CShareazaApp::m_sVersion, and theApp.

Referenced by OnRun().

BOOL CVersionChecker::CheckUpgradeHash const SHA1 pHash,
LPCTSTR  pszPath
 

Definition at line 291 of file VersionChecker.cpp.

References CSHA::HashToString(), m_bUpgrade, m_sUpgradePath, m_sUpgradeSHA1, NULL, and WM_VERSIONCHECK.

Referenced by CLibraryFile::OnVerifyDownload().

BOOL CVersionChecker::NeedToCheck  ) 
 

Definition at line 61 of file VersionChecker.cpp.

References CSettings::General, m_bUpgrade, m_sQuote, m_sUpgradeFile, m_sUpgradePrompt, m_sUpgradeSHA1, m_sUpgradeSize, m_sUpgradeSources, m_sUpgradeTiger, m_sUpgradeVersion, CShareazaApp::m_sVersion, NULL, Settings, theApp, and CSettings::sGeneral::UpdateCheck.

Referenced by CShareazaApp::InitInstance().

void CVersionChecker::OnRun  )  [protected]
 

Definition at line 138 of file VersionChecker.cpp.

References BuildRequest(), m_pResponse, ProcessResponse(), SetNextCheck(), UndertakeRequest(), and VERSIONCHECKER_FREQUENCY.

Referenced by ThreadStart().

void CVersionChecker::ProcessResponse  )  [protected]
 

Definition at line 204 of file VersionChecker.cpp.

References CDiscoveryServices::Add(), DiscoveryServices, CDiscoveryService::dsWebCache, m_bUpgrade, m_hWndNotify, m_pResponse, m_sMessage, m_sQuote, m_sUpgradeFile, m_sUpgradePrompt, m_sUpgradeSHA1, m_sUpgradeSize, m_sUpgradeSources, m_sUpgradeTiger, m_sUpgradeVersion, CShareazaApp::Message(), MSG_SYSTEM, SetNextCheck(), theApp, VERSIONCHECKER_FREQUENCY, and WM_VERSIONCHECK.

Referenced by OnRun().

void CVersionChecker::SetNextCheck int  nDays  ) 
 

Definition at line 281 of file VersionChecker.cpp.

References theApp.

Referenced by OnRun(), CUpgradeDlg::ParseCheckAgain(), and ProcessResponse().

BOOL CVersionChecker::Start HWND  hWndNotify  ) 
 

Definition at line 99 of file VersionChecker.cpp.

References CHttpRequest::Clear(), m_bUpgrade, m_hThread, m_hWndNotify, m_pRequest, Stop(), and ThreadStart().

Referenced by CShareazaApp::InitInstance().

void CVersionChecker::Stop  ) 
 

Definition at line 119 of file VersionChecker.cpp.

References CHttpRequest::Cancel(), CHttpRequest::CloseThread(), m_hThread, and m_pRequest.

Referenced by CShareazaApp::ExitInstance(), Start(), and ~CVersionChecker().

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

Definition at line 128 of file VersionChecker.cpp.

References OnRun().

Referenced by Start().

BOOL CVersionChecker::UndertakeRequest CString &  strPost  )  [protected]
 

Definition at line 169 of file VersionChecker.cpp.

References CHttpRequest::Execute(), CHttpRequest::GetResponseString(), CHttpRequest::GetStatusCode(), m_pRequest, m_pResponse, CHttpRequest::SetURL(), theApp, and CConnection::URLDecode().

Referenced by OnRun().


Member Data Documentation

BOOL CVersionChecker::m_bUpgrade
 

Definition at line 41 of file VersionChecker.h.

Referenced by CheckUpgradeHash(), CVersionChecker(), NeedToCheck(), CLibraryFile::OnVerifyDownload(), CMainWnd::OnVersionCheck(), ProcessResponse(), Start(), and CHomeViewCtrl::Update().

HANDLE CVersionChecker::m_hThread [protected]
 

Definition at line 52 of file VersionChecker.h.

Referenced by CVersionChecker(), Start(), and Stop().

HWND CVersionChecker::m_hWndNotify [protected]
 

Definition at line 55 of file VersionChecker.h.

Referenced by CVersionChecker(), ProcessResponse(), and Start().

CHttpRequest CVersionChecker::m_pRequest [protected]
 

Definition at line 53 of file VersionChecker.h.

Referenced by Start(), Stop(), and UndertakeRequest().

CMapStringToString CVersionChecker::m_pResponse [protected]
 

Definition at line 54 of file VersionChecker.h.

Referenced by OnRun(), ProcessResponse(), and UndertakeRequest().

CString CVersionChecker::m_sMessage
 

Definition at line 39 of file VersionChecker.h.

Referenced by CMainWnd::OnVersionCheck(), and ProcessResponse().

CString CVersionChecker::m_sQuote
 

Definition at line 40 of file VersionChecker.h.

Referenced by NeedToCheck(), ProcessResponse(), and CMainWnd::UpdateMessages().

CString CVersionChecker::m_sUpgradeFile
 

Definition at line 43 of file VersionChecker.h.

Referenced by NeedToCheck(), CUpgradeDlg::OnOK(), CMainWnd::OnVersionCheck(), and ProcessResponse().

CString CVersionChecker::m_sUpgradePath
 

Definition at line 48 of file VersionChecker.h.

Referenced by CheckUpgradeHash(), and CMainWnd::OnVersionCheck().

CString CVersionChecker::m_sUpgradePrompt
 

Definition at line 42 of file VersionChecker.h.

Referenced by NeedToCheck(), CUpgradeDlg::OnInitDialog(), ProcessResponse(), and CHomeViewCtrl::Update().

CString CVersionChecker::m_sUpgradeSHA1
 

Definition at line 44 of file VersionChecker.h.

Referenced by CheckUpgradeHash(), NeedToCheck(), CUpgradeDlg::OnOK(), and ProcessResponse().

CString CVersionChecker::m_sUpgradeSize
 

Definition at line 46 of file VersionChecker.h.

Referenced by NeedToCheck(), CUpgradeDlg::OnOK(), and ProcessResponse().

CString CVersionChecker::m_sUpgradeSources
 

Definition at line 47 of file VersionChecker.h.

Referenced by NeedToCheck(), CUpgradeDlg::OnOK(), and ProcessResponse().

CString CVersionChecker::m_sUpgradeTiger
 

Definition at line 45 of file VersionChecker.h.

Referenced by NeedToCheck(), CUpgradeDlg::OnOK(), and ProcessResponse().

CString CVersionChecker::m_sUpgradeVersion
 

Definition at line 49 of file VersionChecker.h.

Referenced by NeedToCheck(), and ProcessResponse().


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