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

CED2K Class Reference

#include <ED2K.h>

List of all members.

Public Member Functions

 CED2K ()
virtual ~CED2K ()
void Clear ()
void Serialize (CArchive &ar)
DWORD GetSerialSize () const
BOOL GetRoot (MD4 *pHash) const
void BeginFile (QWORD nLength)
void AddToFile (LPCVOID pInput, DWORD nLength)
BOOL FinishFile ()
void BeginBlockTest ()
void AddToTest (LPCVOID pInput, DWORD nLength)
BOOL FinishBlockTest (DWORD nBlock)
LPCVOID GetRawPtr () const
BOOL ToBytes (BYTE **pOutput, DWORD *pnOutput)
BOOL FromBytes (BYTE *pOutput, DWORD nOutput, QWORD nSize=0)
BOOL FromRoot (MD4 *pHash)
BOOL CheckIntegrity ()
BOOL IsAvailable () const
DWORD GetBlockCount () const

Static Public Member Functions

static CString HashToString (const MD4 *pHash, BOOL bURN=FALSE)
static BOOL HashFromString (LPCTSTR pszHash, MD4 *pHash)
static BOOL HashFromURN (LPCTSTR pszHash, MD4 *pHash)

Protected Attributes

MD4 m_pRoot
MD4m_pList
DWORD m_nList
CMD4 m_pSegment
DWORD m_nCurHash
DWORD m_nCurByte


Constructor & Destructor Documentation

CED2K::CED2K  ) 
 

Definition at line 36 of file ED2K.cpp.

References m_nList, m_pList, and NULL.

CED2K::~CED2K  )  [virtual]
 

Definition at line 42 of file ED2K.cpp.

References Clear().


Member Function Documentation

void CED2K::AddToFile LPCVOID  pInput,
DWORD  nLength
 

Definition at line 129 of file ED2K.cpp.

References CMD4::Add(), ED2K_PART_SIZE, CMD4::Finish(), CMD4::GetHash(), IsAvailable(), m_nCurByte, m_nCurHash, m_nList, m_pList, m_pSegment, and CMD4::Reset().

Referenced by CLibraryBuilder::HashFile().

void CED2K::AddToTest LPCVOID  pInput,
DWORD  nLength
 

Definition at line 214 of file ED2K.cpp.

References CMD4::Add(), ED2K_PART_SIZE, IsAvailable(), m_nCurByte, and m_pSegment.

Referenced by CDownloadWithTiger::ContinueValidation().

void CED2K::BeginBlockTest  ) 
 

Definition at line 203 of file ED2K.cpp.

References IsAvailable(), m_nCurByte, m_pSegment, and CMD4::Reset().

Referenced by CDownloadWithTiger::FindNewValidationBlock().

void CED2K::BeginFile QWORD  nLength  ) 
 

Definition at line 114 of file ED2K.cpp.

References ED2K_PART_SIZE, IsAvailable(), m_nCurByte, m_nCurHash, m_nList, m_pList, m_pSegment, and CMD4::Reset().

Referenced by CLibraryBuilder::HashFile().

BOOL CED2K::CheckIntegrity  ) 
 

Definition at line 310 of file ED2K.cpp.

References CMD4::Add(), CMD4::Finish(), CMD4::GetHash(), IsAvailable(), m_nList, m_pList, and m_pRoot.

void CED2K::Clear  ) 
 

Definition at line 50 of file ED2K.cpp.

References m_nList, m_pList, m_pRoot, and NULL.

Referenced by CDownloadWithTiger::ClearVerification(), FromBytes(), FromRoot(), CHashDatabase::GetED2K(), Serialize(), CDownloadWithTiger::SetHashset(), and ~CED2K().

BOOL CED2K::FinishBlockTest DWORD  nBlock  ) 
 

Definition at line 228 of file ED2K.cpp.

References CMD4::Finish(), CMD4::GetHash(), IsAvailable(), m_nList, m_pList, and m_pSegment.

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

BOOL CED2K::FinishFile  ) 
 

Definition at line 165 of file ED2K.cpp.

References CMD4::Add(), ED2K_PART_SIZE, CMD4::Finish(), CMD4::GetHash(), IsAvailable(), m_nCurByte, m_nList, m_pList, m_pRoot, m_pSegment, and CMD4::Reset().

Referenced by CLibraryBuilder::HashFile().

BOOL CED2K::FromBytes BYTE *  pOutput,
DWORD  nOutput,
QWORD  nSize = 0
 

Definition at line 263 of file ED2K.cpp.

References CMD4::Add(), Clear(), ED2K_PART_SIZE, CMD4::Finish(), CMD4::GetHash(), m_nList, m_pList, m_pRoot, and NULL.

Referenced by CEDPartImporter::ImportFile(), and CDownloadWithTiger::SetHashset().

BOOL CED2K::FromRoot MD4 pHash  ) 
 

Definition at line 295 of file ED2K.cpp.

References Clear(), m_nList, m_pList, and m_pRoot.

Referenced by CEDPartImporter::ImportFile(), and CDownloadWithTiger::SetHashset().

DWORD CED2K::GetBlockCount  )  const [inline]
 

Definition at line 65 of file ED2K.h.

References m_nList.

Referenced by CEDClient::OnHashsetRequest(), and CDownloadWithTiger::SetHashset().

LPCVOID CED2K::GetRawPtr  )  const
 

Definition at line 255 of file ED2K.cpp.

References m_pList.

Referenced by CEDClient::OnHashsetRequest().

BOOL CED2K::GetRoot MD4 pHash  )  const
 

Definition at line 104 of file ED2K.cpp.

References m_pRoot.

Referenced by CLibraryFile::GetED2K(), CLibraryBuilder::HashFile(), CEDPartImporter::ImportFile(), and CDownloadWithTiger::SetHashset().

DWORD CED2K::GetSerialSize  )  const
 

Definition at line 93 of file ED2K.cpp.

References m_nList.

Referenced by CHashDatabase::StoreED2K().

BOOL CED2K::HashFromString LPCTSTR  pszHash,
MD4 pHash
[static]
 

Definition at line 353 of file ED2K.cpp.

Referenced by CDownloadEditDlg::Commit(), HashFromURN(), CShareazaURL::ParseDonkeyFile(), and CSourceURL::ParseED2KFTP().

BOOL CED2K::HashFromURN LPCTSTR  pszHash,
MD4 pHash
[static]
 

Definition at line 380 of file ED2K.cpp.

References HashFromString(), and NULL.

Referenced by CQuerySearch::BuildWordList(), CDownloads::FindByURN(), CCollectionFile::FindByURN(), CUploadTransfer::HashesFromURN(), CLibraryMaps::LookupFileByURN(), CNewSearchDlg::OnChangeSearch(), CDownloadTransferHTTP::OnHeaderLine(), CCollectionFile::File::Parse(), CShareazaURL::ParseMagnet(), CShareazaURL::ParseShareazaFile(), CQuerySearch::ReadG1Packet(), and CQueryHit::ReadG1Packet().

CString CED2K::HashToString const MD4 pHash,
BOOL  bURN = FALSE
[static]
 

Definition at line 335 of file ED2K.cpp.

Referenced by CLibraryDictionary::Add(), CLocalSearch::AddHitG1(), CQueryHashMaster::Build(), CLibraryDictionary::BuildHashTable(), CDownloadSource::CDownloadSource(), CQueryHashTable::Check(), CCollectionExportDlg::CreateXML(), CDownloadBase::GenerateLocalName(), CMatchListView::GetNext(), CEDClient::GetSourceURL(), CMatchFile::GetURN(), CEDPartImporter::ImportFile(), CMatchTipCtrl::LoadFromFile(), CMatchTipCtrl::LoadFromHit(), CURLExportDlg::OnCopy(), CEDClient::OnFileRequest(), CEDClient::OnFileStatusRequest(), CEDClient::OnHashsetRequest(), CURLCopyDlg::OnIncludeSelf(), CFileGeneralPage::OnInitDialog(), CDownloadEditDlg::OnInitDialog(), CLibraryTipCtrl::OnPrepare(), CSearchMonitorWnd::OnQuerySearch(), CURLExportDlg::OnSave(), CShareazaURL::ParseDonkeyFile(), CDownloadTipCtrl::PrepareFileInfo(), CUploadTransferED2K::Request(), CUploadTransferHTTP::RequestPreview(), CQueryHit::Resolve(), CUploadTransferHTTP::SendFileHeaders(), CQuerySearch::ToEDPacket(), CQuerySearch::ToG1Packet(), CURLActionDlg::Update(), and CSearchWnd::UpdateMessages().

BOOL CED2K::IsAvailable  )  const [inline]
 

Definition at line 64 of file ED2K.h.

References m_pList, and NULL.

Referenced by AddToFile(), AddToTest(), BeginBlockTest(), BeginFile(), CheckIntegrity(), FinishBlockTest(), FinishFile(), CDownloadWithTiger::GetHashset(), CEDPartImporter::ImportFile(), CDownloadWithTiger::NeedHashset(), CDownloadWithTiger::Serialize(), and CDownloadWithTiger::SetHashset().

void CED2K::Serialize CArchive &  ar  ) 
 

Definition at line 61 of file ED2K.cpp.

References Clear(), m_nList, m_pList, and m_pRoot.

Referenced by CHashDatabase::GetED2K(), CDownloadWithTiger::Serialize(), and CHashDatabase::StoreED2K().

BOOL CED2K::ToBytes BYTE **  pOutput,
DWORD *  pnOutput
 

Definition at line 244 of file ED2K.cpp.

References m_nList, and m_pList.

Referenced by CEDPartImporter::ImportFile().


Member Data Documentation

DWORD CED2K::m_nCurByte [protected]
 

Definition at line 75 of file ED2K.h.

Referenced by AddToFile(), AddToTest(), BeginBlockTest(), BeginFile(), and FinishFile().

DWORD CED2K::m_nCurHash [protected]
 

Definition at line 74 of file ED2K.h.

Referenced by AddToFile(), and BeginFile().

DWORD CED2K::m_nList [protected]
 

Definition at line 71 of file ED2K.h.

Referenced by AddToFile(), BeginFile(), CED2K(), CheckIntegrity(), Clear(), FinishBlockTest(), FinishFile(), FromBytes(), FromRoot(), GetBlockCount(), GetSerialSize(), Serialize(), and ToBytes().

MD4* CED2K::m_pList [protected]
 

Definition at line 70 of file ED2K.h.

Referenced by AddToFile(), BeginFile(), CED2K(), CheckIntegrity(), Clear(), FinishBlockTest(), FinishFile(), FromBytes(), FromRoot(), GetRawPtr(), IsAvailable(), Serialize(), and ToBytes().

MD4 CED2K::m_pRoot [protected]
 

Definition at line 69 of file ED2K.h.

Referenced by CheckIntegrity(), Clear(), FinishFile(), FromBytes(), FromRoot(), GetRoot(), and Serialize().

CMD4 CED2K::m_pSegment [protected]
 

Definition at line 73 of file ED2K.h.

Referenced by AddToFile(), AddToTest(), BeginBlockTest(), BeginFile(), FinishBlockTest(), and FinishFile().


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