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

CLibraryFolders Class Reference

#include <LibraryFolders.h>

Inheritance diagram for CLibraryFolders:

CComObject List of all members.

Public Member Functions

 CLibraryFolders ()
virtual ~CLibraryFolders ()
POSITION GetFolderIterator () const
CLibraryFolderGetNextFolder (POSITION &pos) const
int GetFolderCount () const
CLibraryFolderGetFolder (LPCTSTR pszPath) const
BOOL CheckFolder (CLibraryFolder *pFolder, BOOL bRecursive=FALSE) const
CLibraryFolderAddFolder (LPCTSTR pszPath)
CLibraryFolderAddFolder (LPCTSTR pszPath, BOOL bShared)
BOOL RemoveFolder (CLibraryFolder *pFolder)
CLibraryFolderIsFolderShared (LPCTSTR pszPath)
CLibraryFolderIsSubFolderShared (LPCTSTR pszPath)
CAlbumFolderGetAlbumRoot ()
BOOL CheckAlbum (CAlbumFolder *pFolder) const
CAlbumFolderGetAlbumTarget (LPCTSTR pszSchemaURI, LPCTSTR pszMember, LPCTSTR pszValue) const
CAlbumFolderGetCollection (SHA1 *pSHA1)
BOOL MountCollection (SHA1 *pSHA1, CCollectionFile *pCollection)

Static Public Member Functions

static BOOL IsShareable (LPCTSTR pszPath)

Protected Member Functions

void CreateAlbumTree ()
void OnFileDelete (CLibraryFile *pFile)
void Clear ()
BOOL ThreadScan (BOOL *pbContinue, BOOL bForce=FALSE)
void Serialize (CArchive &ar, int nVersion)

Protected Attributes

CObList m_pFolders
CAlbumFolderm_pAlbumRoot
BOOL m_bRemoveMask
STDMETHOD( get_Application )(IApplication FAR *FAR *ppApplication)
STDMETHOD( get_Library )(ILibrary FAR *FAR *ppLibrary)
STDMETHOD( get__NewEnum )(IUnknown FAR *FAR *ppEnum)
STDMETHOD( get_Item )(VARIANT vIndex, ILibraryFolder FAR *FAR *ppFolder)
STDMETHOD( get_Count )(LONG FAR *pnCount)

Friends

class CLibrary

Constructor & Destructor Documentation

CLibraryFolders::CLibraryFolders  ) 
 

Definition at line 51 of file LibraryFolders.cpp.

References NULL.

CLibraryFolders::~CLibraryFolders  )  [virtual]
 

Definition at line 59 of file LibraryFolders.cpp.

References m_pAlbumRoot, and NULL.


Member Function Documentation

CLibraryFolder * CLibraryFolders::AddFolder LPCTSTR  pszPath,
BOOL  bShared
 

Definition at line 150 of file LibraryFolders.cpp.

References AddFolder(), CLibraryFolder::m_bShared, TS_FALSE, and TS_TRUE.

CLibraryFolder * CLibraryFolders::AddFolder LPCTSTR  pszPath  ) 
 

Definition at line 112 of file LibraryFolders.cpp.

References GetFolderIterator(), GetNextFolder(), IsFolderShared(), IsSubFolderShared(), Library, m_pFolders, CLibrary::m_pSection, CLibraryFolder::m_sName, NULL, CLibrary::StartThread(), and CLibrary::Update().

Referenced by AddFolder(), CDownloadTask::CDownloadTask(), CLibrary::Load(), CLibraryWnd::OnCollection(), CLibraryTreeView::OnLibraryAdd(), CDownloadsSettingsPage::OnOK(), CShareManagerDlg::OnOK(), CDownloadGroupDlg::OnOK(), CWizardSharePage::OnWizardNext(), and CDownloadWithTorrent::SetTorrent().

BOOL CLibraryFolders::CheckAlbum CAlbumFolder pFolder  )  const
 

Definition at line 324 of file LibraryFolders.cpp.

References CAlbumFolder::CheckFolder(), m_pAlbumRoot, and NULL.

Referenced by CFolderPropertiesDlg::DoApply(), CLibraryTreeView::DropObjects(), CLibraryTreeItem::GetFileList(), CFolderPropertiesDlg::OnInitDialog(), CLibraryTileView::OnLibraryAlbumDelete(), CLibraryTreeView::OnLibraryFolderDelete(), CLibraryTreeView::OnLibraryFolderEnqueue(), CLibraryTreeView::OnLibraryFolderMetadata(), CLibraryFileView::OnLibraryUnlink(), CCollectionExportDlg::OnOK(), CAlbumTipCtrl::OnPrepare(), and CLibraryTreeView::OnUpdateLibraryFolderEnqueue().

BOOL CLibraryFolders::CheckFolder CLibraryFolder pFolder,
BOOL  bRecursive = FALSE
const
 

Definition at line 96 of file LibraryFolders.cpp.

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

Referenced by CLibraryTreeItem::GetFileList(), CLibraryFolderCtrl::GetNextSelectedFolder(), CLibraryFolderCtrl::OnItemExpanded(), CLibraryTreeView::OnLibraryExplore(), CLibraryTreeView::OnLibraryRemove(), CLibraryTreeView::OnLibraryScan(), CLibraryTreeView::OnLibraryShared(), CDownloadsSettingsPage::OnOK(), CDownloadGroupDlg::OnOK(), CFolderTipCtrl::OnPrepare(), CLibraryTreeView::OnUpdateLibraryRemove(), CLibraryTreeView::OnUpdateLibraryShared(), and CLibraryFolderCtrl::Update().

void CLibraryFolders::Clear  )  [protected]
 

Definition at line 480 of file LibraryFolders.cpp.

References GetFolderIterator(), GetNextFolder(), m_pAlbumRoot, m_pFolders, and NULL.

Referenced by CLibrary::Clear().

void CLibraryFolders::CreateAlbumTree  )  [protected]
 

Definition at line 398 of file LibraryFolders.cpp.

References CAlbumFolder::AddFolder(), GetAlbumRoot(), CLibraryMaps::GetFileIterator(), CAlbumFolder::GetFolderByURI(), CAlbumFolder::GetFolderCount(), CLibraryMaps::GetNextFile(), CLibraryFile::IsAvailable(), LibraryMaps, m_pAlbumRoot, NULL, CAlbumFolder::OrganiseFile(), CSchema::uriAllFiles, CSchema::uriApplicationAll, CSchema::uriApplicationRoot, CSchema::uriBookAll, CSchema::uriBookRoot, CSchema::uriCollectionsFolder, CSchema::uriDocumentAll, CSchema::uriDocumentRoot, CSchema::uriFavouritesFolder, CSchema::uriImageAll, CSchema::uriImageRoot, CSchema::uriMusicAlbumCollection, CSchema::uriMusicAll, CSchema::uriMusicArtistCollection, CSchema::uriMusicGenreCollection, CSchema::uriMusicRoot, CSchema::uriVideoAll, CSchema::uriVideoFilmCollection, CSchema::uriVideoMusicCollection, CSchema::uriVideoRoot, and CSchema::uriVideoSeriesCollection.

Referenced by CLibrary::Load().

CAlbumFolder * CLibraryFolders::GetAlbumRoot  ) 
 

Definition at line 314 of file LibraryFolders.cpp.

References m_pAlbumRoot, NULL, and CSchema::uriLibrary.

Referenced by CreateAlbumTree(), CLibrary::GetAlbumRoot(), GetCollection(), MountCollection(), and Serialize().

CAlbumFolder * CLibraryFolders::GetAlbumTarget LPCTSTR  pszSchemaURI,
LPCTSTR  pszMember,
LPCTSTR  pszValue
const
 

Definition at line 333 of file LibraryFolders.cpp.

References CSchemaCache::Get(), CSchema::GetMember(), CSchema::GetMemberCount(), CSchema::GetMemberIterator(), CSchema::GetNextMember(), CAlbumFolder::GetTarget(), m_pAlbumRoot, NULL, SchemaCache, and CXMLNode::UniformString().

Referenced by CMetaItem::CreateLink(), CMetaItem::GetLinkTarget(), MountCollection(), and CFilesProfilePage::OnInitDialog().

CAlbumFolder * CLibraryFolders::GetCollection SHA1 pSHA1  ) 
 

Definition at line 364 of file LibraryFolders.cpp.

References GetAlbumRoot().

Referenced by CLibraryWnd::OnCollection().

CLibraryFolder * CLibraryFolders::GetFolder LPCTSTR  pszPath  )  const
 

Definition at line 85 of file LibraryFolders.cpp.

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

Referenced by CLibraryWnd::OnCollection(), CFileCopyDlg::OnInitDialog(), and CLibraryMetaPanel::OnLButtonUp().

int CLibraryFolders::GetFolderCount  )  const
 

Definition at line 77 of file LibraryFolders.cpp.

References m_pFolders.

Referenced by CDownloadsSettingsPage::OnOK(), and Serialize().

POSITION CLibraryFolders::GetFolderIterator  )  const
 

Definition at line 67 of file LibraryFolders.cpp.

References m_pFolders.

Referenced by AddFolder(), CheckFolder(), Clear(), CLocalSearch::FoldersToPacket(), GetFolder(), IsFolderShared(), IsSubFolderShared(), CWizardSharePage::OnInitDialog(), CShareManagerDlg::OnInitDialog(), CShareManagerDlg::OnOK(), CWizardSharePage::OnWizardNext(), Serialize(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::UpdatePhysical().

CLibraryFolder * CLibraryFolders::GetNextFolder POSITION &  pos  )  const
 

Definition at line 72 of file LibraryFolders.cpp.

References m_pFolders.

Referenced by AddFolder(), CheckFolder(), Clear(), CLocalSearch::FoldersToPacket(), GetFolder(), IsFolderShared(), IsSubFolderShared(), CWizardSharePage::OnInitDialog(), CShareManagerDlg::OnInitDialog(), CShareManagerDlg::OnOK(), CWizardSharePage::OnWizardNext(), Serialize(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::UpdatePhysical().

CLibraryFolder * CLibraryFolders::IsFolderShared LPCTSTR  pszPath  ) 
 

Definition at line 189 of file LibraryFolders.cpp.

References GetFolderIterator(), GetNextFolder(), CLibraryFolder::m_sPath, and NULL.

Referenced by AddFolder(), CDownloadsSettingsPage::OnIncompleteBrowse(), CDownloadsSettingsPage::OnOK(), and CDownloadGroupDlg::OnOK().

BOOL CLibraryFolders::IsShareable LPCTSTR  pszPath  )  [static]
 

Definition at line 251 of file LibraryFolders.cpp.

References CSettings::Downloads, CSettings::General, CSettings::sDownloads::IncompletePath, NULL, CSettings::sGeneral::Path, Settings, and CSettings::sGeneral::UserPath.

Referenced by CDownloadGroupDlg::OnOK(), and CShareManagerDlg::OnShareAdd().

CLibraryFolder * CLibraryFolders::IsSubFolderShared LPCTSTR  pszPath  ) 
 

Definition at line 222 of file LibraryFolders.cpp.

References GetFolderIterator(), GetNextFolder(), CLibraryFolder::m_sPath, and NULL.

Referenced by AddFolder(), and CDownloadGroupDlg::OnOK().

BOOL CLibraryFolders::MountCollection SHA1 pSHA1,
CCollectionFile pCollection
 

Definition at line 372 of file LibraryFolders.cpp.

References GetAlbumRoot(), GetAlbumTarget(), CCollectionFile::GetParentURI(), CCollectionFile::GetThisURI(), Library, CLibrary::m_pSection, and NULL.

Referenced by CLibraryWnd::OnCollection(), and CLibraryBuilderInternals::ReadCollection().

void CLibraryFolders::OnFileDelete CLibraryFile pFile  )  [protected]
 

Definition at line 472 of file LibraryFolders.cpp.

References m_pAlbumRoot, NULL, and CAlbumFolder::OnFileDelete().

Referenced by CLibrary::OnFileDelete().

BOOL CLibraryFolders::RemoveFolder CLibraryFolder pFolder  ) 
 

Definition at line 168 of file LibraryFolders.cpp.

References Library, m_bRemoveMask, m_pFolders, CLibrary::m_pSection, NULL, and CLibrary::Update().

Referenced by CLibraryTreeView::OnLibraryRemove(), CShareManagerDlg::OnOK(), CDownloadGroupDlg::OnOK(), and CWizardSharePage::OnWizardNext().

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

Definition at line 531 of file LibraryFolders.cpp.

References GetAlbumRoot(), GetFolderCount(), GetFolderIterator(), GetNextFolder(), m_pFolders, NULL, and CLibraryFolder::Serialize().

Referenced by CLibrary::Serialize().

BOOL CLibraryFolders::ThreadScan BOOL *  pbContinue,
BOOL  bForce = FALSE
[protected]
 

Definition at line 496 of file LibraryFolders.cpp.

References CLibraryFolder::CheckMonitor(), GetFolderIterator(), GetNextFolder(), Library, m_bRemoveMask, CLibrary::m_pSection, CLibraryFolder::m_sPath, CLibraryFolder::SetMonitor(), and CLibraryFolder::ThreadScan().

Referenced by CLibrary::ThreadScan().


Friends And Related Function Documentation

friend class CLibrary [friend]
 

Definition at line 91 of file LibraryFolders.h.


Member Data Documentation

STDMETHOD( CLibraryFolders::get__NewEnum)(IUnknown FAR *FAR *ppEnum) [protected]
 

STDMETHOD( CLibraryFolders::get_Application)(IApplication FAR *FAR *ppApplication) [protected]
 

STDMETHOD( CLibraryFolders::get_Count)(LONG FAR *pnCount) [protected]
 

STDMETHOD( CLibraryFolders::get_Item)(VARIANT vIndex, ILibraryFolder FAR *FAR *ppFolder) [protected]
 

STDMETHOD( CLibraryFolders::get_Library)(ILibrary FAR *FAR *ppLibrary) [protected]
 

BOOL CLibraryFolders::m_bRemoveMask [protected]
 

Definition at line 44 of file LibraryFolders.h.

Referenced by RemoveFolder(), and ThreadScan().

CAlbumFolder* CLibraryFolders::m_pAlbumRoot [protected]
 

Definition at line 43 of file LibraryFolders.h.

Referenced by CheckAlbum(), Clear(), CreateAlbumTree(), GetAlbumRoot(), GetAlbumTarget(), OnFileDelete(), and ~CLibraryFolders().

CObList CLibraryFolders::m_pFolders [protected]
 

Definition at line 42 of file LibraryFolders.h.

Referenced by AddFolder(), CheckFolder(), Clear(), GetFolderCount(), GetFolderIterator(), GetNextFolder(), RemoveFolder(), and Serialize().


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