mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 06:06:59 -06:00
9.04 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
8874e4fbc9
commit
829409452d
@@ -1,19 +1,23 @@
|
||||
// ArchiveExtractCallback.h
|
||||
|
||||
#ifndef __ARCHIVEEXTRACTCALLBACK_H
|
||||
#define __ARCHIVEEXTRACTCALLBACK_H
|
||||
#ifndef __ARCHIVE_EXTRACT_CALLBACK_H
|
||||
#define __ARCHIVE_EXTRACT_CALLBACK_H
|
||||
|
||||
#include "../../Archive/IArchive.h"
|
||||
#include "IFileExtractCallback.h"
|
||||
|
||||
#include "Common/MyString.h"
|
||||
#include "Common/MyCom.h"
|
||||
#include "Common/Wildcard.h"
|
||||
|
||||
#include "../../IPassword.h"
|
||||
|
||||
#include "../../Common/FileStreams.h"
|
||||
#include "../../Common/ProgressUtils.h"
|
||||
#include "../../IPassword.h"
|
||||
|
||||
#include "../../Archive/IArchive.h"
|
||||
|
||||
#include "../../Archive/Common/OutStreamWithCRC.h"
|
||||
|
||||
#include "ExtractMode.h"
|
||||
#include "IFileExtractCallback.h"
|
||||
#include "OpenArchive.h"
|
||||
|
||||
class CArchiveExtractCallback:
|
||||
public IArchiveExtractCallback,
|
||||
@@ -22,22 +26,8 @@ class CArchiveExtractCallback:
|
||||
public ICompressProgressInfo,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
public:
|
||||
MY_UNKNOWN_IMP2(ICryptoGetTextPassword, ICompressProgressInfo)
|
||||
// COM_INTERFACE_ENTRY(IArchiveVolumeExtractCallback)
|
||||
|
||||
INTERFACE_IArchiveExtractCallback(;)
|
||||
|
||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
||||
|
||||
// IArchiveVolumeExtractCallback
|
||||
// STDMETHOD(GetInStream)(const wchar_t *name, ISequentialInStream **inStream);
|
||||
|
||||
// ICryptoGetTextPassword
|
||||
STDMETHOD(CryptoGetTextPassword)(BSTR *aPassword);
|
||||
|
||||
private:
|
||||
CMyComPtr<IInArchive> _archiveHandler;
|
||||
const CArc *_arc;
|
||||
const NWildcard::CCensorNode *_wildcardCensor;
|
||||
CMyComPtr<IFolderArchiveExtractCallback> _extractCallback2;
|
||||
CMyComPtr<ICompressProgressInfo> _compressProgress;
|
||||
CMyComPtr<ICryptoGetTextPassword> _cryptoGetTextPassword;
|
||||
@@ -45,12 +35,11 @@ private:
|
||||
NExtract::NPathMode::EEnum _pathMode;
|
||||
NExtract::NOverwriteMode::EEnum _overwriteMode;
|
||||
|
||||
UString _diskFilePath;
|
||||
UString _filePath;
|
||||
UInt64 _position;
|
||||
bool _isSplit;
|
||||
|
||||
UString _diskFilePath;
|
||||
|
||||
bool _extractMode;
|
||||
|
||||
bool WriteCTime;
|
||||
@@ -64,29 +53,61 @@ private:
|
||||
FILETIME CTime;
|
||||
FILETIME ATime;
|
||||
FILETIME MTime;
|
||||
UInt32 Attributes;
|
||||
UInt32 Attrib;
|
||||
|
||||
bool CTimeDefined;
|
||||
bool ATimeDefined;
|
||||
bool MTimeDefined;
|
||||
bool AttribDefined;
|
||||
|
||||
bool IsDir;
|
||||
bool AttributesAreDefined;
|
||||
} _processedFileInfo;
|
||||
} _fi;
|
||||
|
||||
UInt32 _index;
|
||||
UInt64 _curSize;
|
||||
bool _curSizeDefined;
|
||||
COutFileStream *_outFileStreamSpec;
|
||||
CMyComPtr<ISequentialOutStream> _outFileStream;
|
||||
|
||||
COutStreamWithCRC *_crcStreamSpec;
|
||||
CMyComPtr<ISequentialOutStream> _crcStream;
|
||||
|
||||
UStringVector _removePathParts;
|
||||
|
||||
UString _itemDefaultName;
|
||||
FILETIME _utcMTimeDefault;
|
||||
UInt32 _attributesDefault;
|
||||
bool _stdOutMode;
|
||||
bool _testMode;
|
||||
bool _crcMode;
|
||||
bool _multiArchives;
|
||||
|
||||
CMyComPtr<ICompressProgressInfo> _localProgress;
|
||||
UInt64 _packTotal;
|
||||
UInt64 _unpTotal;
|
||||
|
||||
void CreateComplexDirectory(const UStringVector &dirPathParts, UString &fullPath);
|
||||
HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
|
||||
HRESULT GetUnpackSize();
|
||||
|
||||
public:
|
||||
|
||||
CLocalProgress *LocalProgressSpec;
|
||||
|
||||
UInt64 NumFolders;
|
||||
UInt64 NumFiles;
|
||||
UInt64 UnpackSize;
|
||||
UInt32 CrcSum;
|
||||
|
||||
MY_UNKNOWN_IMP2(ICryptoGetTextPassword, ICompressProgressInfo)
|
||||
// COM_INTERFACE_ENTRY(IArchiveVolumeExtractCallback)
|
||||
|
||||
INTERFACE_IArchiveExtractCallback(;)
|
||||
|
||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
||||
|
||||
// IArchiveVolumeExtractCallback
|
||||
// STDMETHOD(GetInStream)(const wchar_t *name, ISequentialInStream **inStream);
|
||||
|
||||
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
|
||||
|
||||
CArchiveExtractCallback():
|
||||
WriteCTime(true),
|
||||
WriteATime(true),
|
||||
@@ -97,37 +118,26 @@ public:
|
||||
_localProgress = LocalProgressSpec;
|
||||
}
|
||||
|
||||
CLocalProgress *LocalProgressSpec;
|
||||
CMyComPtr<ICompressProgressInfo> _localProgress;
|
||||
UInt64 _packTotal;
|
||||
UInt64 _unpTotal;
|
||||
|
||||
bool _multiArchives;
|
||||
UInt64 NumFolders;
|
||||
UInt64 NumFiles;
|
||||
UInt64 UnpackSize;
|
||||
|
||||
void InitForMulti(bool multiArchives,
|
||||
NExtract::NPathMode::EEnum pathMode,
|
||||
NExtract::NOverwriteMode::EEnum overwriteMode)
|
||||
{
|
||||
_multiArchives = multiArchives; NumFolders = NumFiles = UnpackSize = 0;
|
||||
_multiArchives = multiArchives;
|
||||
_pathMode = pathMode;
|
||||
_overwriteMode = overwriteMode;
|
||||
NumFolders = NumFiles = UnpackSize = 0;
|
||||
CrcSum = 0;
|
||||
}
|
||||
|
||||
void Init(
|
||||
IInArchive *archiveHandler,
|
||||
const NWildcard::CCensorNode *wildcardCensor,
|
||||
const CArc *arc,
|
||||
IFolderArchiveExtractCallback *extractCallback2,
|
||||
bool stdOutMode,
|
||||
bool stdOutMode, bool testMode, bool crcMode,
|
||||
const UString &directoryPath,
|
||||
const UStringVector &removePathParts,
|
||||
const UString &itemDefaultName,
|
||||
const FILETIME &utcMTimeDefault,
|
||||
UInt32 attributesDefault,
|
||||
UInt64 packSize);
|
||||
|
||||
UInt64 _numErrors;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user