ZipRegistry.h revision baa3858d3f5d128a5c8466b700098109edcad5f2
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
11namespace 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}
24
25namespace NCompression
26{
27  struct CFormatOptions
28  {
29    UInt32 Level;
30    UInt32 Dictionary;
31    UInt32 Order;
32    UInt32 BlockLogSize;
33    UInt32 NumThreads;
34
35    CSysString FormatID;
36    UString Method;
37    UString Options;
38    UString EncryptionMethod;
39
40    void ResetForLevelChange()
41    {
42      BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1);
43      Method.Empty();
44      // Options.Empty();
45      // EncryptionMethod.Empty();
46    }
47    CFormatOptions() { ResetForLevelChange(); }
48  };
49
50  struct CInfo
51  {
52    UInt32 Level;
53    bool ShowPassword;
54    bool EncryptHeaders;
55    UString ArcType;
56    UStringVector ArcPaths;
57
58    CObjectVector<CFormatOptions> Formats;
59
60    void Save() const;
61    void Load();
62  };
63}
64
65namespace NWorkDir
66{
67  namespace NMode
68  {
69    enum EEnum
70    {
71      kSystem,
72      kCurrent,
73      kSpecified
74    };
75  }
76  struct CInfo
77  {
78    NMode::EEnum Mode;
79    UString Path;
80    bool ForRemovableOnly;
81
82    void SetForRemovableOnlyDefault() { ForRemovableOnly = true; }
83    void SetDefault()
84    {
85      Mode = NMode::kSystem;
86      Path.Empty();
87      SetForRemovableOnlyDefault();
88    }
89
90    void Save() const;
91    void Load();
92  };
93}
94
95
96struct CContextMenuInfo
97{
98  bool Cascaded;
99  UInt32 Flags;
100
101  void Save() const;
102  void Load();
103};
104
105#endif
106