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

CCollectionFile Class Reference

#include <CollectionFile.h>

Inheritance diagram for CCollectionFile:

CComObject List of all members.

Public Member Functions

 CCollectionFile ()
virtual ~CCollectionFile ()
BOOL Open (LPCTSTR pszFile)
BOOL Attach (HANDLE hFile)
void Close ()
File * FindByURN (LPCTSTR pszURN)
File * FindFile (CLibraryFile *pShared, BOOL bApply=FALSE)
int GetMissingCount ()
BOOL IsOpen () const
POSITION GetFileIterator () const
File * GetNextFile (POSITION &pos) const
int GetFileCount () const
CString GetTitle () const
CString GetThisURI () const
CString GetParentURI () const
CXMLElement * GetMetadata () const

Protected Member Functions

BOOL LoadManifest (CZIPFile &pZIP)

Static Protected Member Functions

static CXMLElement * CloneMetadata (CXMLElement *pMetadata)

Protected Attributes

CPtrList m_pFiles
CString m_sTitle
CString m_sThisURI
CString m_sParentURI
CXMLElement * m_pMetadata

Classes

class  File

Constructor & Destructor Documentation

CCollectionFile::CCollectionFile (   ) 
 

Definition at line 54 of file CollectionFile.cpp.

References NULL.

CCollectionFile::~CCollectionFile (   )  [virtual]
 

Definition at line 59 of file CollectionFile.cpp.

References Close().


Member Function Documentation

BOOL CCollectionFile::Attach (  HANDLE  hFile  ) 
 

Definition at line 74 of file CollectionFile.cpp.

References CZIPFile::Attach(), Close(), and LoadManifest().

Referenced by CLibraryBuilderInternals::ReadCollection().

CXMLElement * CCollectionFile::CloneMetadata (  CXMLElement *  pMetadata  )  [static, protected]
 

Definition at line 228 of file CollectionFile.cpp.

References CXMLElement::AddAttribute(), CXMLElement::AddElement(), CXMLElement::Clone(), CSchemaCache::Get(), CXMLElement::GetAttributeValue(), CXMLElement::GetFirstElement(), CXMLNode::GetName(), NULL, SchemaCache, CXMLAttribute::schemaName, and CXMLNode::SetName().

Referenced by LoadManifest(), and CCollectionFile::File::Parse().

void CCollectionFile::Close (   ) 
 

Definition at line 84 of file CollectionFile.cpp.

References GetFileIterator(), GetNextFile(), m_pFiles, m_pMetadata, m_sParentURI, m_sThisURI, m_sTitle, and NULL.

Referenced by Attach(), LoadManifest(), CLibraryCollectionView::OnDestroy(), Open(), CLibraryCollectionView::ShowCollection(), and ~CCollectionFile().

CCollectionFile::File * CCollectionFile::FindByURN (  LPCTSTR  pszURN  ) 
 

Definition at line 100 of file CollectionFile.cpp.

References GetFileIterator(), GetNextFile(), CED2K::HashFromURN(), CTigerNode::HashFromURN(), CMD5::HashFromURN(), CSHA::HashFromURN(), CCollectionFile::File::m_bED2K, CCollectionFile::File::m_bMD5, CCollectionFile::File::m_bSHA1, CCollectionFile::File::m_bTiger, CCollectionFile::File::m_pED2K, CCollectionFile::File::m_pMD5, CCollectionFile::File::m_pSHA1, CCollectionFile::File::m_pTiger, MD5, NULL, and pTiger.

CCollectionFile::File * CCollectionFile::FindFile (  CLibraryFile *  pShared,
BOOL  bApply = FALSE
) 
 

Definition at line 125 of file CollectionFile.cpp.

References CCollectionFile::File::ApplyMetadata(), GetFileIterator(), GetNextFile(), CCollectionFile::File::m_bED2K, CLibraryFile::m_bED2K, CCollectionFile::File::m_bMD5, CLibraryFile::m_bMD5, CCollectionFile::File::m_bSHA1, CLibraryFile::m_bSHA1, CCollectionFile::File::m_bTiger, CLibraryFile::m_bTiger, CCollectionFile::File::m_pED2K, CLibraryFile::m_pED2K, CCollectionFile::File::m_pMD5, CLibraryFile::m_pMD5, CCollectionFile::File::m_pSHA1, CLibraryFile::m_pSHA1, CCollectionFile::File::m_pTiger, CLibraryFile::m_pTiger, and NULL.

Referenced by CAlbumFolder::OrganiseFile(), and CAlbumFolder::SetCollection().

int CCollectionFile::GetFileCount (   )  const [inline]
 

Definition at line 111 of file CollectionFile.h.

References m_pFiles.

POSITION CCollectionFile::GetFileIterator (   )  const [inline]
 

Definition at line 101 of file CollectionFile.h.

References m_pFiles.

Referenced by Close(), FindByURN(), FindFile(), GetMissingCount(), and CLibraryCollectionView::OnLibraryFolderDownload().

CXMLElement* CCollectionFile::GetMetadata (   )  const [inline]
 

Definition at line 131 of file CollectionFile.h.

References m_pMetadata.

Referenced by CLibraryBuilderInternals::ReadCollection(), and CAlbumFolder::SetCollection().

int CCollectionFile::GetMissingCount (   ) 
 

Definition at line 147 of file CollectionFile.cpp.

References GetFileIterator(), GetNextFile(), CCollectionFile::File::IsComplete(), and CCollectionFile::File::IsDownloading().

Referenced by CLibraryCollectionView::OnUpdateLibraryFolderDownload().

File* CCollectionFile::GetNextFile (  POSITION &  pos  )  const [inline]
 

Definition at line 106 of file CollectionFile.h.

References m_pFiles.

Referenced by Close(), FindByURN(), FindFile(), GetMissingCount(), and CLibraryCollectionView::OnLibraryFolderDownload().

CString CCollectionFile::GetParentURI (   )  const [inline]
 

Definition at line 126 of file CollectionFile.h.

References m_sParentURI.

Referenced by CLibraryFolders::MountCollection().

CString CCollectionFile::GetThisURI (   )  const [inline]
 

Definition at line 121 of file CollectionFile.h.

References m_sThisURI.

Referenced by CLibraryFolders::MountCollection(), CAlbumFolder::MountCollection(), and CLibraryBuilderInternals::ReadCollection().

CString CCollectionFile::GetTitle (   )  const [inline]
 

Definition at line 116 of file CollectionFile.h.

References m_sTitle.

Referenced by CAlbumFolder::MountCollection(), and CLibraryWnd::OnCollection().

BOOL CCollectionFile::IsOpen (   )  const [inline]
 

Definition at line 96 of file CollectionFile.h.

References m_pFiles.

Referenced by CLibraryCollectionView::ShowCollection().

BOOL CCollectionFile::LoadManifest (  CZIPFile &  pZIP  )  [protected]
 

Definition at line 163 of file CollectionFile.cpp.

References CloneMetadata(), Close(), CZIPFile::File::Decompress(), CXMLElement::FromString(), CXMLElement::GetAttributeValue(), CXMLElement::GetElementByName(), CXMLElement::GetElementIterator(), CZIPFile::GetFile(), CXMLElement::GetNextElement(), CXMLNode::IsNamed(), CBuffer::m_nLength, m_pFiles, m_pMetadata, m_sParentURI, m_sThisURI, m_sTitle, NULL, CCollectionFile::File::Parse(), CBuffer::ReadString(), and CXMLAttribute::schemaName.

Referenced by Attach(), and Open().

BOOL CCollectionFile::Open (  LPCTSTR  pszFile  ) 
 

Definition at line 67 of file CollectionFile.cpp.

References Close(), LoadManifest(), and CZIPFile::Open().

Referenced by CAlbumFolder::GetCollection(), CLibraryWnd::OnCollection(), and CLibraryCollectionView::ShowCollection().


Member Data Documentation

CPtrList CCollectionFile::m_pFiles [protected]
 

Definition at line 88 of file CollectionFile.h.

Referenced by Close(), GetFileCount(), GetFileIterator(), GetNextFile(), IsOpen(), and LoadManifest().

CXMLElement* CCollectionFile::m_pMetadata [protected]
 

Definition at line 92 of file CollectionFile.h.

Referenced by Close(), GetMetadata(), and LoadManifest().

CString CCollectionFile::m_sParentURI [protected]
 

Definition at line 91 of file CollectionFile.h.

Referenced by Close(), GetParentURI(), and LoadManifest().

CString CCollectionFile::m_sThisURI [protected]
 

Definition at line 90 of file CollectionFile.h.

Referenced by Close(), GetThisURI(), and LoadManifest().

CString CCollectionFile::m_sTitle [protected]
 

Definition at line 89 of file CollectionFile.h.

Referenced by Close(), GetTitle(), and LoadManifest().


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