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

CLibraryFolder Class Reference

#include <SharedFolder.h>

Inheritance diagram for CLibraryFolder:

CComObject List of all members.

Public Member Functions

 CLibraryFolder (CLibraryFolder *pParent, LPCTSTR pszPath=NULL)
virtual ~CLibraryFolder ()
POSITION GetFolderIterator () const
CLibraryFolderGetNextFolder (POSITION &pos) const
CLibraryFolderGetFolderByName (LPCTSTR pszName) const
CLibraryFolderGetFolderByPath (LPCTSTR pszPath) const
BOOL CheckFolder (CLibraryFolder *pFolder, BOOL bRecursive=FALSE) const
int GetFolderCount () const
POSITION GetFileIterator () const
CLibraryFileGetNextFile (POSITION &pos) const
CLibraryFileGetFile (LPCTSTR pszName) const
int GetFileCount () const
int GetFileList (CLibraryList *pList, BOOL bRecursive) const
int GetSharedCount () const
void Scan ()
BOOL IsShared ()

Public Attributes

DWORD m_nScanCookie
DWORD m_nUpdateCookie
DWORD m_nSelectCookie
CLibraryFolderm_pParent
CString m_sName
CString m_sNameLC
CString m_sPath
TRISTATE m_bShared
BOOL m_bExpanded
DWORD m_nFiles
QWORD m_nVolume
CMapStringToOb m_pFolders
CMapStringToOb m_pFiles
HANDLE m_hMonitor
BOOL m_bMonitor

Protected Member Functions

void Serialize (CArchive &ar, int nVersion)
BOOL ThreadScan (DWORD nScanCookie=0)
BOOL SetMonitor ()
BOOL CheckMonitor ()
void OnDelete ()
void OnFileRename (CLibraryFile *pFile)
void Clear ()
void PathToName ()

Protected Attributes

STDMETHOD( get_Application )(IApplication FAR *FAR *ppApplication)
STDMETHOD( get_Library )(ILibrary FAR *FAR *ppLibrary)
STDMETHOD( get_Parent )(ILibraryFolder FAR *FAR *ppFolder)
STDMETHOD( get_Path )(BSTR FAR *psPath)
STDMETHOD( get_Name )(BSTR FAR *psPath)
STDMETHOD( get_Shared )(STRISTATE FAR *pnValue)
STDMETHOD( put_Shared )(STRISTATE nValue)
STDMETHOD( get_EffectiveShared )(VARIANT_BOOL FAR *pbValue)
STDMETHOD( get_Folders )(ILibraryFolders FAR *FAR *ppFolders)
STDMETHOD( get_Files )(ILibraryFiles FAR *FAR *ppFiles)
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
class CLibraryFolders
class CLibraryFile

Constructor & Destructor Documentation

CLibraryFolder::CLibraryFolder CLibraryFolder pParent,
LPCTSTR  pszPath = NULL
 

Definition at line 48 of file SharedFolder.cpp.

References TS_TRUE, and TS_UNKNOWN.

Referenced by Serialize(), and ThreadScan().

CLibraryFolder::~CLibraryFolder  )  [virtual]
 

Definition at line 75 of file SharedFolder.cpp.

References Clear(), and m_hMonitor.


Member Function Documentation

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

Definition at line 120 of file SharedFolder.cpp.

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

Referenced by CheckFolder(), CLibraryFolderCtrl::GetNextSelectedFolder(), and CLibraryFolderCtrl::Update().

BOOL CLibraryFolder::CheckMonitor  )  [protected]
 

Definition at line 512 of file SharedFolder.cpp.

References m_bMonitor, and m_hMonitor.

Referenced by CLibraryFolders::ThreadScan().

void CLibraryFolder::Clear  )  [protected]
 

Definition at line 209 of file SharedFolder.cpp.

References GetFileIterator(), GetFolderIterator(), GetNextFile(), GetNextFolder(), m_nFiles, m_nVolume, m_pFiles, and m_pFolders.

Referenced by Serialize(), and ~CLibraryFolder().

CLibraryFile * CLibraryFolder::GetFile LPCTSTR  pszName  )  const
 

Definition at line 153 of file SharedFolder.cpp.

References m_pFiles, and NULL.

Referenced by ThreadScan().

int CLibraryFolder::GetFileCount  )  const
 

Definition at line 162 of file SharedFolder.cpp.

References m_pFiles.

Referenced by Serialize().

POSITION CLibraryFolder::GetFileIterator  )  const
 

Definition at line 140 of file SharedFolder.cpp.

References m_pFiles.

Referenced by Clear(), GetFileList(), GetSharedCount(), OnDelete(), Serialize(), and ThreadScan().

int CLibraryFolder::GetFileList CLibraryList pList,
BOOL  bRecursive
const
 

Definition at line 167 of file SharedFolder.cpp.

References CLibraryList::CheckAndAdd(), GetFileIterator(), GetFolderIterator(), GetNextFile(), and GetNextFolder().

Referenced by CLibraryTreeItem::GetFileList().

CLibraryFolder * CLibraryFolder::GetFolderByName LPCTSTR  pszName  )  const
 

Definition at line 98 of file SharedFolder.cpp.

References m_pFolders, and NULL.

Referenced by ThreadScan().

CLibraryFolder * CLibraryFolder::GetFolderByPath LPCTSTR  pszPath  )  const
 

Definition at line 107 of file SharedFolder.cpp.

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

int CLibraryFolder::GetFolderCount  )  const
 

Definition at line 132 of file SharedFolder.cpp.

References m_pFolders.

Referenced by Serialize().

POSITION CLibraryFolder::GetFolderIterator  )  const
 

Definition at line 85 of file SharedFolder.cpp.

References m_pFolders.

Referenced by CheckFolder(), Clear(), GetFileList(), GetFolderByPath(), GetSharedCount(), OnDelete(), Serialize(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::Update().

CLibraryFile * CLibraryFolder::GetNextFile POSITION &  pos  )  const
 

Definition at line 145 of file SharedFolder.cpp.

References m_pFiles, and NULL.

Referenced by Clear(), GetFileList(), GetSharedCount(), OnDelete(), Serialize(), and ThreadScan().

CLibraryFolder * CLibraryFolder::GetNextFolder POSITION &  pos  )  const
 

Definition at line 90 of file SharedFolder.cpp.

References m_pFolders, and NULL.

Referenced by CheckFolder(), Clear(), GetFileList(), GetFolderByPath(), GetSharedCount(), OnDelete(), Serialize(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::Update().

int CLibraryFolder::GetSharedCount  )  const
 

Definition at line 188 of file SharedFolder.cpp.

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

BOOL CLibraryFolder::IsShared  ) 
 

Definition at line 543 of file SharedFolder.cpp.

References TS_FALSE, and TS_TRUE.

Referenced by CLibraryFolderCtrl::Update().

void CLibraryFolder::OnDelete  )  [protected]
 

Definition at line 560 of file SharedFolder.cpp.

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

Referenced by ThreadScan().

void CLibraryFolder::OnFileRename CLibraryFile pFile  )  [protected]
 

Definition at line 578 of file SharedFolder.cpp.

References CLibraryFile::GetNameLC(), m_pFiles, and NULL.

void CLibraryFolder::PathToName  )  [protected]
 

Definition at line 298 of file SharedFolder.cpp.

References m_sName, m_sNameLC, and m_sPath.

Referenced by Serialize(), and ThreadScan().

void CLibraryFolder::Scan  ) 
 

Definition at line 532 of file SharedFolder.cpp.

References Library, m_bMonitor, m_pParent, and CLibrary::m_pWakeup.

Referenced by CLibraryWnd::OnCollection().

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

Definition at line 231 of file SharedFolder.cpp.

References Clear(), CLibraryFile, CLibraryFolder(), GetFileCount(), GetFileIterator(), GetFolderCount(), GetFolderIterator(), CLibraryFile::GetNameLC(), GetNextFile(), GetNextFolder(), m_bExpanded, m_bShared, m_nFiles, CLibraryFile::m_nSize, m_nVolume, m_pFiles, m_pFolders, m_sNameLC, m_sPath, PathToName(), CLibraryFile::Serialize(), Serialize(), TS_FALSE, and TS_UNKNOWN.

Referenced by Serialize(), and CLibraryFolders::Serialize().

BOOL CLibraryFolder::SetMonitor  )  [protected]
 

Definition at line 493 of file SharedFolder.cpp.

References CSettings::Library, m_bMonitor, m_hMonitor, m_sPath, Settings, and CSettings::sLibrary::WatchFolders.

Referenced by CLibraryFolders::ThreadScan().

BOOL CLibraryFolder::ThreadScan DWORD  nScanCookie = 0  )  [protected]
 

Definition at line 311 of file SharedFolder.cpp.

References _tcsistr(), CLibraryFile, CLibraryFolder(), CSettings::Downloads, GetFile(), GetFileIterator(), GetFolderByName(), GetFolderIterator(), CLibraryFile::GetNameLC(), GetNextFile(), GetNextFolder(), CSettings::sDownloads::IncompletePath, Library, CLibrary::m_bThread, m_nFiles, CLibraryFile::m_nScanCookie, CLibrary::m_nScanCookie, m_nScanCookie, CLibraryFile::m_nSize, m_nUpdateCookie, m_nVolume, m_pFiles, m_pFolders, m_pParent, CLibrary::m_pSection, CLibraryFile::m_sName, m_sName, m_sNameLC, m_sPath, CShareazaApp::Message(), MSG_DEBUG, NULL, CLibraryFile::OnDelete(), OnDelete(), PathToName(), Settings, theApp, CLibraryFile::ThreadScan(), and ThreadScan().

Referenced by ThreadScan(), and CLibraryFolders::ThreadScan().


Friends And Related Function Documentation

friend class CLibrary [friend]
 

Definition at line 88 of file SharedFolder.h.

friend class CLibraryFile [friend]
 

Definition at line 90 of file SharedFolder.h.

Referenced by Serialize(), and ThreadScan().

friend class CLibraryFolders [friend]
 

Definition at line 89 of file SharedFolder.h.


Member Data Documentation

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

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

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

STDMETHOD( CLibraryFolder::get_EffectiveShared)(VARIANT_BOOL FAR *pbValue) [protected]
 

STDMETHOD( CLibraryFolder::get_Files)(ILibraryFiles FAR *FAR *ppFiles) [protected]
 

STDMETHOD( CLibraryFolder::get_Folders)(ILibraryFolders FAR *FAR *ppFolders) [protected]
 

STDMETHOD( CLibraryFolder::get_Item)(VARIANT vIndex, ILibraryFile FAR *FAR *ppFile) [protected]
 

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

STDMETHOD( CLibraryFolder::get_Name)(BSTR FAR *psPath) [protected]
 

STDMETHOD( CLibraryFolder::get_Parent)(ILibraryFolder FAR *FAR *ppFolder) [protected]
 

STDMETHOD( CLibraryFolder::get_Path)(BSTR FAR *psPath) [protected]
 

STDMETHOD( CLibraryFolder::get_Shared)(STRISTATE FAR *pnValue) [protected]
 

BOOL CLibraryFolder::m_bExpanded
 

Definition at line 51 of file SharedFolder.h.

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

BOOL CLibraryFolder::m_bMonitor
 

Definition at line 58 of file SharedFolder.h.

Referenced by CheckMonitor(), Scan(), and SetMonitor().

TRISTATE CLibraryFolder::m_bShared
 

Definition at line 50 of file SharedFolder.h.

Referenced by CLibraryFolders::AddFolder(), Serialize(), and CLibraryTreeView::Update().

HANDLE CLibraryFolder::m_hMonitor
 

Definition at line 57 of file SharedFolder.h.

Referenced by CheckMonitor(), SetMonitor(), and ~CLibraryFolder().

DWORD CLibraryFolder::m_nFiles
 

Definition at line 52 of file SharedFolder.h.

Referenced by Clear(), CFolderTipCtrl::OnPrepare(), Serialize(), and ThreadScan().

DWORD CLibraryFolder::m_nScanCookie
 

Definition at line 42 of file SharedFolder.h.

Referenced by ThreadScan().

DWORD CLibraryFolder::m_nSelectCookie
 

Definition at line 44 of file SharedFolder.h.

Referenced by CLibraryFolderCtrl::SetSelectedCookie(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::Update().

DWORD CLibraryFolder::m_nUpdateCookie
 

Definition at line 43 of file SharedFolder.h.

Referenced by ThreadScan(), and CLibraryTreeView::Update().

QWORD CLibraryFolder::m_nVolume
 

Definition at line 53 of file SharedFolder.h.

Referenced by Clear(), CFolderTipCtrl::OnPrepare(), Serialize(), and ThreadScan().

CMapStringToOb CLibraryFolder::m_pFiles
 

Definition at line 56 of file SharedFolder.h.

Referenced by Clear(), GetFile(), GetFileCount(), GetFileIterator(), GetNextFile(), OnDelete(), OnFileRename(), Serialize(), ThreadScan(), and CLibraryTreeView::Update().

CMapStringToOb CLibraryFolder::m_pFolders
 

Definition at line 55 of file SharedFolder.h.

Referenced by Clear(), GetFolderByName(), GetFolderCount(), GetFolderIterator(), GetNextFolder(), OnDelete(), Serialize(), and ThreadScan().

CLibraryFolder* CLibraryFolder::m_pParent
 

Definition at line 46 of file SharedFolder.h.

Referenced by CLibraryFile::GetSearchName(), CLibraryFile::IsShared(), Scan(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::Update().

CString CLibraryFolder::m_sName
 

Definition at line 47 of file SharedFolder.h.

Referenced by CLibraryFolders::AddFolder(), CFolderTipCtrl::OnPrepare(), PathToName(), ThreadScan(), CLibraryFolderCtrl::Update(), and CLibraryTreeView::Update().

CString CLibraryFolder::m_sNameLC
 

Definition at line 48 of file SharedFolder.h.

Referenced by PathToName(), Serialize(), and ThreadScan().

CString CLibraryFolder::m_sPath
 

Definition at line 49 of file SharedFolder.h.

Referenced by CLibraryDetailView::CacheItem(), CLibraryTreeView::DropObjects(), GetFolderByPath(), CLibraryFile::GetPath(), CLibraryFile::GetSearchName(), CLibraryFolders::IsFolderShared(), CLibraryFolders::IsSubFolderShared(), CLibraryDetailView::ListCompare(), CURLExportDlg::OnCopy(), CWizardSharePage::OnInitDialog(), CFileGeneralPage::OnInitDialog(), CShareManagerDlg::OnInitDialog(), CLibraryTreeView::OnLibraryExplore(), CShareManagerDlg::OnOK(), CFileCopyDlg::OnOK(), CFolderTipCtrl::OnPrepare(), CLibraryTipCtrl::OnPrepare(), CFileCopyDlg::OnRun(), CURLExportDlg::OnSave(), CWizardSharePage::OnWizardNext(), PathToName(), CLibraryFile::SaveMetadata(), Serialize(), SetMonitor(), ThreadScan(), CLibraryFolders::ThreadScan(), CFilePropertiesDlg::Update(), CLibraryFolderCtrl::Update(), CLibraryTreeView::Update(), and CLibraryMetaPanel::Update().

STDMETHOD( CLibraryFolder::put_Shared)(STRISTATE nValue) [protected]
 


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