mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 14:11:34 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -1,7 +1,5 @@
|
||||
// ExtractCallback.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __EXTRACTCALLBACK_H
|
||||
#define __EXTRACTCALLBACK_H
|
||||
|
||||
@@ -20,14 +18,18 @@
|
||||
#include "LangUtils.h"
|
||||
#endif
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
#include "../IPassword.h"
|
||||
#endif
|
||||
#include "Common/MyCom.h"
|
||||
#include "IFolder.h"
|
||||
|
||||
class CExtractCallbackImp:
|
||||
public IFolderArchiveExtractCallback,
|
||||
public IExtractCallbackUI,
|
||||
public IFolderOperationsExtractCallback,
|
||||
#ifndef _NO_CRYPTO
|
||||
public ICryptoGetTextPassword,
|
||||
#endif
|
||||
public CMyUnknownImp
|
||||
{
|
||||
public:
|
||||
@@ -38,59 +40,85 @@ public:
|
||||
)
|
||||
|
||||
// IProgress
|
||||
STDMETHOD(SetTotal)(UINT64 total);
|
||||
STDMETHOD(SetCompleted)(const UINT64 *completeValue);
|
||||
STDMETHOD(SetTotal)(UInt64 total);
|
||||
STDMETHOD(SetCompleted)(const UInt64 *completeValue);
|
||||
|
||||
// IFolderArchiveExtractCallback
|
||||
STDMETHOD(AskOverwrite)(
|
||||
const wchar_t *existName, const FILETIME *existTime, const UINT64 *existSize,
|
||||
const wchar_t *newName, const FILETIME *newTime, const UINT64 *newSize,
|
||||
INT32 *answer);
|
||||
STDMETHOD (PrepareOperation)(const wchar_t *name, INT32 askExtractMode);
|
||||
const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
|
||||
const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
|
||||
Int32 *answer);
|
||||
STDMETHOD (PrepareOperation)(const wchar_t *name, Int32 askExtractMode, const UInt64 *position);
|
||||
|
||||
STDMETHOD(MessageError)(const wchar_t *message);
|
||||
STDMETHOD(SetOperationResult)(INT32 operationResult);
|
||||
STDMETHOD(SetOperationResult)(Int32 operationResult);
|
||||
|
||||
// IExtractCallbackUI
|
||||
|
||||
HRESULT BeforeOpen(const wchar_t *name);
|
||||
HRESULT OpenResult(const wchar_t *name, HRESULT result);
|
||||
HRESULT ThereAreNoFiles();
|
||||
HRESULT ExtractResult(HRESULT result);
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
HRESULT SetPassword(const UString &password);
|
||||
#endif
|
||||
|
||||
// IFolderOperationsExtractCallback
|
||||
STDMETHOD(AskWrite)(
|
||||
const wchar_t *srcPath,
|
||||
INT32 srcIsFolder,
|
||||
Int32 srcIsFolder,
|
||||
const FILETIME *srcTime,
|
||||
const UINT64 *srcSize,
|
||||
const UInt64 *srcSize,
|
||||
const wchar_t *destPathRequest,
|
||||
BSTR *destPathResult,
|
||||
INT32 *writeAnswer);
|
||||
Int32 *writeAnswer);
|
||||
STDMETHOD(ShowMessage)(const wchar_t *message);
|
||||
STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath);
|
||||
|
||||
// ICryptoGetTextPassword
|
||||
#ifndef _NO_CRYPTO
|
||||
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// CSysString _directoryPath;
|
||||
// CSysString m_DiskFilePath;
|
||||
// bool _extractMode;
|
||||
UString _currentArchivePath;
|
||||
bool _needWriteArchivePath;
|
||||
|
||||
UString _currentFilePath;
|
||||
NExtractionMode::NOverwrite::EEnum _overwriteMode;
|
||||
|
||||
bool _passwordIsDefined;
|
||||
UString _password;
|
||||
|
||||
// void CreateComplexDirectory(const UStringVector &aDirPathParts);
|
||||
|
||||
void AddErrorMessage(LPCTSTR message);
|
||||
void AddErrorMessage(LPCWSTR message);
|
||||
public:
|
||||
CProgressDialog ProgressDialog;
|
||||
CSysStringVector _messages;
|
||||
HWND _parentWindow;
|
||||
CSysStringVector Messages;
|
||||
HWND ParentWindow;
|
||||
INT_PTR StartProgressDialog(const UString &title)
|
||||
{
|
||||
return ProgressDialog.Create(title, _parentWindow);
|
||||
return ProgressDialog.Create(title, ParentWindow);
|
||||
}
|
||||
UInt32 NumArchiveErrors;
|
||||
NExtract::NOverwriteMode::EEnum OverwriteMode;
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
bool PasswordIsDefined;
|
||||
UString Password;
|
||||
#endif
|
||||
|
||||
CExtractCallbackImp():
|
||||
#ifndef _NO_CRYPTO
|
||||
PasswordIsDefined(false),
|
||||
#endif
|
||||
OverwriteMode(NExtract::NOverwriteMode::kAskBefore),
|
||||
ParentWindow(0)
|
||||
{}
|
||||
|
||||
~CExtractCallbackImp();
|
||||
void Init(NExtractionMode::NOverwrite::EEnum overwriteMode,
|
||||
bool passwordIsDefined, const UString &password);
|
||||
void Init();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user