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

CTorrentSeedDlg Class Reference

#include <DlgTorrentSeed.h>

Inheritance diagram for CTorrentSeedDlg:

CSkinDialog List of all members.

Public Types

enum  { IDD = IDD_TORRENT_SEED }

Public Member Functions

 CTorrentSeedDlg (LPCTSTR pszTorrent, BOOL bForceSeed=FALSE, CWnd *pParent=NULL)
virtual ~CTorrentSeedDlg ()

Protected Member Functions

void OnRun ()
void RunSingleFile ()
void RunMultiFile ()
BOOL VerifySingle ()
HANDLE CreateTarget ()
BOOL BuildFiles (HANDLE hTarget)
CString FindFile (LPVOID pVoid)
BOOL CopyFile (HANDLE hTarget, HANDLE hSource, QWORD nLength, LPCTSTR pszPath)
BOOL VerifyData (BYTE *pBuffer, DWORD nLength, LPCTSTR pszPath)
BOOL CreateDownload ()
virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()
afx_msg void OnDownload ()
afx_msg void OnSeed ()
virtual void OnCancel ()
afx_msg void OnDestroy ()
afx_msg void OnTimer (UINT nIDEvent)

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CProgressCtrl m_wndProgress
CButton m_wndDownload
CButton m_wndSeed
HANDLE m_hThread
BOOL m_bCancel
CString m_sTorrent
BOOL m_bForceSeed
CString m_sTarget
CBTInfo m_pInfo
DWORD m_nBlockNumber
DWORD m_nBlockLength
CString m_sMessage
QWORD m_nVolume
QWORD m_nTotal
int m_nScaled
int m_nOldScaled

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
IDD 

Definition at line 36 of file DlgTorrentSeed.h.


Constructor & Destructor Documentation

CTorrentSeedDlg::CTorrentSeedDlg LPCTSTR  pszTorrent,
BOOL  bForceSeed = FALSE,
CWnd *  pParent = NULL
 

Definition at line 55 of file DlgTorrentSeed.cpp.

References NULL.

CTorrentSeedDlg::~CTorrentSeedDlg  )  [virtual]
 

Definition at line 62 of file DlgTorrentSeed.cpp.

References m_hThread, and NULL.


Member Function Documentation

BOOL CTorrentSeedDlg::BuildFiles HANDLE  hTarget  )  [protected]
 

Definition at line 460 of file DlgTorrentSeed.cpp.

References CBTInfo::BeginBlockTest(), CopyFile(), FindFile(), IDS_BT_SEED_SOURCE_LOST, IDS_BT_SEED_SOURCE_SIZE, LoadString(), m_bCancel, m_nBlockLength, m_nBlockNumber, CBTInfo::m_nBlockSize, CBTInfo::m_nFiles, m_nOldScaled, m_nScaled, CBTInfo::CBTFile::m_nSize, m_nTotal, m_nVolume, CBTInfo::m_pFiles, m_pInfo, m_sMessage, CBTInfo::CBTFile::m_sPath, NULL, Settings, CSettings::SmartVolume(), and VerifyData().

Referenced by RunMultiFile().

BOOL CTorrentSeedDlg::CopyFile HANDLE  hTarget,
HANDLE  hSource,
QWORD  nLength,
LPCTSTR  pszPath
[protected]
 

Definition at line 520 of file DlgTorrentSeed.cpp.

References BUFFER_SIZE, IDS_BT_SEED_COPY_FAIL, LoadString(), m_bCancel, m_nOldScaled, m_nScaled, m_nTotal, m_nVolume, m_sMessage, NULL, and VerifyData().

Referenced by BuildFiles().

BOOL CTorrentSeedDlg::CreateDownload  )  [protected]
 

Definition at line 618 of file DlgTorrentSeed.cpp.

References CDownloads::Add(), CBTInfo::Copy(), Downloads, CDownloads::FindByBTH(), IDS_BT_SEED_ALREADY, IDS_BT_SEED_ERROR, LoadString(), m_pInfo, CBTInfo::m_pInfoSHA1, CTransfers::m_pSection, m_sMessage, CBTInfo::m_sName, m_sTarget, NULL, CDownloadWithTorrent::SeedTorrent(), and Transfers.

Referenced by RunMultiFile(), and RunSingleFile().

HANDLE CTorrentSeedDlg::CreateTarget  )  [protected]
 

Definition at line 442 of file DlgTorrentSeed.cpp.

References CSettings::Downloads, CSHA::HashToHexString(), IDS_BT_SEED_CREATE_FAIL, CSettings::sDownloads::IncompletePath, LoadString(), m_pInfo, CBTInfo::m_pInfoSHA1, m_sMessage, m_sTarget, NULL, and Settings.

Referenced by RunMultiFile().

void CTorrentSeedDlg::DoDataExchange CDataExchange *  pDX  )  [protected, virtual]
 

Reimplemented from CSkinDialog.

Definition at line 67 of file DlgTorrentSeed.cpp.

References IDC_DOWNLOAD, IDC_PROGRESS, IDC_SEED, m_wndDownload, m_wndProgress, and m_wndSeed.

CString CTorrentSeedDlg::FindFile LPVOID  pVoid  )  [protected]
 

Definition at line 355 of file DlgTorrentSeed.cpp.

References CSettings::sDownloads::CompletePath, CSettings::Downloads, Library, LibraryMaps, CLibraryMaps::LookupFileBySHA1(), CBTInfo::CBTFile::m_bSHA1, CLibrary::m_pSection, CBTInfo::CBTFile::m_pSHA1, CBTInfo::CBTFile::m_sPath, m_sTorrent, NULL, and Settings.

Referenced by BuildFiles(), and RunSingleFile().

void CTorrentSeedDlg::OnCancel  )  [protected, virtual]
 

Definition at line 235 of file DlgTorrentSeed.cpp.

References m_bCancel, and m_wndDownload.

void CTorrentSeedDlg::OnDestroy  )  [protected]
 

Definition at line 247 of file DlgTorrentSeed.cpp.

References CHttpRequest::CloseThread(), m_bCancel, m_hThread, and NULL.

void CTorrentSeedDlg::OnDownload  )  [protected]
 

Definition at line 99 of file DlgTorrentSeed.cpp.

References CDownloads::Add(), CDownloads::Check(), CNetwork::Connect(), CSettings::Downloads, Downloads, CBTInfo::HasEncodingError(), IDS_BT_PREFETCH_ERROR, IDS_URL_ALREADY_HAVE, CNetwork::IsWellConnected(), Library, LibraryMaps, LoadString(), CBTInfo::LoadTorrentFile(), CLibraryMaps::LookupFileByED2K(), CLibraryMaps::LookupFileBySHA1(), CShareazaURL::m_bED2K, CShareazaURL::m_bSHA1, CShareazaURL::m_pED2K, CTransfers::m_pSection, CLibrary::m_pSection, CShareazaURL::m_pSHA1, CMainWnd::m_pWindows, CLibraryFile::m_sName, m_sTorrent, CShareazaApp::Message(), MSG_ERROR, Network, NULL, CWindowManager::Open(), Settings, CHelpDlg::Show(), CDownloadWithExtras::ShowMonitor(), CSettings::sDownloads::ShowMonitorURLs, theApp, and Transfers.

BOOL CTorrentSeedDlg::OnInitDialog  )  [protected, virtual]
 

Reimplemented from CSkinDialog.

Definition at line 78 of file DlgTorrentSeed.cpp.

References CSettings::sBitTorrent::AutoSeed, CSettings::BitTorrent, IDR_MAINFRAME, m_bForceSeed, CShareazaApp::m_bRTL, m_wndDownload, m_wndProgress, NULL, CSkinDialog::OnInitDialog(), Settings, CSkinDialog::SkinMe(), and theApp.

void CTorrentSeedDlg::OnRun  )  [protected]
 

Definition at line 295 of file DlgTorrentSeed.cpp.

References CBTInfo::m_nFiles, m_pInfo, RunMultiFile(), and RunSingleFile().

void CTorrentSeedDlg::OnSeed  )  [protected]
 

Definition at line 171 of file DlgTorrentSeed.cpp.

References CSettings::BitTorrent, CNetwork::Connect(), Downloads, CDownloads::FindByBTH(), CBTInfo::HasEncodingError(), IDS_BT_SEED_ALREADY, IDS_BT_SEED_PARSE_ERROR, CNetwork::IsConnected(), CLibraryHistory::LastSeededTorrent, Library, LibraryHistory, LoadString(), CBTInfo::LoadTorrentFile(), m_bCancel, m_hThread, m_pInfo, CBTInfo::m_pInfoSHA1, CLibrary::m_pSection, CBTInfo::m_sName, m_sTorrent, m_wndDownload, m_wndSeed, Network, NULL, Settings, CHelpDlg::Show(), ThreadStart(), and CSettings::sBitTorrent::TorrentIgnoreErrors.

Referenced by OnTimer().

void CTorrentSeedDlg::OnTimer UINT  nIDEvent  )  [protected]
 

Definition at line 259 of file DlgTorrentSeed.cpp.

References m_bCancel, m_nOldScaled, m_nScaled, m_sMessage, m_wndProgress, and OnSeed().

void CTorrentSeedDlg::RunMultiFile  )  [protected]
 

Definition at line 330 of file DlgTorrentSeed.cpp.

References BuildFiles(), CreateDownload(), CreateTarget(), and m_sTarget.

Referenced by OnRun().

void CTorrentSeedDlg::RunSingleFile  )  [protected]
 

Definition at line 307 of file DlgTorrentSeed.cpp.

References CreateDownload(), FindFile(), IDS_BT_SEED_SOURCE_LOST, LoadString(), CBTInfo::m_pFiles, m_pInfo, m_sMessage, m_sTarget, and VerifySingle().

Referenced by OnRun().

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

Definition at line 289 of file DlgTorrentSeed.cpp.

Referenced by OnSeed().

BOOL CTorrentSeedDlg::VerifyData BYTE *  pBuffer,
DWORD  nLength,
LPCTSTR  pszPath
[protected]
 

Definition at line 574 of file DlgTorrentSeed.cpp.

References CBTInfo::AddToTest(), CBTInfo::BeginBlockTest(), CBTInfo::FinishBlockTest(), IDS_BT_SEED_VERIFY_FAIL, LoadString(), CBTInfo::m_nBlockCount, m_nBlockLength, m_nBlockNumber, CBTInfo::m_nBlockSize, m_pInfo, m_sMessage, and NULL.

Referenced by BuildFiles(), CopyFile(), and VerifySingle().

BOOL CTorrentSeedDlg::VerifySingle  )  [protected]
 

Definition at line 395 of file DlgTorrentSeed.cpp.

References CBTInfo::BeginBlockTest(), BUFFER_SIZE, IDS_BT_SEED_SOURCE_LOST, LoadString(), m_bCancel, m_nBlockLength, m_nBlockNumber, CBTInfo::m_nBlockSize, m_nOldScaled, m_nScaled, m_nTotal, m_nVolume, m_pInfo, m_sMessage, m_sTarget, NULL, and VerifyData().

Referenced by RunSingleFile().


Member Data Documentation

BOOL CTorrentSeedDlg::m_bCancel [protected]
 

Definition at line 45 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), OnCancel(), OnDestroy(), OnSeed(), OnTimer(), and VerifySingle().

BOOL CTorrentSeedDlg::m_bForceSeed [protected]
 

Definition at line 47 of file DlgTorrentSeed.h.

Referenced by OnInitDialog().

HANDLE CTorrentSeedDlg::m_hThread [protected]
 

Definition at line 44 of file DlgTorrentSeed.h.

Referenced by OnDestroy(), OnSeed(), and ~CTorrentSeedDlg().

DWORD CTorrentSeedDlg::m_nBlockLength [protected]
 

Definition at line 51 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), VerifyData(), and VerifySingle().

DWORD CTorrentSeedDlg::m_nBlockNumber [protected]
 

Definition at line 50 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), VerifyData(), and VerifySingle().

int CTorrentSeedDlg::m_nOldScaled [protected]
 

Definition at line 57 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), OnTimer(), and VerifySingle().

int CTorrentSeedDlg::m_nScaled [protected]
 

Definition at line 56 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), OnTimer(), and VerifySingle().

QWORD CTorrentSeedDlg::m_nTotal [protected]
 

Definition at line 55 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), and VerifySingle().

QWORD CTorrentSeedDlg::m_nVolume [protected]
 

Definition at line 54 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), and VerifySingle().

CBTInfo CTorrentSeedDlg::m_pInfo [protected]
 

Definition at line 49 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CreateDownload(), CreateTarget(), OnRun(), OnSeed(), RunSingleFile(), VerifyData(), and VerifySingle().

CString CTorrentSeedDlg::m_sMessage [protected]
 

Definition at line 53 of file DlgTorrentSeed.h.

Referenced by BuildFiles(), CopyFile(), CreateDownload(), CreateTarget(), OnTimer(), RunSingleFile(), VerifyData(), and VerifySingle().

CString CTorrentSeedDlg::m_sTarget [protected]
 

Definition at line 48 of file DlgTorrentSeed.h.

Referenced by CreateDownload(), CreateTarget(), RunMultiFile(), RunSingleFile(), and VerifySingle().

CString CTorrentSeedDlg::m_sTorrent [protected]
 

Definition at line 46 of file DlgTorrentSeed.h.

Referenced by FindFile(), OnDownload(), and OnSeed().

CButton CTorrentSeedDlg::m_wndDownload [protected]
 

Definition at line 41 of file DlgTorrentSeed.h.

Referenced by DoDataExchange(), OnCancel(), OnInitDialog(), and OnSeed().

CProgressCtrl CTorrentSeedDlg::m_wndProgress [protected]
 

Definition at line 40 of file DlgTorrentSeed.h.

Referenced by DoDataExchange(), OnInitDialog(), and OnTimer().

CButton CTorrentSeedDlg::m_wndSeed [protected]
 

Definition at line 42 of file DlgTorrentSeed.h.

Referenced by DoDataExchange(), and OnSeed().


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