1 // ZipRegistry.h 2 3 #ifndef __ZIP_REGISTRY_H 4 #define __ZIP_REGISTRY_H 5 6 #include "Common/MyString.h" 7 #include "Common/Types.h" 8 9 #include "ExtractMode.h" 10 11 namespace NExtract 12 { 13 struct CInfo 14 { 15 NPathMode::EEnum PathMode; 16 NOverwriteMode::EEnum OverwriteMode; 17 bool ShowPassword; 18 UStringVector Paths; 19 20 void Save() const; 21 void Load(); 22 }; 23 void Save_ShowPassword(bool showPassword); 24 bool Read_ShowPassword(); 25 } 26 27 namespace NCompression 28 { 29 struct CFormatOptions 30 { 31 UInt32 Level; 32 UInt32 Dictionary; 33 UInt32 Order; 34 UInt32 BlockLogSize; 35 UInt32 NumThreads; 36 37 CSysString FormatID; 38 UString Method; 39 UString Options; 40 UString EncryptionMethod; 41 ResetForLevelChangeCFormatOptions42 void ResetForLevelChange() 43 { 44 BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1); 45 Method.Empty(); 46 // Options.Empty(); 47 // EncryptionMethod.Empty(); 48 } CFormatOptionsCFormatOptions49 CFormatOptions() { ResetForLevelChange(); } 50 }; 51 52 struct CInfo 53 { 54 UInt32 Level; 55 bool ShowPassword; 56 bool EncryptHeaders; 57 UString ArcType; 58 UStringVector ArcPaths; 59 60 CObjectVector<CFormatOptions> Formats; 61 62 void Save() const; 63 void Load(); 64 }; 65 } 66 67 namespace NWorkDir 68 { 69 namespace NMode 70 { 71 enum EEnum 72 { 73 kSystem, 74 kCurrent, 75 kSpecified 76 }; 77 } 78 struct CInfo 79 { 80 NMode::EEnum Mode; 81 FString Path; 82 bool ForRemovableOnly; 83 SetForRemovableOnlyDefaultCInfo84 void SetForRemovableOnlyDefault() { ForRemovableOnly = true; } SetDefaultCInfo85 void SetDefault() 86 { 87 Mode = NMode::kSystem; 88 Path.Empty(); 89 SetForRemovableOnlyDefault(); 90 } 91 92 void Save() const; 93 void Load(); 94 }; 95 } 96 97 98 struct CContextMenuInfo 99 { 100 bool Cascaded; 101 UInt32 Flags; 102 103 void Save() const; 104 void Load(); 105 }; 106 107 #endif 108