#include <sbWatchFolder.h>
Classes | |
struct | ignorePathData_t |
struct | IgnoringCase |
Public Member Functions | |
sbWatchFolder () | |
virtual | ~sbWatchFolder () |
NS_DECL_ISUPPORTS NS_DECL_SBIWATCHFOLDER NS_DECL_SBIFILESYSTEMLISTENER NS_DECL_SBIMEDIALISTENUMERATIONLISTENER NS_DECL_NSITIMERCALLBACK NS_DECL_SBIJOBPROGRESSLISTENER nsresult | Init () |
Public Member Functions inherited from sbIWatchFolder | |
void | addIgnorePath (in AString aFilePath) |
Add a absolute file path to be ignored by the watch folder service. This path will be ignored until it is removed via a call to |removeIgnorePath()|. Each call to |addIgnorePath()| should be balanced by a call to |removeIgnorePath()|. When used in conjunction with |addIgnoreCount()|, the count will be decremented as normal when the path is ignored. The path will continue to be ignored when the count reaches zero. More... | |
void | removeIgnorePath (in AString aFilePath) |
Remove an absolute file path from the ignored paths list of the watch folder service. All future events at the specified path will be processed by the watch folders service. When used in conjunction with |addIgnoreCount()|, any remaining events specified by the count will still be ignored. More... | |
void | addIgnoreCount (in AString aFilePath, in long aCount) |
Add an absolute file path to be ignore by the watch folder service. This path will be ignored for the given number of events, which includes file addition, deletion, or change. When used in conjunction with |addIgnorePath()| and |removeIgnorPath()|, the counter will be decremented as events are ignored. The path may continue to be ignored after the count reaches zero if any calls to |addIgnorePath()| are not balanced by calls to |removeIgnorePath()|. More... | |
void | start (in ACString aSessionGuid) |
Starts watching. More... | |
ACString | stop () |
Stops watching. More... | |
void | setFolder (in AString aPath, in boolean aSynchronizeMediaList) |
Public Member Functions inherited from sbIFileSystemListener | |
void | onWatcherStarted () |
void | onWatcherStopped () |
void | onWatcherError (in unsigned long aErrorType, in AString aDescription) |
void | onFileSystemChanged (in AString aFilePath) |
void | onFileSystemRemoved (in AString aFilePath) |
void | onFileSystemAdded (in AString aFilePath) |
Public Member Functions inherited from sbIMediaListEnumerationListener | |
unsigned short | onEnumerationBegin (in sbIMediaList aMediaList) |
Called when enumeration is about to begin. More... | |
unsigned short | onEnumeratedItem (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem) |
Called once for each item in the enumeration. More... | |
void | onEnumerationEnd (in sbIMediaList aMediaList, in nsresult aStatusCode) |
Called when enumeration has completed. More... | |
Public Member Functions inherited from sbIJobProgressListener | |
void | onJobProgress (in sbIJobProgress aJobProgress) |
Notification that an object implementing sbIJobProgress has changed. More... | |
Protected Types | |
enum | EProcessType { eNone = 0, eRemoval = 1, eChanged = 2, eMoveOrRename = 3 } |
enum | EWatchFolderState { eNotSupported = 0, eDisabled = 1, eStarted = 2, eWatching = 3 } |
typedef std::set< nsString, IgnoringCase > | sbStringSet |
typedef sbStringSet::iterator | sbStringSetIter |
typedef std::map< nsString, ignorePathData_t, IgnoringCase > | sbStringMap |
Protected Member Functions | |
nsresult | InitInternal () |
nsresult | StartWatchingFolder () |
nsresult | StopWatchingFolder () |
nsresult | SetStartupDelayTimer () |
nsresult | SetEventPumpTimer () |
nsresult | ProcessEventPaths () |
nsresult | HandleEventPathList (sbStringSet &aEventPathSet, EProcessType aProcessType) |
nsresult | ProcessAddedPaths () |
nsresult | EnumerateItemsByPaths (sbStringSet &aPathSet) |
nsresult | GetURIArrayForStringPaths (sbStringSet &aPathsSet, nsIArray **aURIs) |
nsresult | GetFilePathURI (const nsAString &aFilePath, nsIURI **aURIRetVal) |
nsresult | GetSongbirdWindow (nsIDOMWindow **aSongbirdWindow) |
nsresult | HandleSessionLoadError () |
nsresult | Rescan () |
nsresult | HandleRootPathMissing () |
nsresult | DecrementIgnoredPathCount (const nsAString &aFilePath, PRBool *aIsIgnoredPath) |
Additional Inherited Members | |
Public Attributes inherited from sbIWatchFolder | |
attribute sbIMediaList | mediaList |
readonly attribute AString | path |
attribute sbIDirectoryImportService | importer |
attribute sbIMediacoreTypeSniffer | typeSniffer |
attribute sbIFileMetadataService | metadataScanner |
attribute boolean | canInteract |
readonly attribute boolean | isSupported |
readonly attribute boolean | isRunning |
Public Attributes inherited from sbIFileSystemListener | |
const unsigned long | ROOT_PATH_MISSING = 0 |
const unsigned long | INVALID_DIRECTORY = 1 |
const unsigned long | SESSION_LOAD_ERROR = 2 |
Public Attributes inherited from sbIMediaListEnumerationListener | |
const unsigned short | CONTINUE = 0 |
const unsigned short | CANCEL = 1 |
Definition at line 71 of file sbWatchFolder.h.
|
protected |
Definition at line 112 of file sbWatchFolder.h.
|
protected |
Definition at line 103 of file sbWatchFolder.h.
|
protected |
Definition at line 104 of file sbWatchFolder.h.
|
protected |
Enumerator | |
---|---|
eNone | |
eRemoval | |
eChanged | |
eMoveOrRename |
Definition at line 114 of file sbWatchFolder.h.
|
protected |
Enumerator | |
---|---|
eNotSupported | |
eDisabled | |
eStarted | |
eWatching |
Definition at line 121 of file sbWatchFolder.h.
sbWatchFolder::sbWatchFolder | ( | ) |
|
virtual |
Definition at line 84 of file sbWatchFolder.cpp.
|
protected |
Definition at line 687 of file sbWatchFolder.cpp.
|
protected |
Definition at line 462 of file sbWatchFolder.cpp.
|
protected |
|
protected |
|
protected |
Definition at line 400 of file sbWatchFolder.cpp.
|
protected |
Definition at line 326 of file sbWatchFolder.cpp.
|
protected |
|
protected |
nsresult sbWatchFolder::Init | ( | ) |
Definition at line 89 of file sbWatchFolder.cpp.
|
protected |
|
protected |
Definition at line 346 of file sbWatchFolder.cpp.
|
protected |
|
protected |
|
protected |
Definition at line 266 of file sbWatchFolder.cpp.
|
protected |
Definition at line 249 of file sbWatchFolder.cpp.
|
protected |
Definition at line 169 of file sbWatchFolder.cpp.
|
protected |
Definition at line 217 of file sbWatchFolder.cpp.