Files
Aaru.Compression.Native/3rdparty/lzma/CPP/7zip/UI/Common/Extract.h

107 lines
2.2 KiB
C
Raw Normal View History

2021-10-19 21:27:23 +01:00
// Extract.h
2023-09-24 03:13:03 +01:00
#ifndef ZIP7_INC_EXTRACT_H
#define ZIP7_INC_EXTRACT_H
2021-10-19 21:27:23 +01:00
#include "../../../Windows/FileFind.h"
#include "../../Archive/IArchive.h"
#include "ArchiveExtractCallback.h"
#include "ArchiveOpenCallback.h"
#include "ExtractMode.h"
#include "Property.h"
#include "../Common/LoadCodecs.h"
struct CExtractOptionsBase
{
CBoolPair ElimDup;
2023-09-24 03:13:03 +01:00
bool ExcludeDirItems;
bool ExcludeFileItems;
2021-10-19 21:27:23 +01:00
bool PathMode_Force;
bool OverwriteMode_Force;
NExtract::NPathMode::EEnum PathMode;
NExtract::NOverwriteMode::EEnum OverwriteMode;
2023-09-24 03:13:03 +01:00
NExtract::NZoneIdMode::EEnum ZoneMode;
2021-10-19 21:27:23 +01:00
FString OutputDir;
CExtractNtOptions NtOptions;
2023-09-24 03:13:03 +01:00
UString HashDir;
2021-10-19 21:27:23 +01:00
CExtractOptionsBase():
2023-09-24 03:13:03 +01:00
ExcludeDirItems(false),
ExcludeFileItems(false),
2021-10-19 21:27:23 +01:00
PathMode_Force(false),
OverwriteMode_Force(false),
PathMode(NExtract::NPathMode::kFullPaths),
2023-09-24 03:13:03 +01:00
OverwriteMode(NExtract::NOverwriteMode::kAsk),
ZoneMode(NExtract::NZoneIdMode::kNone)
2021-10-19 21:27:23 +01:00
{}
};
struct CExtractOptions: public CExtractOptionsBase
{
bool StdInMode;
bool StdOutMode;
bool YesToAll;
bool TestMode;
// bool ShowDialog;
// bool PasswordEnabled;
// UString Password;
2023-09-24 03:13:03 +01:00
#ifndef Z7_SFX
2021-10-19 21:27:23 +01:00
CObjectVector<CProperty> Properties;
#endif
2023-09-24 03:13:03 +01:00
/*
#ifdef Z7_EXTERNAL_CODECS
2021-10-19 21:27:23 +01:00
CCodecs *Codecs;
#endif
2023-09-24 03:13:03 +01:00
*/
2021-10-19 21:27:23 +01:00
CExtractOptions():
StdInMode(false),
StdOutMode(false),
YesToAll(false),
TestMode(false)
{}
};
struct CDecompressStat
{
UInt64 NumArchives;
UInt64 UnpackSize;
UInt64 AltStreams_UnpackSize;
UInt64 PackSize;
UInt64 NumFolders;
UInt64 NumFiles;
UInt64 NumAltStreams;
void Clear()
{
NumArchives = UnpackSize = AltStreams_UnpackSize = PackSize = NumFolders = NumFiles = NumAltStreams = 0;
}
};
HRESULT Extract(
2023-09-24 03:13:03 +01:00
// DECL_EXTERNAL_CODECS_LOC_VARS
2021-10-19 21:27:23 +01:00
CCodecs *codecs,
const CObjectVector<COpenType> &types,
const CIntVector &excludedFormats,
UStringVector &archivePaths, UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
const CExtractOptions &options,
IOpenCallbackUI *openCallback,
IExtractCallbackUI *extractCallback,
2023-09-24 03:13:03 +01:00
IFolderArchiveExtractCallback *faeCallback,
#ifndef Z7_SFX
2021-10-19 21:27:23 +01:00
IHashCalc *hash,
#endif
UString &errorMessage,
CDecompressStat &st);
#endif