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

CBTInfo Class Reference

#include <BTInfo.h>

List of all members.

Public Member Functions

 CBTInfo ()
 ~CBTInfo ()
void Clear ()
void Copy (CBTInfo *pSource)
void Serialize (CArchive &ar)
BOOL LoadTorrentFile (LPCTSTR pszFile)
BOOL LoadTorrentBuffer (CBuffer *pBuffer)
BOOL LoadTorrentTree (CBENode *pRoot)
BOOL SaveTorrentFile (LPCTSTR pszPath)
void BeginBlockTest ()
void AddToTest (LPCVOID pInput, DWORD nLength)
BOOL FinishBlockTest (DWORD nBlock)
BOOL IsAvailable () const
BOOL HasEncodingError () const
BOOL IsValid (LPCTSTR psz) const

Public Attributes

BOOL m_bValid
BOOL m_bEncodingError
SHA1 m_pInfoSHA1
BOOL m_bDataSHA1
SHA1 m_pDataSHA1
BOOL m_bDataED2K
MD4 m_pDataED2K
BOOL m_bDataTiger
TIGEROOT m_pDataTiger
QWORD m_nTotalSize
DWORD m_nBlockSize
DWORD m_nBlockCount
SHA1m_pBlockSHA1
CString m_sName
int m_nFiles
CBTFilem_pFiles
CString m_sTracker
CBTTrackerm_pAnnounceTracker
CPtrArray m_pTrackerList
int m_nTrackerIndex
UINT m_nEncoding
CString m_sComment
DWORD m_tCreationDate
CString m_sCreatedBy

Protected Member Functions

BOOL CheckFiles ()

Private Attributes

CSHA m_pTestSHA1
DWORD m_nTestByte
CBuffer m_pSource

Classes

class  CBTFile
class  CBTTracker


Constructor & Destructor Documentation

CBTInfo::CBTInfo  ) 
 

Definition at line 41 of file BTInfo.cpp.

References CSettings::BitTorrent, m_bDataED2K, m_bDataSHA1, m_bDataTiger, m_bEncodingError, m_bValid, m_nBlockCount, m_nBlockSize, m_nEncoding, m_nFiles, m_nTotalSize, m_nTrackerIndex, m_pAnnounceTracker, m_pBlockSHA1, m_pFiles, m_tCreationDate, NULL, Settings, and CSettings::sBitTorrent::TorrentCodePage.

CBTInfo::~CBTInfo  ) 
 

Definition at line 62 of file BTInfo.cpp.

References Clear().


Member Function Documentation

void CBTInfo::AddToTest LPCVOID  pInput,
DWORD  nLength
 

Definition at line 769 of file BTInfo.cpp.

References CSHA::Add(), IsAvailable(), m_nBlockSize, m_nTestByte, m_pBlockSHA1, m_pTestSHA1, and NULL.

Referenced by CDownloadWithTiger::ContinueValidation(), and CTorrentSeedDlg::VerifyData().

void CBTInfo::BeginBlockTest  ) 
 

Definition at line 760 of file BTInfo.cpp.

References IsAvailable(), m_nTestByte, m_pBlockSHA1, m_pTestSHA1, NULL, and CSHA::Reset().

Referenced by CTorrentSeedDlg::BuildFiles(), CDownloadWithTiger::FindNewValidationBlock(), CTorrentSeedDlg::VerifyData(), and CTorrentSeedDlg::VerifySingle().

BOOL CBTInfo::CheckFiles  )  [protected]
 

Definition at line 738 of file BTInfo.cpp.

References m_nFiles, m_pFiles, CBTInfo::CBTFile::m_sPath, and NULL.

Referenced by LoadTorrentTree().

void CBTInfo::Clear  ) 
 

Definition at line 78 of file BTInfo.cpp.

References m_bValid, m_nBlockCount, m_nBlockSize, m_nFiles, m_nTotalSize, m_pAnnounceTracker, m_pBlockSHA1, m_pFiles, m_pTrackerList, and NULL.

Referenced by Copy(), LoadTorrentTree(), and ~CBTInfo().

void CBTInfo::Copy CBTInfo pSource  ) 
 

Definition at line 110 of file BTInfo.cpp.

References Clear(), CBTInfo::CBTTracker::Copy(), CBTInfo::CBTFile::Copy(), m_bDataED2K, m_bDataSHA1, m_bDataTiger, m_bEncodingError, m_bValid, m_nBlockCount, m_nBlockSize, m_nEncoding, m_nFiles, m_nTotalSize, m_pAnnounceTracker, m_pBlockSHA1, m_pDataED2K, m_pDataSHA1, m_pDataTiger, m_pFiles, m_pInfoSHA1, m_pTrackerList, m_sComment, m_sCreatedBy, m_sName, m_sTracker, m_tCreationDate, and NULL.

Referenced by CTorrentSeedDlg::CreateDownload(), and CDownloadWithTorrent::SetTorrent().

BOOL CBTInfo::FinishBlockTest DWORD  nBlock  ) 
 

Definition at line 781 of file BTInfo.cpp.

References CSHA::Finish(), CSHA::GetHash(), IsAvailable(), m_nBlockCount, m_pBlockSHA1, m_pTestSHA1, and NULL.

Referenced by CDownloadWithTiger::FinishValidation(), CDownloadWithTiger::ResetVerification(), and CTorrentSeedDlg::VerifyData().

BOOL CBTInfo::HasEncodingError  )  const [inline]
 

Definition at line 137 of file BTInfo.h.

References m_bEncodingError.

Referenced by CDDEServer::Execute(), CTorrentSeedDlg::OnDownload(), and CTorrentSeedDlg::OnSeed().

BOOL CBTInfo::IsAvailable  )  const [inline]
 

Definition at line 136 of file BTInfo.h.

References m_bValid.

Referenced by CLocalSearch::AddHit(), AddToTest(), BeginBlockTest(), CDownloadSource::CheckHash(), CDownloadWithTorrent::CreateBitfieldPacket(), CDownloadWithTorrent::FindMoreSources(), FinishBlockTest(), CDownloadsWnd::OnDownloadsTorrentInfo(), CDownloadEditDlg::OnInitDialog(), CDownload::OnMoved(), CDownloadsWnd::OnTimer(), CDownloadEditDlg::OnTorrentInfo(), CDownloadsWnd::Prepare(), CDownloadTask::RunCopyTorrent(), CDownloadWithTorrent::RunTorrent(), SaveTorrentFile(), CDownloadWithTorrent::Serialize(), and CDownloadWithTorrent::SetTorrent().

BOOL CBTInfo::IsValid LPCTSTR  psz  )  const [inline]
 

Definition at line 140 of file BTInfo.h.

References NULL.

Referenced by LoadTorrentTree().

BOOL CBTInfo::LoadTorrentBuffer CBuffer pBuffer  ) 
 

Definition at line 300 of file BTInfo.cpp.

References CBENode::Decode(), LoadTorrentTree(), and NULL.

Referenced by LoadTorrentFile().

BOOL CBTInfo::LoadTorrentFile LPCTSTR  pszFile  ) 
 

Definition at line 250 of file BTInfo.cpp.

References CBuffer::Clear(), CBuffer::EnsureBuffer(), LoadTorrentBuffer(), CBuffer::m_nLength, CBuffer::m_pBuffer, and m_pSource.

Referenced by CDDEServer::Execute(), CTorrentSeedDlg::OnDownload(), CTorrentSeedDlg::OnSeed(), and CDownloadDlg::OnTorrentFile().

BOOL CBTInfo::LoadTorrentTree CBENode pRoot  ) 
 

Definition at line 312 of file BTInfo.cpp.

References _tcsistr(), CBENode::beDict, CBENode::beInt, CBENode::beList, CBENode::beString, CSettings::BitTorrent, CheckFiles(), Clear(), CBENode::DecodeString(), CBENode::GetCount(), CBENode::GetInt(), CBENode::GetNode(), CBENode::GetSHA1(), CBENode::GetString(), CBENode::GetStringFromSubNode(), CBENode::IsType(), IsValid(), m_bDataED2K, m_bDataSHA1, m_bDataTiger, CBTInfo::CBTFile::m_bED2K, m_bEncodingError, CBTInfo::CBTFile::m_bSHA1, CBTInfo::CBTFile::m_bTiger, m_bValid, m_nBlockCount, m_nBlockSize, m_nEncoding, m_nFiles, CBTInfo::CBTFile::m_nSize, CBTInfo::CBTTracker::m_nTier, m_nTotalSize, CBENode::m_nValue, m_pAnnounceTracker, m_pBlockSHA1, m_pDataED2K, m_pDataSHA1, m_pDataTiger, CBTInfo::CBTFile::m_pED2K, m_pFiles, m_pInfoSHA1, CBTInfo::CBTFile::m_pSHA1, CBTInfo::CBTFile::m_pTiger, m_pTrackerList, CBENode::m_pValue, CBTInfo::CBTTracker::m_sAddress, m_sComment, m_sCreatedBy, m_sName, CBTInfo::CBTFile::m_sPath, m_sTracker, m_tCreationDate, CShareazaApp::Message(), MSG_ERROR, NULL, pTiger, CDownloadTask::SafeFilename(), Settings, theApp, and CSettings::sBitTorrent::TorrentExtraKeys.

Referenced by LoadTorrentBuffer().

BOOL CBTInfo::SaveTorrentFile LPCTSTR  pszPath  ) 
 

Definition at line 279 of file BTInfo.cpp.

References IsAvailable(), CBuffer::m_nLength, CBuffer::m_pBuffer, m_pSource, m_sName, NULL, and CDownloadTask::SafeFilename().

void CBTInfo::Serialize CArchive &  ar  ) 
 

Definition at line 170 of file BTInfo.cpp.

References m_bValid, m_nBlockCount, m_nBlockSize, m_nEncoding, m_nFiles, m_nTotalSize, m_pBlockSHA1, m_pFiles, m_pInfoSHA1, m_sComment, m_sCreatedBy, m_sName, m_sTracker, m_tCreationDate, and CBTInfo::CBTFile::Serialize().

Referenced by CDownloadWithTorrent::Serialize().


Member Data Documentation

BOOL CBTInfo::m_bDataED2K
 

Definition at line 88 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

BOOL CBTInfo::m_bDataSHA1
 

Definition at line 86 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

BOOL CBTInfo::m_bDataTiger
 

Definition at line 90 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

BOOL CBTInfo::m_bEncodingError
 

Definition at line 84 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), HasEncodingError(), and LoadTorrentTree().

BOOL CBTInfo::m_bValid
 

Definition at line 83 of file BTInfo.h.

Referenced by CBTInfo(), Clear(), Copy(), IsAvailable(), LoadTorrentTree(), CTorrentTrackerDlg::OnOK(), and Serialize().

DWORD CBTInfo::m_nBlockCount
 

Definition at line 95 of file BTInfo.h.

Referenced by CBTInfo(), Clear(), Copy(), FinishBlockTest(), LoadTorrentTree(), CDownloadTransferBT::OnBitfield(), CDownloadTransferBT::OnHave(), CDownloadWithTorrent::Serialize(), Serialize(), CDownloadWithTorrent::SetTorrent(), and CTorrentSeedDlg::VerifyData().

DWORD CBTInfo::m_nBlockSize
 

Definition at line 94 of file BTInfo.h.

Referenced by AddToTest(), CTorrentSeedDlg::BuildFiles(), CBTInfo(), Clear(), Copy(), LoadTorrentTree(), CDownloadTransferBT::OnBitfield(), CUploadTransferBT::OnCancel(), CDownloadTransferBT::OnChoked(), CDownloadTransferBT::OnHave(), CDownloadTransferBT::OnPiece(), CUploadTransferBT::OnRequest(), CDownloadTransferBT::SelectFragment(), CDownloadTransferBT::SendRequests(), CDownloadWithTorrent::Serialize(), Serialize(), CUploadTransferBT::ServeRequests(), CDownloadWithTorrent::SetTorrent(), CDownloadTransferBT::ShowInterest(), CDownloadTransferBT::UnrequestRange(), CTorrentSeedDlg::VerifyData(), and CTorrentSeedDlg::VerifySingle().

UINT CBTInfo::m_nEncoding
 

Definition at line 108 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), LoadTorrentTree(), and Serialize().

int CBTInfo::m_nFiles
 

Definition at line 99 of file BTInfo.h.

Referenced by CTorrentSeedDlg::BuildFiles(), CBTInfo(), CheckFiles(), Clear(), Copy(), LoadTorrentTree(), CDownloadsWnd::OnDownloadsLaunch(), CTorrentTrackerDlg::OnInitDialog(), CTorrentSeedDlg::OnRun(), CDownloadTask::RunCopyTorrent(), Serialize(), and CDownload::~CDownload().

DWORD CBTInfo::m_nTestByte [private]
 

Definition at line 114 of file BTInfo.h.

Referenced by AddToTest(), and BeginBlockTest().

QWORD CBTInfo::m_nTotalSize
 

Definition at line 93 of file BTInfo.h.

Referenced by CBTInfo(), Clear(), Copy(), CShareazaURL::CShareazaURL(), LoadTorrentTree(), CDownloadTask::RunCopyTorrent(), and Serialize().

int CBTInfo::m_nTrackerIndex
 

Definition at line 106 of file BTInfo.h.

Referenced by CBTInfo().

CBTTracker* CBTInfo::m_pAnnounceTracker
 

Definition at line 104 of file BTInfo.h.

Referenced by CBTInfo(), Clear(), Copy(), and LoadTorrentTree().

SHA1* CBTInfo::m_pBlockSHA1
 

Definition at line 96 of file BTInfo.h.

Referenced by AddToTest(), BeginBlockTest(), CBTInfo(), Clear(), Copy(), FinishBlockTest(), LoadTorrentTree(), and Serialize().

MD4 CBTInfo::m_pDataED2K
 

Definition at line 89 of file BTInfo.h.

Referenced by Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

SHA1 CBTInfo::m_pDataSHA1
 

Definition at line 87 of file BTInfo.h.

Referenced by Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

TIGEROOT CBTInfo::m_pDataTiger
 

Definition at line 91 of file BTInfo.h.

Referenced by Copy(), CShareazaURL::CShareazaURL(), and LoadTorrentTree().

CBTFile* CBTInfo::m_pFiles
 

Definition at line 100 of file BTInfo.h.

Referenced by CTorrentSeedDlg::BuildFiles(), CBTInfo(), CheckFiles(), Clear(), Copy(), LoadTorrentTree(), CTorrentTrackerDlg::OnInitDialog(), CDownloadTask::RunCopyTorrent(), CTorrentSeedDlg::RunSingleFile(), and Serialize().

SHA1 CBTInfo::m_pInfoSHA1
 

Definition at line 85 of file BTInfo.h.

Referenced by Copy(), CTorrentSeedDlg::CreateDownload(), CTorrentSeedDlg::CreateTarget(), CShareazaURL::CShareazaURL(), LoadTorrentTree(), CTorrentSeedDlg::OnSeed(), CTorrentTrackerDlg::OnTree(), CDownloadWithTorrent::Serialize(), Serialize(), and CDownloadWithTorrent::SetTorrent().

CBuffer CBTInfo::m_pSource [private]
 

Definition at line 115 of file BTInfo.h.

Referenced by LoadTorrentFile(), and SaveTorrentFile().

CSHA CBTInfo::m_pTestSHA1 [private]
 

Definition at line 113 of file BTInfo.h.

Referenced by AddToTest(), BeginBlockTest(), and FinishBlockTest().

CPtrArray CBTInfo::m_pTrackerList
 

Definition at line 105 of file BTInfo.h.

Referenced by Clear(), Copy(), and LoadTorrentTree().

CString CBTInfo::m_sComment
 

Definition at line 109 of file BTInfo.h.

Referenced by Copy(), LoadTorrentTree(), CTorrentTrackerDlg::OnInitDialog(), and Serialize().

CString CBTInfo::m_sCreatedBy
 

Definition at line 111 of file BTInfo.h.

Referenced by Copy(), LoadTorrentTree(), CTorrentTrackerDlg::OnInitDialog(), and Serialize().

CString CBTInfo::m_sName
 

Definition at line 98 of file BTInfo.h.

Referenced by Copy(), CTorrentSeedDlg::CreateDownload(), CShareazaURL::CShareazaURL(), LoadTorrentTree(), CDownloadsWnd::OnDownloadsLaunch(), CTorrentTrackerDlg::OnInitDialog(), CTorrentSeedDlg::OnSeed(), CDownloadWithTorrent::RunTorrent(), SaveTorrentFile(), and Serialize().

CString CBTInfo::m_sTracker
 

Definition at line 102 of file BTInfo.h.

Referenced by Copy(), LoadTorrentTree(), CDownloadsWnd::OnDownloadsTorrentInfo(), CTorrentTrackerDlg::OnInitDialog(), CTorrentTrackerDlg::OnOK(), CTorrentTrackerDlg::OnRun(), and Serialize().

DWORD CBTInfo::m_tCreationDate
 

Definition at line 110 of file BTInfo.h.

Referenced by CBTInfo(), Copy(), LoadTorrentTree(), CTorrentTrackerDlg::OnInitDialog(), and Serialize().


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