summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h')
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h104
1 files changed, 94 insertions, 10 deletions
diff --git a/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h b/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
index 935f97bbaa4..6bc6977b611 100644
--- a/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
+++ b/3rdparty/lzma/CPP/7zip/UI/Common/ZipRegistry.h
@@ -1,13 +1,25 @@
// ZipRegistry.h
-#ifndef __ZIP_REGISTRY_H
-#define __ZIP_REGISTRY_H
+#ifndef ZIP7_INC_ZIP_REGISTRY_H
+#define ZIP7_INC_ZIP_REGISTRY_H
#include "../../../Common/MyTypes.h"
#include "../../../Common/MyString.h"
+#include "../../Common/MethodProps.h"
+
#include "ExtractMode.h"
+/*
+CBoolPair::Def in writing functions means:
+ if ( CBoolPair::Def ), we write CBoolPair::Val
+ if ( !CBoolPair::Def )
+ {
+ in NCompression functions we delete registry value
+ in another functions we do nothing
+ }
+*/
+
namespace NExtract
{
struct CInfo
@@ -35,27 +47,87 @@ namespace NExtract
namespace NCompression
{
+ struct CMemUse
+ {
+ // UString Str;
+ bool IsDefined;
+ bool IsPercent;
+ UInt64 Val;
+
+ CMemUse():
+ IsDefined(false),
+ IsPercent(false),
+ Val(0)
+ {}
+
+ void Clear()
+ {
+ // Str.Empty();
+ IsDefined = false;
+ IsPercent = false;
+ Val = 0;
+ }
+
+ UInt64 GetBytes(UInt64 ramSize) const
+ {
+ if (!IsPercent)
+ return Val;
+ return Calc_From_Val_Percents(ramSize, Val);
+ }
+ void Parse(const UString &s);
+ };
+
struct CFormatOptions
{
UInt32 Level;
UInt32 Dictionary;
+ // UInt32 DictionaryChain;
UInt32 Order;
UInt32 BlockLogSize;
UInt32 NumThreads;
+ UInt32 TimePrec;
+ CBoolPair MTime;
+ CBoolPair ATime;
+ CBoolPair CTime;
+ CBoolPair SetArcMTime;
+
CSysString FormatID;
UString Method;
UString Options;
UString EncryptionMethod;
+ UString MemUse;
+
+ void Reset_TimePrec()
+ {
+ TimePrec = (UInt32)(Int32)-1;
+ }
+
+ bool IsSet_TimePrec() const
+ {
+ return TimePrec != (UInt32)(Int32)-1;
+ }
+
+
+ void Reset_BlockLogSize()
+ {
+ BlockLogSize = (UInt32)(Int32)-1;
+ }
void ResetForLevelChange()
{
- BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1);
+ BlockLogSize = NumThreads = Level = Dictionary = Order = (UInt32)(Int32)-1;
+ // DictionaryChain = (UInt32)(Int32)-1;
Method.Empty();
// Options.Empty();
// EncryptionMethod.Empty();
}
- CFormatOptions() { ResetForLevelChange(); }
+ CFormatOptions()
+ {
+ // TimePrec = 0;
+ Reset_TimePrec();
+ ResetForLevelChange();
+ }
};
struct CInfo
@@ -63,16 +135,19 @@ namespace NCompression
UInt32 Level;
bool ShowPassword;
bool EncryptHeaders;
- UString ArcType;
- UStringVector ArcPaths;
-
- CObjectVector<CFormatOptions> Formats;
CBoolPair NtSecurity;
CBoolPair AltStreams;
CBoolPair HardLinks;
CBoolPair SymLinks;
+ CBoolPair PreserveATime;
+
+ UString ArcType;
+ UStringVector ArcPaths;
+
+ CObjectVector<CFormatOptions> Formats;
+
void Save() const;
void Load();
};
@@ -92,8 +167,8 @@ namespace NWorkDir
struct CInfo
{
NMode::EEnum Mode;
- FString Path;
bool ForRemovableOnly;
+ FString Path;
void SetForRemovableOnlyDefault() { ForRemovableOnly = true; }
void SetDefault()
@@ -114,9 +189,18 @@ struct CContextMenuInfo
CBoolPair Cascaded;
CBoolPair MenuIcons;
CBoolPair ElimDup;
-
+
bool Flags_Def;
UInt32 Flags;
+ UInt32 WriteZone;
+
+ /*
+ CContextMenuInfo():
+ Flags_Def(0),
+ WriteZone((UInt32)(Int32)-1),
+ Flags((UInt32)(Int32)-1)
+ {}
+ */
void Save() const;
void Load();