Files
nsis-plugin-ns7zip/versions/25.01-bundle/CPP/7zip/UI/NSIS/ExtractCallbackConsole.h
T
Simone 8968d0fd0c feat(25.01): add bundle wrapper directory with NSIS sources and vendor symlinks
Mirror the 26.00-bundle / 26.01-bundle approach for 25.01:

- versions/25.01-bundle/CPP/7zip/Bundles/Nsis7z/: project-owned NSIS plugin
  wrapper sources (api.h, nsis7z.cpp, pluginapi.*, resource.*, StdAfx*,
  Nsis7z.sln, Nsis7z.vcxproj, Nsis7z.vcxproj.filters, Nsis7z_vs2026.vcxproj).
- versions/25.01-bundle/CPP/7zip/UI/NSIS/: NSIS UI sources; StdAfx.h patched
  to use relative include path and MinGW-compatible Windows.h guard (the
  upstream 25.01 file used an absolute path incompatible with the bundle layout).
- versions/25.01-bundle/CPP/7zip/LzmaDec_gcc.mak: forwarding stub.
- versions/25.01-bundle/{C,Asm} and CPP sub-trees: symlinks into versions/25.01/.
- tools/linux/setup_25_01_bundle_symlinks.py: idempotent symlink-recreation script.
2026-05-03 01:38:45 +02:00

99 lines
2.3 KiB
C++

// ExtractCallbackConsole.h
// NSIS version adapted for 7-Zip 25.01 API
#ifndef __EXTRACTCALLBACKCONSOLE_H
#define __EXTRACTCALLBACKCONSOLE_H
#include "Common/MyCom.h"
#include "Common/MyString.h"
#include "Common/StdOutStream.h"
#include "../../Common/FileStreams.h"
#include "../../IPassword.h"
#include "../../Archive/IArchive.h"
#include "../Common/ArchiveExtractCallback.h"
#include "../Console/OpenCallbackConsole.h"
typedef void (*ExtractProgressHandler)(UInt64 completedSize, UInt64 totalSize);
typedef void (*ExtractProgressWithFileHandler)(UInt64 completedSize, UInt64 totalSize, const wchar_t *fileName);
class CExtractCallbackConsole Z7_final:
public IFolderArchiveExtractCallback,
public IExtractCallbackUI,
#ifndef Z7_NO_CRYPTO
public ICryptoGetTextPassword,
#endif
public COpenCallbackConsole,
public CMyUnknownImp
{
Z7_COM_QI_BEGIN2(IFolderArchiveExtractCallback)
#ifndef Z7_NO_CRYPTO
Z7_COM_QI_ENTRY(ICryptoGetTextPassword)
#endif
Z7_COM_QI_END
Z7_COM_ADDREF_RELEASE
// IProgress
Z7_IFACE_COM7_IMP(IProgress)
// IFolderArchiveExtractCallback
Z7_IFACE_COM7_IMP(IFolderArchiveExtractCallback)
// IExtractCallbackUI (non-COM interface)
Z7_IFACE_IMP(IExtractCallbackUI)
#ifndef Z7_NO_CRYPTO
Z7_IFACE_COM7_IMP(ICryptoGetTextPassword)
#endif
public:
#ifndef Z7_NO_CRYPTO
bool PasswordIsDefined;
UString Password;
#endif
UInt64 NumArchives;
UInt64 NumArchiveErrors;
UInt64 NumFileErrors;
UInt64 NumFileErrorsInCurrentArchive;
CStdOutStream *OutStream;
UInt64 totalSize, completedSize, lastVal;
ExtractProgressHandler ProgressHandler;
ExtractProgressWithFileHandler ProgressWithFileHandler;
UString CurrentFileName;
CExtractCallbackConsole():
PasswordIsDefined(false),
NumArchives(0),
NumArchiveErrors(0),
NumFileErrors(0),
NumFileErrorsInCurrentArchive(0),
OutStream(NULL),
totalSize((UInt64)(Int64)-1),
completedSize(0),
lastVal(0),
ProgressHandler(NULL),
ProgressWithFileHandler(NULL)
{}
void Init()
{
NumArchives = 0;
NumArchiveErrors = 0;
NumFileErrors = 0;
NumFileErrorsInCurrentArchive = 0;
totalSize = (UInt64)(Int64)-1;
completedSize = 0;
lastVal = 0;
ProgressHandler = NULL;
ProgressWithFileHandler = NULL;
}
void UpdateProgress();
};
#endif