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

CLibraryBuilder Class Reference

#include <LibraryBuilder.h>

List of all members.

Public Member Functions

 CLibraryBuilder ()
virtual ~CLibraryBuilder ()
void Add (CLibraryFile *pFile)
void Remove (CLibraryFile *pFile)
int GetRemaining ()
CString GetCurrentFile ()
void RequestPriority (LPCTSTR pszPath)
void Clear ()
BOOL StartThread ()
void StopThread ()
void BoostPriority (BOOL bPriority)
BOOL GetBoostPriority ()
void UpdateStatus (CString *pStr, int *pRemaining)

Protected Member Functions

void OnRun ()
BOOL HashFile (HANDLE hFile, BOOL bPriority, SHA1 *pSHA1)
BOOL SubmitMetadata (LPCTSTR pszSchemaURI, CXMLElement *&pXML)
BOOL SubmitCorrupted ()
BOOL DetectVirtualFile (HANDLE hFile, QWORD &nOffset, QWORD &nLength)
BOOL DetectVirtualID3v1 (HANDLE hFile, QWORD &nOffset, QWORD &nLength)
BOOL DetectVirtualID3v2 (HANDLE hFile, QWORD &nOffset, QWORD &nLength)

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CCriticalSection m_pSection
CPtrList m_pFiles
CStringList m_pPriority
HANDLE m_hThread
BOOL m_bThread
BOOL m_bPriority
DWORD m_nHashSleep
DWORD m_nIndex
CString m_sPath
DWORD m_tActive
BYTE * m_pBuffer
CLibraryBuilderInternalsm_pInternals
CLibraryBuilderPluginsm_pPlugins

Friends

class CLibraryBuilderInternals
class CLibraryBuilderPlugins


Constructor & Destructor Documentation

CLibraryBuilder::CLibraryBuilder  ) 
 

Definition at line 55 of file LibraryBuilder.cpp.

References CLibraryBuilderInternals, CLibraryBuilderPlugins, m_bPriority, m_bThread, m_hThread, m_nHashSleep, m_nIndex, m_pBuffer, m_pInternals, m_pPlugins, m_tActive, and NULL.

CLibraryBuilder::~CLibraryBuilder  )  [virtual]
 

Definition at line 69 of file LibraryBuilder.cpp.

References Clear(), m_pBuffer, m_pInternals, m_pPlugins, and StopThread().


Member Function Documentation

void CLibraryBuilder::Add CLibraryFile pFile  ) 
 

Definition at line 82 of file LibraryBuilder.cpp.

References m_bThread, m_pFiles, m_pSection, NULL, and StartThread().

Referenced by CLibrary::AddFile().

void CLibraryBuilder::BoostPriority BOOL  bPriority  ) 
 

Definition at line 220 of file LibraryBuilder.cpp.

References m_bPriority, m_bThread, m_hThread, and NULL.

Referenced by CLibrary::Load(), CMainWnd::OnLibraryHashPriority(), and CLibrarySettingsPage::OnOK().

void CLibraryBuilder::Clear  ) 
 

Definition at line 157 of file LibraryBuilder.cpp.

References m_pFiles, m_pPriority, and m_pSection.

Referenced by ~CLibraryBuilder().

BOOL CLibraryBuilder::DetectVirtualFile HANDLE  hFile,
QWORD nOffset,
QWORD nLength
[protected]
 

Definition at line 528 of file LibraryBuilder.cpp.

References _tcsistr(), DetectVirtualID3v1(), DetectVirtualID3v2(), m_sPath, and NULL.

Referenced by HashFile().

BOOL CLibraryBuilder::DetectVirtualID3v1 HANDLE  hFile,
QWORD nOffset,
QWORD nLength
[protected]
 

Definition at line 541 of file LibraryBuilder.cpp.

References ID3V1_TAG, and NULL.

Referenced by DetectVirtualFile().

BOOL CLibraryBuilder::DetectVirtualID3v2 HANDLE  hFile,
QWORD nOffset,
QWORD nLength
[protected]
 

Definition at line 562 of file LibraryBuilder.cpp.

References ID3_DESYNC_SIZE, ID3V2_FOOTERPRESENT, ID3V2_KNOWNMASK, ID3V2_TAG, ID3V2_UNSYNCHRONISED, NULL, and SWAP_LONG.

Referenced by DetectVirtualFile().

BOOL CLibraryBuilder::GetBoostPriority  ) 
 

Definition at line 232 of file LibraryBuilder.cpp.

References m_bPriority.

Referenced by CMainWnd::OnLibraryHashPriority(), CMainWnd::OnUpdateLibraryHashPriority(), and CHomeLibraryBox::Update().

CString CLibraryBuilder::GetCurrentFile  ) 
 

Definition at line 118 of file LibraryBuilder.cpp.

References m_bThread, m_pSection, and m_sPath.

int CLibraryBuilder::GetRemaining  ) 
 

Definition at line 109 of file LibraryBuilder.cpp.

References m_bThread, m_pFiles, and m_pSection.

Referenced by CHomeLibraryBox::Update().

BOOL CLibraryBuilder::HashFile HANDLE  hFile,
BOOL  bPriority,
SHA1 pSHA1
[protected]
 

Definition at line 373 of file LibraryBuilder.cpp.

References CMD5::Add(), CSHA::Add(), CLibrary::AddFile(), CED2K::AddToFile(), CTigerTree::AddToFile(), CED2K::BeginFile(), CTigerTree::BeginFile(), CLibraryMaps::CullDeletedFiles(), DetectVirtualFile(), CMD5::Finish(), CSHA::Finish(), CED2K::FinishFile(), CTigerTree::FinishFile(), CMD5::GetHash(), CSHA::GetHash(), CED2K::GetRoot(), CTigerTree::GetRoot(), Library, CSettings::Library, LibraryHashDB, LibraryMaps, CLibrary::LookupFile(), m_bPriority, m_bThread, m_nHashSleep, m_nIndex, m_pBuffer, CLibrary::m_pSection, NULL, pTiger, CLibrary::RemoveFile(), Settings, CHashDatabase::StoreED2K(), CHashDatabase::StoreTiger(), CSettings::sLibrary::TigerHeight, CLibrary::Update(), and CSettings::sLibrary::VirtualFiles.

Referenced by OnRun().

void CLibraryBuilder::OnRun  )  [protected]
 

Definition at line 267 of file LibraryBuilder.cpp.

References CLibraryBuilderPlugins::Cleanup(), CLibraryBuilderInternals::ExtractMetadata(), CLibraryBuilderPlugins::ExtractMetadata(), HashFile(), Library, CLibrary::LookupFile(), m_bThread, m_nIndex, m_pBuffer, m_pFiles, m_pInternals, m_pPlugins, m_pPriority, CLibrary::m_pSection, m_pSection, m_sPath, m_tActive, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

Referenced by ThreadStart().

void CLibraryBuilder::Remove CLibraryFile pFile  ) 
 

Definition at line 92 of file LibraryBuilder.cpp.

References CLibraryFile::GetPath(), CLibraryFile::m_nIndex, m_pFiles, m_pPriority, and m_pSection.

Referenced by CLibrary::RemoveFile().

void CLibraryBuilder::RequestPriority LPCTSTR  pszPath  ) 
 

Definition at line 146 of file LibraryBuilder.cpp.

References m_pPriority, m_pSection, and NULL.

Referenced by CLibraryWnd::OnCollection(), and CDownload::OnMoved().

BOOL CLibraryBuilder::StartThread  ) 
 

Definition at line 168 of file LibraryBuilder.cpp.

References CLibraryBuilderInternals::LoadSettings(), m_bPriority, m_bThread, m_hThread, m_pFiles, m_pInternals, m_pSection, m_tActive, NULL, and ThreadStart().

Referenced by Add(), and CLibrary::StartThread().

void CLibraryBuilder::StopThread  ) 
 

Definition at line 191 of file LibraryBuilder.cpp.

References m_bThread, m_hThread, m_tActive, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

Referenced by CLibrary::StopThread(), and ~CLibraryBuilder().

BOOL CLibraryBuilder::SubmitCorrupted  )  [protected]
 

Definition at line 513 of file LibraryBuilder.cpp.

References Library, CLibrary::LookupFile(), m_nIndex, and CLibrary::m_pSection.

Referenced by CLibraryBuilderPlugins::ExtractMetadata(), and CLibraryBuilderInternals::SubmitCorrupted().

BOOL CLibraryBuilder::SubmitMetadata LPCTSTR  pszSchemaURI,
CXMLElement *&  pXML
[protected]
 

Definition at line 464 of file LibraryBuilder.cpp.

References CXMLElement::AddElement(), CLibrary::AddFile(), CXMLElement::Detach(), CSchemaCache::Get(), CSchema::Instantiate(), Library, CLibrary::LookupFile(), m_nIndex, CLibrary::m_pSection, NULL, CLibrary::RemoveFile(), SchemaCache, CLibrary::Update(), and CSchema::Validate().

Referenced by CLibraryBuilderPlugins::ExtractMetadata(), and CLibraryBuilderInternals::SubmitMetadata().

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

Definition at line 260 of file LibraryBuilder.cpp.

References OnRun().

Referenced by StartThread().

void CLibraryBuilder::UpdateStatus CString *  pStr,
int *  pRemaining
 

Definition at line 127 of file LibraryBuilder.cpp.

References m_bThread, m_pFiles, m_pSection, m_sPath, and NULL.

Referenced by CHashProgressBar::Run().


Friends And Related Function Documentation

friend class CLibraryBuilderInternals [friend]
 

Definition at line 81 of file LibraryBuilder.h.

Referenced by CLibraryBuilder().

friend class CLibraryBuilderPlugins [friend]
 

Definition at line 82 of file LibraryBuilder.h.

Referenced by CLibraryBuilder().


Member Data Documentation

BOOL CLibraryBuilder::m_bPriority [protected]
 

Definition at line 47 of file LibraryBuilder.h.

Referenced by BoostPriority(), CLibraryBuilder(), GetBoostPriority(), HashFile(), CLibraryBuilderInternals::ScanMP3Frame(), and StartThread().

BOOL CLibraryBuilder::m_bThread [protected]
 

Definition at line 46 of file LibraryBuilder.h.

Referenced by Add(), BoostPriority(), CLibraryBuilder(), GetCurrentFile(), GetRemaining(), HashFile(), OnRun(), CLibraryBuilderInternals::ReadOGG(), CLibraryBuilderInternals::ScanMP3Frame(), StartThread(), StopThread(), and UpdateStatus().

HANDLE CLibraryBuilder::m_hThread [protected]
 

Definition at line 45 of file LibraryBuilder.h.

Referenced by BoostPriority(), CLibraryBuilder(), StartThread(), and StopThread().

DWORD CLibraryBuilder::m_nHashSleep [protected]
 

Definition at line 48 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), and HashFile().

DWORD CLibraryBuilder::m_nIndex [protected]
 

Definition at line 49 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), HashFile(), OnRun(), SubmitCorrupted(), and SubmitMetadata().

BYTE* CLibraryBuilder::m_pBuffer [protected]
 

Definition at line 52 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), HashFile(), OnRun(), and ~CLibraryBuilder().

CPtrList CLibraryBuilder::m_pFiles [protected]
 

Definition at line 43 of file LibraryBuilder.h.

Referenced by Add(), Clear(), GetRemaining(), OnRun(), Remove(), StartThread(), and UpdateStatus().

CLibraryBuilderInternals* CLibraryBuilder::m_pInternals [protected]
 

Definition at line 54 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), OnRun(), StartThread(), and ~CLibraryBuilder().

CLibraryBuilderPlugins* CLibraryBuilder::m_pPlugins [protected]
 

Definition at line 55 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), OnRun(), and ~CLibraryBuilder().

CStringList CLibraryBuilder::m_pPriority [protected]
 

Definition at line 44 of file LibraryBuilder.h.

Referenced by Clear(), OnRun(), Remove(), and RequestPriority().

CCriticalSection CLibraryBuilder::m_pSection [protected]
 

Definition at line 42 of file LibraryBuilder.h.

Referenced by Add(), Clear(), GetCurrentFile(), GetRemaining(), OnRun(), Remove(), RequestPriority(), StartThread(), and UpdateStatus().

CString CLibraryBuilder::m_sPath [protected]
 

Definition at line 50 of file LibraryBuilder.h.

Referenced by DetectVirtualFile(), GetCurrentFile(), OnRun(), and UpdateStatus().

DWORD CLibraryBuilder::m_tActive [protected]
 

Definition at line 51 of file LibraryBuilder.h.

Referenced by CLibraryBuilder(), OnRun(), StartThread(), and StopThread().


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