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

CAlbumFolder Class Reference

#include <AlbumFolder.h>

Inheritance diagram for CAlbumFolder:

CComObject List of all members.

Public Member Functions

 CAlbumFolder (CAlbumFolder *pParent=NULL, LPCTSTR pszSchemaURI=NULL, LPCTSTR pszName=NULL, BOOL bAutoDelete=FALSE)
virtual ~CAlbumFolder ()
CAlbumFolderAddFolder (LPCTSTR pszSchemaURI=NULL, LPCTSTR pszName=NULL, BOOL bAutoDelete=FALSE)
POSITION GetFolderIterator () const
CAlbumFolderGetNextFolder (POSITION &pos) const
CAlbumFolderGetFolder (LPCTSTR pszName) const
CAlbumFolderGetFolderByURI (LPCTSTR pszURI) const
int GetFolderCount () const
BOOL CheckFolder (CAlbumFolder *pFolder, BOOL bRecursive=FALSE) const
CAlbumFolderGetTarget (CSchemaMember *pMember, LPCTSTR pszValue) const
CAlbumFolderFindCollection (SHA1 *pSHA1)
void AddFile (CLibraryFile *pFile)
POSITION GetFileIterator () const
CLibraryFileGetNextFile (POSITION &pos) const
int GetFileCount () const
int GetSharedCount () const
void RemoveFile (CLibraryFile *pFile)
CAlbumFolderFindFile (CLibraryFile *pFile) const
int GetFileList (CLibraryList *pList, BOOL bRecursive) const
void Delete (BOOL bIfEmpty=FALSE)
BOOL SetMetadata (CXMLElement *pXML)
BOOL MetaFromFile (CLibraryFile *pFile)
BOOL MetaToFiles (BOOL bAggressive=FALSE)
BOOL OrganiseFile (CLibraryFile *pFile)
BOOL MountCollection (SHA1 *pSHA1, CCollectionFile *pCollection, BOOL bForce=FALSE)
CCollectionFileGetCollection ()
CString GetBestView () const

Public Attributes

CAlbumFolderm_pParent
CObList m_pFolders
CObList m_pFiles
CString m_sSchemaURI
CSchemam_pSchema
CXMLElementm_pXML
BOOL m_bCollSHA1
SHA1 m_pCollSHA1
CString m_sName
BOOL m_bExpanded
BOOL m_bAutoDelete
CString m_sBestView
DWORD m_nUpdateCookie
DWORD m_nSelectCookie
DWORD m_nListCookie
CCollectionFilem_pCollection

Protected Member Functions

void SetCollection (SHA1 *pSHA1, CCollectionFile *pCollection)
void OnFolderDelete (CAlbumFolder *pFolder)
void OnFileDelete (CLibraryFile *pFile)
void Serialize (CArchive &ar, int nVersion)
void Clear ()

Friends

class CLibrary
class CLibraryFolders
class CLibraryFrame
class CLibraryTreeView

Constructor & Destructor Documentation

CAlbumFolder::CAlbumFolder CAlbumFolder pParent = NULL,
LPCTSTR  pszSchemaURI = NULL,
LPCTSTR  pszName = NULL,
BOOL  bAutoDelete = FALSE
 

Definition at line 47 of file AlbumFolder.cpp.

References CSchemaCache::Get(), NULL, and SchemaCache.

Referenced by AddFolder(), and Serialize().

CAlbumFolder::~CAlbumFolder  )  [virtual]
 

Definition at line 80 of file AlbumFolder.cpp.

References Clear().


Member Function Documentation

void CAlbumFolder::AddFile CLibraryFile pFile  ) 
 

Definition at line 210 of file AlbumFolder.cpp.

References Library, LibraryMaps, CLibraryMaps::LookupFileBySHA1(), m_bCollSHA1, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pCollSHA1, m_pFiles, and NULL.

Referenced by CLibraryTreeView::DropObjects(), OrganiseFile(), CLibraryFrame::RunLocalSearch(), and SetCollection().

CAlbumFolder * CAlbumFolder::AddFolder LPCTSTR  pszSchemaURI = NULL,
LPCTSTR  pszName = NULL,
BOOL  bAutoDelete = FALSE
 

Definition at line 88 of file AlbumFolder.cpp.

References CAlbumFolder(), CSchema::GetContainedURI(), m_pFolders, m_pSchema, NULL, CSchema::stFolder, and CSchema::uriFolder.

Referenced by CLibraryFolders::CreateAlbumTree(), MountCollection(), CLibraryTreeView::OnLibraryFolderNew(), OrganiseFile(), and CLibraryFrame::RunLocalSearch().

BOOL CAlbumFolder::CheckFolder CAlbumFolder pFolder,
BOOL  bRecursive = FALSE
const
 

Definition at line 142 of file AlbumFolder.cpp.

References CheckFolder(), GetFolderIterator(), and GetNextFolder().

Referenced by CLibraryFolders::CheckAlbum(), CheckFolder(), CLibraryTreeView::DropObjects(), and CLibraryTileView::Update().

void CAlbumFolder::Clear  )  [protected]
 

Definition at line 1026 of file AlbumFolder.cpp.

References GetFolderIterator(), GetNextFolder(), m_pCollection, m_pFiles, m_pFolders, m_pXML, and NULL.

Referenced by CLibraryFrame::RunLocalSearch(), and ~CAlbumFolder().

void CAlbumFolder::Delete BOOL  bIfEmpty = FALSE  ) 
 

Definition at line 346 of file AlbumFolder.cpp.

References GetFileCount(), GetFolderCount(), m_bAutoDelete, m_bCollSHA1, m_pParent, NULL, and OnFolderDelete().

Referenced by OnFileDelete(), OnFolderDelete(), CLibraryTileView::OnLibraryAlbumDelete(), CLibraryTreeView::OnLibraryFolderDelete(), and RemoveFile().

CAlbumFolder * CAlbumFolder::FindCollection SHA1 pSHA1  ) 
 

Definition at line 183 of file AlbumFolder.cpp.

References FindCollection(), GetFolderIterator(), GetNextFolder(), m_bCollSHA1, m_pCollSHA1, and NULL.

Referenced by FindCollection().

CAlbumFolder * CAlbumFolder::FindFile CLibraryFile pFile  )  const
 

Definition at line 295 of file AlbumFolder.cpp.

References FindFile(), GetFolderCount(), GetFolderIterator(), GetNextFolder(), m_pFiles, and NULL.

Referenced by FindFile().

CString CAlbumFolder::GetBestView  )  const
 

Definition at line 452 of file AlbumFolder.cpp.

References m_bCollSHA1, m_pSchema, m_sBestView, CSchema::m_sLibraryView, and NULL.

Referenced by CLibraryMetaPanel::CheckAvailable(), and CLibraryFrame::Update().

CCollectionFile * CAlbumFolder::GetCollection  ) 
 

Definition at line 543 of file AlbumFolder.cpp.

References Library, LibraryMaps, CLibraryMaps::LookupFileBySHA1(), m_bCollSHA1, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pCollection, m_pCollSHA1, NULL, and CCollectionFile::Open().

Referenced by OrganiseFile().

int CAlbumFolder::GetFileCount  )  const
 

Definition at line 245 of file AlbumFolder.cpp.

References m_pFiles.

Referenced by CLocalSearch::AlbumToPacket(), CLibraryTileView::CheckAvailable(), CLibraryFileView::CheckAvailable(), Delete(), Serialize(), and CLibraryTileView::Update().

POSITION CAlbumFolder::GetFileIterator  )  const
 

Definition at line 235 of file AlbumFolder.cpp.

References m_pFiles.

Referenced by CLocalSearch::AlbumToPacket(), CCollectionExportDlg::CreateXML(), GetFileList(), GetSharedCount(), MetaToFiles(), CFilesProfilePage::OnInitDialog(), and Serialize().

int CAlbumFolder::GetFileList CLibraryList pList,
BOOL  bRecursive
const
 

Definition at line 322 of file AlbumFolder.cpp.

References GetFileIterator(), GetFolderIterator(), GetNextFile(), and GetNextFolder().

CAlbumFolder * CAlbumFolder::GetFolder LPCTSTR  pszName  )  const
 

Definition at line 114 of file AlbumFolder.cpp.

References GetFolderIterator(), GetNextFolder(), m_sName, and NULL.

CAlbumFolder * CAlbumFolder::GetFolderByURI LPCTSTR  pszURI  )  const
 

Definition at line 125 of file AlbumFolder.cpp.

References CSchema::CheckURI(), GetFolderIterator(), GetNextFolder(), m_pSchema, and NULL.

Referenced by CLibraryFolders::CreateAlbumTree(), and CLibraryFrame::RunLocalSearch().

int CAlbumFolder::GetFolderCount  )  const
 

Definition at line 137 of file AlbumFolder.cpp.

References m_pFolders.

Referenced by CLibraryMetaPanel::CheckAvailable(), CLibraryFolders::CreateAlbumTree(), Delete(), FindFile(), and Serialize().

POSITION CAlbumFolder::GetFolderIterator  )  const
 

Definition at line 104 of file AlbumFolder.cpp.

References m_pFolders.

Referenced by CLocalSearch::AlbumToPacket(), CheckFolder(), Clear(), FindCollection(), FindFile(), GetFileList(), GetFolder(), GetFolderByURI(), GetSharedCount(), GetTarget(), MountCollection(), OnFileDelete(), OrganiseFile(), Serialize(), CLibraryTreeView::Update(), and CLibraryTileView::Update().

CLibraryFile * CAlbumFolder::GetNextFile POSITION &  pos  )  const
 

Definition at line 240 of file AlbumFolder.cpp.

References m_pFiles.

Referenced by CLocalSearch::AlbumToPacket(), CCollectionExportDlg::CreateXML(), GetFileList(), GetSharedCount(), MetaToFiles(), CFilesProfilePage::OnInitDialog(), and Serialize().

CAlbumFolder * CAlbumFolder::GetNextFolder POSITION &  pos  )  const
 

Definition at line 109 of file AlbumFolder.cpp.

References m_pFolders.

Referenced by CLocalSearch::AlbumToPacket(), CheckFolder(), Clear(), FindCollection(), FindFile(), GetFileList(), GetFolder(), GetFolderByURI(), GetSharedCount(), GetTarget(), MountCollection(), OnFileDelete(), OrganiseFile(), Serialize(), CLibraryTreeView::Update(), and CLibraryTileView::Update().

int CAlbumFolder::GetSharedCount  )  const
 

Definition at line 250 of file AlbumFolder.cpp.

References GetFileIterator(), GetFolderIterator(), GetNextFile(), GetNextFolder(), and CLibraryFile::IsShared().

Referenced by CLocalSearch::AlbumToPacket().

CAlbumFolder * CAlbumFolder::GetTarget CSchemaMember pMember,
LPCTSTR  pszValue
const
 

Definition at line 157 of file AlbumFolder.cpp.

References GetFolderIterator(), GetNextFolder(), GetTarget(), m_pSchema, m_pXML, NULL, and CXMLNode::UniformString().

Referenced by CLibraryFolders::GetAlbumTarget(), and GetTarget().

BOOL CAlbumFolder::MetaFromFile CLibraryFile pFile  ) 
 

Definition at line 400 of file AlbumFolder.cpp.

References CSchema::GetContained(), Library, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pSchema, m_pXML, CSchema::m_sSingular, CSchemaChild::MemberCopy(), and NULL.

Referenced by OrganiseFile().

BOOL CAlbumFolder::MetaToFiles BOOL  bAggressive = FALSE  ) 
 

Definition at line 417 of file AlbumFolder.cpp.

References CXMLElement::AddElement(), CXMLElement::Clone(), CSchema::GetContained(), GetFileIterator(), GetNextFile(), CSchema::Instantiate(), CLibraryFile::m_pMetadata, CLibraryFile::m_pSchema, m_pSchema, m_pXML, CSchema::m_sURI, NULL, and CLibraryFile::SetMetadata().

Referenced by CFolderPropertiesDlg::DoApply(), and CLibraryTreeView::OnLibraryFolderMetadata().

BOOL CAlbumFolder::MountCollection SHA1 pSHA1,
CCollectionFile pCollection,
BOOL  bForce = FALSE
 

Definition at line 467 of file AlbumFolder.cpp.

References AddFolder(), CSchema::GetContained(), GetFolderIterator(), GetNextFolder(), CCollectionFile::GetThisURI(), CCollectionFile::GetTitle(), Library, m_bCollSHA1, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pCollSHA1, m_pSchema, m_sSchemaURI, NULL, SetCollection(), and CSchema::uriCollectionsFolder.

void CAlbumFolder::OnFileDelete CLibraryFile pFile  )  [protected]
 

Definition at line 279 of file AlbumFolder.cpp.

References Delete(), GetFolderIterator(), GetNextFolder(), Library, CLibrary::m_nUpdateCookie, m_nUpdateCookie, and m_pFiles.

Referenced by CLibraryFolders::OnFileDelete().

void CAlbumFolder::OnFolderDelete CAlbumFolder pFolder  )  [protected]
 

Definition at line 196 of file AlbumFolder.cpp.

References Delete(), Library, m_nUpdateCookie, CLibrary::m_nUpdateCookie, m_pFolders, and NULL.

Referenced by Delete(), and CLibraryTreeView::DropObjects().

BOOL CAlbumFolder::OrganiseFile CLibraryFile pFile  ) 
 

Definition at line 573 of file AlbumFolder.cpp.

References _tcsistr(), AddFile(), AddFolder(), CCollectionFile::FindFile(), CXMLElement::GetAttributeValue(), GetCollection(), GetFolderIterator(), GetNextFolder(), CLibraryFile::IsSchemaURI(), m_bAutoDelete, m_bCollSHA1, m_pCollection, m_pCollSHA1, CLibraryFile::m_pMetadata, m_pParent, CLibraryFile::m_pSHA1, m_sName, m_sSchemaURI, MetaFromFile(), NULL, OrganiseFile(), RemoveFile(), Replace(), CXMLNode::UniformString(), CSchema::uriAllFiles, CSchema::uriApplication, CSchema::uriApplicationAll, CSchema::uriApplicationRoot, CSchema::uriAudio, CSchema::uriBook, CSchema::uriBookAll, CSchema::uriBookRoot, CSchema::uriDocument, CSchema::uriDocumentAll, CSchema::uriDocumentRoot, CSchema::uriImage, CSchema::uriImageAll, CSchema::uriImageRoot, CSchema::uriMusicAlbum, CSchema::uriMusicAlbumCollection, CSchema::uriMusicAll, CSchema::uriMusicArtist, CSchema::uriMusicArtistCollection, CSchema::uriMusicGenre, CSchema::uriMusicGenreCollection, CSchema::uriMusicRoot, CSchema::uriPresentation, CSchema::uriSpreadsheet, CSchema::uriVideo, CSchema::uriVideoAll, CSchema::uriVideoFilm, CSchema::uriVideoFilmCollection, CSchema::uriVideoMusicCollection, CSchema::uriVideoRoot, CSchema::uriVideoSeries, and CSchema::uriVideoSeriesCollection.

Referenced by CLibraryFolders::CreateAlbumTree(), and OrganiseFile().

void CAlbumFolder::RemoveFile CLibraryFile pFile  ) 
 

Definition at line 268 of file AlbumFolder.cpp.

References Delete(), Library, CLibrary::m_nUpdateCookie, m_nUpdateCookie, and m_pFiles.

Referenced by CLibraryFileView::OnLibraryUnlink(), and OrganiseFile().

void CAlbumFolder::Serialize CArchive &  ar,
int  nVersion
[protected]
 

Definition at line 922 of file AlbumFolder.cpp.

References CAlbumFolder(), CSchemaCache::Get(), GetFileCount(), GetFileIterator(), GetFolderCount(), GetFolderIterator(), GetNextFile(), GetNextFolder(), Library, LibraryMaps, CLibrary::LookupFile(), CLibraryMaps::LookupFileBySHA1(), m_bAutoDelete, m_bCollSHA1, m_bExpanded, CLibraryFile::m_nIndex, m_pCollSHA1, m_pFiles, m_pFolders, m_pParent, m_pSchema, m_pXML, m_sBestView, m_sName, m_sSchemaURI, NULL, SchemaCache, and Serialize().

Referenced by Serialize().

void CAlbumFolder::SetCollection SHA1 pSHA1,
CCollectionFile pCollection
[protected]
 

Definition at line 506 of file AlbumFolder.cpp.

References AddFile(), CCollectionFile::FindFile(), CLibraryMaps::GetFileIterator(), CCollectionFile::GetMetadata(), CLibraryMaps::GetNextFile(), CLibraryFile::IsAvailable(), Library, LibraryMaps, m_bCollSHA1, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pCollection, m_pCollSHA1, CLibraryFile::m_pSHA1, m_sBestView, NULL, and SetMetadata().

Referenced by MountCollection().

BOOL CAlbumFolder::SetMetadata CXMLElement pXML  ) 
 

Definition at line 365 of file AlbumFolder.cpp.

References CXMLElement::Detach(), CSchemaCache::Get(), CXMLElement::GetFirstElement(), Library, CLibrary::m_nUpdateCookie, m_nUpdateCookie, m_pSchema, m_pXML, m_sSchemaURI, NULL, SchemaCache, and CXMLAttribute::schemaName.

Referenced by CFolderPropertiesDlg::DoApply(), CLibraryFrame::RunLocalSearch(), and SetCollection().


Friends And Related Function Documentation

friend class CLibrary [friend]
 

Definition at line 102 of file AlbumFolder.h.

friend class CLibraryFolders [friend]
 

Definition at line 103 of file AlbumFolder.h.

friend class CLibraryFrame [friend]
 

Definition at line 104 of file AlbumFolder.h.

friend class CLibraryTreeView [friend]
 

Definition at line 105 of file AlbumFolder.h.


Member Data Documentation

BOOL CAlbumFolder::m_bAutoDelete
 

Definition at line 58 of file AlbumFolder.h.

Referenced by Delete(), OrganiseFile(), and Serialize().

BOOL CAlbumFolder::m_bCollSHA1
 

Definition at line 53 of file AlbumFolder.h.

Referenced by AddFile(), CLibraryMetaPanel::CheckAvailable(), Delete(), FindCollection(), GetBestView(), GetCollection(), MountCollection(), CAlbumTipCtrl::OnPrepare(), OrganiseFile(), Serialize(), SetCollection(), CLibraryTreeView::Update(), and CLibraryTileItem::Update().

BOOL CAlbumFolder::m_bExpanded
 

Definition at line 57 of file AlbumFolder.h.

Referenced by CLibraryTreeCtrl::Expand(), Serialize(), and CLibraryTreeView::Update().

DWORD CAlbumFolder::m_nListCookie
 

Definition at line 63 of file AlbumFolder.h.

Referenced by CLibraryTileView::Update().

DWORD CAlbumFolder::m_nSelectCookie
 

Definition at line 62 of file AlbumFolder.h.

Referenced by CLibraryTreeView::Update().

DWORD CAlbumFolder::m_nUpdateCookie
 

Definition at line 61 of file AlbumFolder.h.

Referenced by AddFile(), CFolderPropertiesDlg::DoApply(), GetCollection(), MetaFromFile(), MountCollection(), OnFileDelete(), OnFolderDelete(), RemoveFile(), SetCollection(), SetMetadata(), CLibraryTreeView::Update(), and CLibraryTileItem::Update().

CCollectionFile* CAlbumFolder::m_pCollection
 

Definition at line 64 of file AlbumFolder.h.

Referenced by Clear(), GetCollection(), OrganiseFile(), and SetCollection().

SHA1 CAlbumFolder::m_pCollSHA1
 

Definition at line 54 of file AlbumFolder.h.

Referenced by AddFile(), FindCollection(), GetCollection(), MountCollection(), OrganiseFile(), Serialize(), and SetCollection().

CObList CAlbumFolder::m_pFiles
 

Definition at line 48 of file AlbumFolder.h.

Referenced by AddFile(), Clear(), FindFile(), GetFileCount(), GetFileIterator(), GetNextFile(), OnFileDelete(), RemoveFile(), Serialize(), and CLibraryTreeView::Update().

CObList CAlbumFolder::m_pFolders
 

Definition at line 47 of file AlbumFolder.h.

Referenced by AddFolder(), Clear(), CLibraryTreeView::DropObjects(), GetFolderCount(), GetFolderIterator(), GetNextFolder(), OnFolderDelete(), and Serialize().

CAlbumFolder* CAlbumFolder::m_pParent
 

Definition at line 46 of file AlbumFolder.h.

Referenced by Delete(), CLibraryTreeView::DropObjects(), OrganiseFile(), Serialize(), and CLibraryHeaderPanel::Update().

CSchema* CAlbumFolder::m_pSchema
 

Definition at line 51 of file AlbumFolder.h.

Referenced by AddFolder(), CLocalSearch::AlbumToPacket(), GetBestView(), GetFolderByURI(), CLibraryView::GetHeaderContent(), GetTarget(), MetaFromFile(), MetaToFiles(), MountCollection(), CAlbumTipCtrl::OnPrepare(), CLibraryFrame::RunLocalSearch(), Serialize(), SetMetadata(), CLibraryTreeView::Update(), CLibraryTileItem::Update(), CLibraryHeaderPanel::Update(), and CLibraryDetailView::Update().

CXMLElement* CAlbumFolder::m_pXML
 

Definition at line 52 of file AlbumFolder.h.

Referenced by CLocalSearch::AlbumToPacket(), Clear(), CCollectionExportDlg::CreateXML(), GetTarget(), MetaFromFile(), MetaToFiles(), CFolderPropertiesDlg::OnInitDialog(), CLibraryTreeView::OnLibraryExportCollection(), CAlbumTipCtrl::OnPrepare(), Serialize(), SetMetadata(), CLibraryTileItem::Update(), and CLibraryHeaderPanel::Update().

CString CAlbumFolder::m_sBestView
 

Definition at line 59 of file AlbumFolder.h.

Referenced by GetBestView(), Serialize(), and SetCollection().

CString CAlbumFolder::m_sName
 

Definition at line 56 of file AlbumFolder.h.

Referenced by CLocalSearch::AlbumToPacket(), CCollectionExportDlg::CreateXML(), CFolderPropertiesDlg::DoApply(), GetFolder(), CFolderPropertiesDlg::OnInitDialog(), CAlbumTipCtrl::OnPrepare(), OrganiseFile(), CLibraryFrame::RunLocalSearch(), Serialize(), CLibraryTreeView::Update(), CLibraryTileItem::Update(), and CLibraryHeaderPanel::Update().

CString CAlbumFolder::m_sSchemaURI
 

Definition at line 50 of file AlbumFolder.h.

Referenced by CCollectionExportDlg::CreateXML(), MountCollection(), CFolderPropertiesDlg::OnInitDialog(), OrganiseFile(), Serialize(), SetMetadata(), and CLibraryAlbumView::Update().


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