sbFileScanQuery Class Reference

#include <sbFileScan.h>

Inheritance diagram for sbFileScanQuery:
[legend]
Collaboration diagram for sbFileScanQuery:
[legend]

Public Member Functions

 sbFileScanQuery ()
 
 sbFileScanQuery (const nsString &strDirectory, const PRBool &bRecurse, sbIFileScanCallback *pCallback)
 
virtual ~sbFileScanQuery ()
 
void init ()
 
- Public Member Functions inherited from sbIFileScanQuery
void setDirectory (in AString strDirectory)
 Set the directory to scan. More...
 
AString getDirectory ()
 Get the directory to scan. More...
 
void setRecurse (in PRBool bRecurse)
 Set the scan to run recursively under the given directory. More...
 
PRBool getRecurse ()
 Whether or not the scan will run recursively. More...
 
void addFileExtension (in AString strExtension)
 
void addFlaggedFileExtension (in AString strExtension)
 Add an extension that will not be added to the final discovered paths but will set the |flaggedExtensionsFound| attribute to true if a file with the specified extension is found during the scan. More...
 
void setCallback (in sbIFileScanCallback pCallback)
 Set the callback object for the scan. More...
 
sbIFileScanCallback getCallback ()
 Get the callback object for the scan. More...
 
PRUint32 getFileCount ()
 Get the number of files found. More...
 
PRUint32 getFlaggedFileCount ()
 Get the number of flagged files found. More...
 
void addFilePath (in AString strFilePath)
 USER CODE SHOULD NOT REFERENCE THIS METHOD. More...
 
AString getFilePath (in PRUint32 nIndex)
 Get the N'th file from the results of the scan. More...
 
AString getFlaggedFilePath (in PRUint32 nIndex)
 Get the N'th flagged file from the results of the scan. More...
 
PRBool isScanning ()
 Whether or not the scan operation is executing. More...
 
void setIsScanning (in PRBool bIsScanning)
 USER CODE SHOULD NOT REFERENCE THIS METHOD. More...
 
AString getLastFileFound ()
 Returns the most recent file found by the scan. More...
 
AString getCurrentScanPath ()
 Returns the most recent directory scanned. More...
 
void setCurrentScanPath (in AString strScanPath)
 USER CODE SHOULD NOT REFERENCE THIS METHOD. More...
 
void cancel ()
 Cancel the current scanning loop. More...
 
nsIArray getResultRangeAsURIStrings (in unsigned long aStartIndex, in unsigned long aEndIndex)
 
PRBool isCancelled ()
 USER CODE SHOULD NOT REFERENCE THIS METHOD. More...
 

Protected Member Functions

nsString GetExtensionFromFilename (const nsAString &strFilename)
 
PRBool VerifyFileExtension (const nsAString &strExtension, PRBool *aOutIsFlaggedExtension)
 

Protected Attributes

PRLock * m_pDirectoryLock
 
nsString m_strDirectory
 
PRLock * m_pCurrentPathLock
 
nsString m_strCurrentPath
 
PRBool m_bSearchHidden
 
PRBool m_bRecurse
 
PRBool m_bWantLibraryContentURIs
 
PRLock * m_pScanningLock
 
PRBool m_bIsScanning
 
PRLock * m_pCallbackLock
 
nsCOMPtr< sbIFileScanCallbackm_pCallback
 
nsCOMPtr< nsIMutableArray > m_pFileStack
 
nsCOMPtr< nsIMutableArray > m_pFlaggedFileStack
 
PRLock * m_pExtensionsLock
 
nsTHashtable< nsStringHashKey > m_Extensions
 
PRLock * m_pFlaggedFileExtensionsLock
 
nsTHashtable< nsStringHashKey > m_FlaggedExtensions
 
nsString m_lastSeenExtension
 
PRLock * m_pCancelLock
 
PRBool m_bCancel
 

Additional Inherited Members

- Public Attributes inherited from sbIFileScanQuery
attribute boolean searchHidden
 
readonly attribute boolean flaggedExtensionsFound
 Returns true if a flagged file extension set in |addFlaggedFileExtension()| was found during the file scan. More...
 
attribute boolean wantLibraryContentURIs
 

Detailed Description

Definition at line 82 of file sbFileScan.h.

Constructor & Destructor Documentation

sbFileScanQuery::sbFileScanQuery ( )

To log this module, set the following environment variable: NSPR_LOG_MODULES=sbMediaImportFileScan:5

Definition at line 70 of file sbFileScan.cpp.

sbFileScanQuery::sbFileScanQuery ( const nsString &  strDirectory,
const PRBool &  bRecurse,
sbIFileScanCallback pCallback 
)

Definition at line 97 of file sbFileScan.cpp.

Here is the call graph for this function:

sbFileScanQuery::~sbFileScanQuery ( )
virtual

Definition at line 151 of file sbFileScan.cpp.

Member Function Documentation

nsString sbFileScanQuery::GetExtensionFromFilename ( const nsAString &  strFilename)
protected

Definition at line 546 of file sbFileScan.cpp.

void sbFileScanQuery::init ( )

Definition at line 127 of file sbFileScan.cpp.

Here is the caller graph for this function:

PRBool sbFileScanQuery::VerifyFileExtension ( const nsAString &  strExtension,
PRBool *  aOutIsFlaggedExtension 
)
protected

Definition at line 558 of file sbFileScan.cpp.

Member Data Documentation

PRBool sbFileScanQuery::m_bCancel
protected

Definition at line 132 of file sbFileScan.h.

PRBool sbFileScanQuery::m_bIsScanning
protected

Definition at line 113 of file sbFileScan.h.

PRBool sbFileScanQuery::m_bRecurse
protected

Definition at line 109 of file sbFileScan.h.

PRBool sbFileScanQuery::m_bSearchHidden
protected

Definition at line 108 of file sbFileScan.h.

PRBool sbFileScanQuery::m_bWantLibraryContentURIs
protected

Definition at line 110 of file sbFileScan.h.

nsTHashtable<nsStringHashKey> sbFileScanQuery::m_Extensions
protected

Definition at line 123 of file sbFileScan.h.

nsTHashtable<nsStringHashKey> sbFileScanQuery::m_FlaggedExtensions
protected

Definition at line 126 of file sbFileScan.h.

nsString sbFileScanQuery::m_lastSeenExtension
protected

Definition at line 129 of file sbFileScan.h.

nsCOMPtr<sbIFileScanCallback> sbFileScanQuery::m_pCallback
protected

Definition at line 116 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pCallbackLock
protected

Definition at line 115 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pCancelLock
protected

Definition at line 131 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pCurrentPathLock
protected

Definition at line 105 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pDirectoryLock
protected

Definition at line 102 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pExtensionsLock
protected

Definition at line 122 of file sbFileScan.h.

nsCOMPtr<nsIMutableArray> sbFileScanQuery::m_pFileStack
protected

Definition at line 119 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pFlaggedFileExtensionsLock
protected

Definition at line 125 of file sbFileScan.h.

nsCOMPtr<nsIMutableArray> sbFileScanQuery::m_pFlaggedFileStack
protected

Definition at line 120 of file sbFileScan.h.

PRLock* sbFileScanQuery::m_pScanningLock
protected

Definition at line 112 of file sbFileScan.h.

nsString sbFileScanQuery::m_strCurrentPath
protected

Definition at line 106 of file sbFileScan.h.

nsString sbFileScanQuery::m_strDirectory
protected

Definition at line 103 of file sbFileScan.h.


The documentation for this class was generated from the following files: