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

CHashDatabase Class Reference

#include <HashDatabase.h>

List of all members.

Public Member Functions

 CHashDatabase ()
virtual ~CHashDatabase ()
BOOL Create ()
void Close ()
BOOL DeleteAll (DWORD nIndex)
BOOL GetTiger (DWORD nIndex, CTigerTree *pTree)
BOOL StoreTiger (DWORD nIndex, CTigerTree *pTree)
BOOL DeleteTiger (DWORD nIndex)
BOOL GetED2K (DWORD nIndex, CED2K *pSet)
BOOL StoreED2K (DWORD nIndex, CED2K *pSet)
BOOL DeleteED2K (DWORD nIndex)

Protected Member Functions

HASHDB_INDEXLookup (DWORD nIndex, DWORD nType)
HASHDB_INDEXPrepareToStore (DWORD nIndex, DWORD nType, DWORD nLength)
BOOL Erase (DWORD nIndex, DWORD nType)
void Commit ()

Protected Attributes

CCriticalSection m_pSection
CString m_sPath
CFile m_pFile
BOOL m_bOpen
DWORD m_nOffset
HASHDB_INDEXm_pIndex
DWORD m_nIndex
DWORD m_nBuffer


Constructor & Destructor Documentation

CHashDatabase::CHashDatabase  ) 
 

Definition at line 41 of file HashDatabase.cpp.

References m_bOpen, m_nBuffer, m_nIndex, m_nOffset, m_pIndex, and NULL.

CHashDatabase::~CHashDatabase  )  [virtual]
 

Definition at line 50 of file HashDatabase.cpp.

References Close().


Member Function Documentation

void CHashDatabase::Close  ) 
 

Definition at line 127 of file HashDatabase.cpp.

References m_bOpen, m_nBuffer, m_nIndex, m_nOffset, m_pFile, m_pIndex, m_pSection, and NULL.

Referenced by Create(), and ~CHashDatabase().

void CHashDatabase::Commit  )  [protected]
 

Definition at line 238 of file HashDatabase.cpp.

References HASHDB_INDEX, m_bOpen, m_nIndex, m_nOffset, m_pFile, and m_pIndex.

Referenced by DeleteAll(), Erase(), StoreED2K(), and StoreTiger().

BOOL CHashDatabase::Create  ) 
 

Definition at line 58 of file HashDatabase.cpp.

References Close(), CSettings::General, HASH_TIGERTREE, HASHDB_INDEX, m_bOpen, m_nBuffer, m_nIndex, m_nOffset, m_pFile, m_pIndex, m_pSection, m_sPath, Settings, and CSettings::sGeneral::UserPath.

Referenced by CLibrary::Load().

BOOL CHashDatabase::DeleteAll DWORD  nIndex  ) 
 

Definition at line 256 of file HashDatabase.cpp.

References Commit(), HASHDB_INDEX, m_bOpen, m_nIndex, m_pIndex, and m_pSection.

Referenced by CLibrary::OnFileDelete().

BOOL CHashDatabase::DeleteED2K DWORD  nIndex  ) 
 

Definition at line 393 of file HashDatabase.cpp.

References Erase(), HASH_ED2K, m_bOpen, and m_pSection.

Referenced by CLibraryFile::GetED2K().

BOOL CHashDatabase::DeleteTiger DWORD  nIndex  ) 
 

Definition at line 332 of file HashDatabase.cpp.

References Erase(), HASH_TIGERTREE, m_bOpen, and m_pSection.

Referenced by CLibraryFile::GetTigerTree().

BOOL CHashDatabase::Erase DWORD  nIndex,
DWORD  nType
[protected]
 

Definition at line 223 of file HashDatabase.cpp.

References Commit(), HASHDB_INDEX, Lookup(), m_bOpen, and NULL.

Referenced by DeleteED2K(), and DeleteTiger().

BOOL CHashDatabase::GetED2K DWORD  nIndex,
CED2K pSet
 

Definition at line 342 of file HashDatabase.cpp.

References CED2K::Clear(), HASH_ED2K, HASHDB_INDEX, Lookup(), m_bOpen, m_pFile, m_pSection, NULL, and CED2K::Serialize().

Referenced by CLibraryFile::GetED2K().

BOOL CHashDatabase::GetTiger DWORD  nIndex,
CTigerTree pTree
 

Definition at line 281 of file HashDatabase.cpp.

References CTigerTree::Clear(), HASH_TIGERTREE, HASHDB_INDEX, Lookup(), m_bOpen, m_pFile, m_pSection, NULL, and CTigerTree::Serialize().

Referenced by CLibraryFile::GetTigerTree().

HASHDB_INDEX * CHashDatabase::Lookup DWORD  nIndex,
DWORD  nType
[protected]
 

Definition at line 144 of file HashDatabase.cpp.

References HASHDB_INDEX, m_bOpen, m_nIndex, m_pIndex, and NULL.

Referenced by Erase(), GetED2K(), GetTiger(), and PrepareToStore().

HASHDB_INDEX * CHashDatabase::PrepareToStore DWORD  nIndex,
DWORD  nType,
DWORD  nLength
[protected]
 

Definition at line 160 of file HashDatabase.cpp.

References HASHDB_INDEX, Lookup(), m_bOpen, m_nBuffer, m_nIndex, m_nOffset, m_pIndex, and NULL.

Referenced by StoreED2K(), and StoreTiger().

BOOL CHashDatabase::StoreED2K DWORD  nIndex,
CED2K pSet
 

Definition at line 367 of file HashDatabase.cpp.

References Commit(), CED2K::GetSerialSize(), HASH_ED2K, HASHDB_INDEX, m_bOpen, m_pFile, m_pSection, NULL, PrepareToStore(), and CED2K::Serialize().

Referenced by CLibraryBuilder::HashFile().

BOOL CHashDatabase::StoreTiger DWORD  nIndex,
CTigerTree pTree
 

Definition at line 306 of file HashDatabase.cpp.

References Commit(), CTigerTree::GetSerialSize(), HASH_TIGERTREE, HASHDB_INDEX, m_bOpen, m_pFile, m_pSection, NULL, PrepareToStore(), and CTigerTree::Serialize().

Referenced by CLibraryBuilder::HashFile().


Member Data Documentation

BOOL CHashDatabase::m_bOpen [protected]
 

Definition at line 59 of file HashDatabase.h.

Referenced by CHashDatabase(), Close(), Commit(), Create(), DeleteAll(), DeleteED2K(), DeleteTiger(), Erase(), GetED2K(), GetTiger(), Lookup(), PrepareToStore(), StoreED2K(), and StoreTiger().

DWORD CHashDatabase::m_nBuffer [protected]
 

Definition at line 64 of file HashDatabase.h.

Referenced by CHashDatabase(), Close(), Create(), and PrepareToStore().

DWORD CHashDatabase::m_nIndex [protected]
 

Definition at line 63 of file HashDatabase.h.

Referenced by CHashDatabase(), Close(), Commit(), Create(), DeleteAll(), Lookup(), and PrepareToStore().

DWORD CHashDatabase::m_nOffset [protected]
 

Definition at line 61 of file HashDatabase.h.

Referenced by CHashDatabase(), Close(), Commit(), Create(), and PrepareToStore().

CFile CHashDatabase::m_pFile [protected]
 

Definition at line 58 of file HashDatabase.h.

Referenced by Close(), Commit(), Create(), GetED2K(), GetTiger(), StoreED2K(), and StoreTiger().

HASHDB_INDEX* CHashDatabase::m_pIndex [protected]
 

Definition at line 62 of file HashDatabase.h.

Referenced by CHashDatabase(), Close(), Commit(), Create(), DeleteAll(), Lookup(), and PrepareToStore().

CCriticalSection CHashDatabase::m_pSection [protected]
 

Definition at line 55 of file HashDatabase.h.

Referenced by Close(), Create(), DeleteAll(), DeleteED2K(), DeleteTiger(), GetED2K(), GetTiger(), StoreED2K(), and StoreTiger().

CString CHashDatabase::m_sPath [protected]
 

Definition at line 57 of file HashDatabase.h.

Referenced by Create().


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