| OLD | NEW |
| (Empty) |
| 1 // ArchiveCommandLine.h | |
| 2 | |
| 3 #ifndef __ARCHIVECOMMANDLINE_H | |
| 4 #define __ARCHIVECOMMANDLINE_H | |
| 5 | |
| 6 #include "Common/Wildcard.h" | |
| 7 #include "Common/CommandLineParser.h" | |
| 8 | |
| 9 #include "Extract.h" | |
| 10 #include "Update.h" | |
| 11 | |
| 12 struct CArchiveCommandLineException: public AString | |
| 13 { | |
| 14 CArchiveCommandLineException(const char *errorMessage): AString(errorMessage)
{} | |
| 15 }; | |
| 16 | |
| 17 namespace NCommandType { enum EEnum | |
| 18 { | |
| 19 kAdd = 0, | |
| 20 kUpdate, | |
| 21 kDelete, | |
| 22 kTest, | |
| 23 kExtract, | |
| 24 kFullExtract, | |
| 25 kList, | |
| 26 kBenchmark, | |
| 27 kInfo | |
| 28 };} | |
| 29 | |
| 30 namespace NRecursedType { enum EEnum | |
| 31 { | |
| 32 kRecursed, | |
| 33 kWildCardOnlyRecursed, | |
| 34 kNonRecursed | |
| 35 };} | |
| 36 | |
| 37 struct CArchiveCommand | |
| 38 { | |
| 39 NCommandType::EEnum CommandType; | |
| 40 bool IsFromExtractGroup() const; | |
| 41 bool IsFromUpdateGroup() const; | |
| 42 bool IsTestMode() const { return CommandType == NCommandType::kTest; } | |
| 43 NExtract::NPathMode::EEnum GetPathMode() const; | |
| 44 }; | |
| 45 | |
| 46 struct CArchiveCommandLineOptions | |
| 47 { | |
| 48 bool HelpMode; | |
| 49 | |
| 50 #ifdef _WIN32 | |
| 51 bool LargePages; | |
| 52 #endif | |
| 53 | |
| 54 bool IsInTerminal; | |
| 55 bool IsStdOutTerminal; | |
| 56 bool IsStdErrTerminal; | |
| 57 bool StdInMode; | |
| 58 bool StdOutMode; | |
| 59 bool EnableHeaders; | |
| 60 | |
| 61 bool YesToAll; | |
| 62 bool ShowDialog; | |
| 63 // NWildcard::CCensor ArchiveWildcardCensor; | |
| 64 NWildcard::CCensor WildcardCensor; | |
| 65 | |
| 66 CArchiveCommand Command; | |
| 67 UString ArchiveName; | |
| 68 | |
| 69 #ifndef _NO_CRYPTO | |
| 70 bool PasswordEnabled; | |
| 71 UString Password; | |
| 72 #endif | |
| 73 | |
| 74 bool TechMode; | |
| 75 // Extract | |
| 76 bool AppendName; | |
| 77 UString OutputDir; | |
| 78 NExtract::NOverwriteMode::EEnum OverwriteMode; | |
| 79 UStringVector ArchivePathsSorted; | |
| 80 UStringVector ArchivePathsFullSorted; | |
| 81 CObjectVector<CProperty> ExtractProperties; | |
| 82 | |
| 83 CUpdateOptions UpdateOptions; | |
| 84 UString ArcType; | |
| 85 bool EnablePercents; | |
| 86 | |
| 87 // Benchmark | |
| 88 UInt32 NumIterations; | |
| 89 UInt32 NumThreads; | |
| 90 UInt32 DictionarySize; | |
| 91 UString Method; | |
| 92 | |
| 93 | |
| 94 CArchiveCommandLineOptions(): StdInMode(false), StdOutMode(false) {}; | |
| 95 }; | |
| 96 | |
| 97 class CArchiveCommandLineParser | |
| 98 { | |
| 99 NCommandLineParser::CParser parser; | |
| 100 public: | |
| 101 CArchiveCommandLineParser(); | |
| 102 void Parse1(const UStringVector &commandStrings, CArchiveCommandLineOptions &o
ptions); | |
| 103 void Parse2(CArchiveCommandLineOptions &options); | |
| 104 }; | |
| 105 | |
| 106 #endif | |
| OLD | NEW |