diff options
author | theuni <theuni-nospam-@xbmc.org> | 2011-01-24 16:05:21 -0500 |
---|---|---|
committer | theuni <theuni-nospam-@xbmc.org> | 2011-01-24 16:05:21 -0500 |
commit | c51b1189e3d5353e842991f5859ddcea0f73e426 (patch) | |
tree | ef2cb8a6184699aa614f3655dca4ce661cdc108e /lib/UnrarXLib/scantree.hpp | |
parent | be61ebdc9e897fe40c6f371111724de79ddee8d5 (diff) |
Merged cptspiff's code-reshuffle branch.
Squashed commit due to build breakage during code-reshuffle history.
Conflicts:
xbmc/Util.cpp
xbmc/cdrip/CDDARipper.cpp
xbmc/filesystem/Directory.cpp
xbmc/filesystem/File.cpp
Diffstat (limited to 'lib/UnrarXLib/scantree.hpp')
-rw-r--r-- | lib/UnrarXLib/scantree.hpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/UnrarXLib/scantree.hpp b/lib/UnrarXLib/scantree.hpp new file mode 100644 index 0000000000..956040cc7e --- /dev/null +++ b/lib/UnrarXLib/scantree.hpp @@ -0,0 +1,52 @@ +#ifndef _RAR_SCANTREE_ +#define _RAR_SCANTREE_ + +enum { RECURSE_NONE=0,RECURSE_ALWAYS,RECURSE_WILDCARDS }; +enum { SCAN_SKIPDIRS=0,SCAN_GETDIRS,SCAN_GETDIRSTWICE,SCAN_GETCURDIRS }; +enum { SCAN_SUCCESS,SCAN_DONE,SCAN_ERROR,SCAN_NEXT }; + +#define MAXSCANDEPTH (NM/2) + +class CommandData; + +class ScanTree +{ + private: + bool PrepareMasks(); + int FindProc(FindData *FindData); + + FindFile *FindStack[MAXSCANDEPTH]; + int Depth; + + int SetAllMaskDepth; + + StringList *FileMasks; + int Recurse; + bool GetLinks; + int GetDirs; + int Errors; + + char CurMask[NM]; + wchar CurMaskW[NM]; + char OrigCurMask[NM]; + wchar OrigCurMaskW[NM]; + bool SearchAllInRoot; + bool FastFindFile; + int SpecPathLength; + int SpecPathLengthW; + + char ErrArcName[NM]; + + CommandData *Cmd; + public: + ScanTree(StringList *FileMasks,int Recurse,bool GetLinks,int GetDirs); + ~ScanTree(); + int GetNext(FindData *FindData); + int GetSpecPathLength() {return(SpecPathLength);}; + int GetSpecPathLengthW() {return(SpecPathLengthW);}; + int GetErrors() {return(Errors);}; + void SetErrArcName(const char *Name) {strcpy(ErrArcName,Name);} + void SetCommandData(CommandData *Cmd) {ScanTree::Cmd=Cmd;} +}; + +#endif |