1 // ZipRegistry.h 2 3 #ifndef __ZIPREGISTRY_H 4 #define __ZIPREGISTRY_H 5 6 #include "Common/MyString.h" 7 #include "Common/Types.h" 8 #include "ExtractMode.h" 9 10 namespace NExtract 11 { 12 struct CInfo 13 { 14 NPathMode::EEnum PathMode; 15 NOverwriteMode::EEnum OverwriteMode; 16 UStringVector Paths; 17 bool ShowPassword; 18 }; 19 } 20 21 namespace NCompression { 22 23 struct CFormatOptions 24 { 25 CSysString FormatID; 26 UString Options; 27 UString Method; 28 UString EncryptionMethod; 29 UInt32 Level; 30 UInt32 Dictionary; 31 UInt32 Order; 32 UInt32 BlockLogSize; 33 UInt32 NumThreads; ResetForLevelChangeCFormatOptions34 void ResetForLevelChange() 35 { 36 BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1); 37 Method.Empty(); 38 // EncryptionMethod.Empty(); 39 // Options.Empty(); 40 } CFormatOptionsCFormatOptions41 CFormatOptions() { ResetForLevelChange(); } 42 }; 43 44 struct CInfo 45 { 46 UStringVector HistoryArchives; 47 UInt32 Level; 48 UString ArchiveType; 49 50 CObjectVector<CFormatOptions> FormatOptionsVector; 51 52 bool ShowPassword; 53 bool EncryptHeaders; 54 }; 55 } 56 57 namespace NWorkDir{ 58 59 namespace NMode 60 { 61 enum EEnum 62 { 63 kSystem, 64 kCurrent, 65 kSpecified 66 }; 67 } 68 struct CInfo 69 { 70 NMode::EEnum Mode; 71 UString Path; 72 bool ForRemovableOnly; SetForRemovableOnlyDefaultCInfo73 void SetForRemovableOnlyDefault() { ForRemovableOnly = true; } SetDefaultCInfo74 void SetDefault() 75 { 76 Mode = NMode::kSystem; 77 Path.Empty(); 78 SetForRemovableOnlyDefault(); 79 } 80 }; 81 } 82 83 void SaveExtractionInfo(const NExtract::CInfo &info); 84 void ReadExtractionInfo(NExtract::CInfo &info); 85 86 void SaveCompressionInfo(const NCompression::CInfo &info); 87 void ReadCompressionInfo(NCompression::CInfo &info); 88 89 void SaveWorkDirInfo(const NWorkDir::CInfo &info); 90 void ReadWorkDirInfo(NWorkDir::CInfo &info); 91 92 void SaveCascadedMenu(bool enabled); 93 bool ReadCascadedMenu(); 94 95 void SaveContextMenuStatus(UInt32 value); 96 bool ReadContextMenuStatus(UInt32 &value); 97 98 #endif 99