Files
Aaru.Compression.Native/3rdparty/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h

69 lines
1.3 KiB
C
Raw Permalink Normal View History

2021-10-19 21:27:23 +01:00
// OpenCallbackConsole.h
2023-09-24 03:13:03 +01:00
#ifndef ZIP7_INC_OPEN_CALLBACK_CONSOLE_H
#define ZIP7_INC_OPEN_CALLBACK_CONSOLE_H
2021-10-19 21:27:23 +01:00
#include "../../../Common/StdOutStream.h"
#include "../Common/ArchiveOpenCallback.h"
#include "PercentPrinter.h"
class COpenCallbackConsole: public IOpenCallbackUI
{
protected:
CPercentPrinter _percent;
CStdOutStream *_so;
CStdOutStream *_se;
// UInt64 _totalFiles;
UInt64 _totalBytes;
2023-09-24 03:13:03 +01:00
bool _totalFilesDefined;
// bool _totalBytesDefined;
2021-10-19 21:27:23 +01:00
bool NeedPercents() const { return _percent._so != NULL; }
public:
bool MultiArcMode;
void ClosePercents()
{
if (NeedPercents())
_percent.ClosePrint(true);
}
COpenCallbackConsole():
2023-09-24 03:13:03 +01:00
_totalBytes(0),
2021-10-19 21:27:23 +01:00
_totalFilesDefined(false),
// _totalBytesDefined(false),
MultiArcMode(false)
2023-09-24 03:13:03 +01:00
#ifndef Z7_NO_CRYPTO
2021-10-19 21:27:23 +01:00
, PasswordIsDefined(false)
// , PasswordWasAsked(false)
#endif
{}
virtual ~COpenCallbackConsole() {}
void Init(CStdOutStream *outStream, CStdOutStream *errorStream, CStdOutStream *percentStream)
{
_so = outStream;
_se = errorStream;
_percent._so = percentStream;
}
2023-09-24 03:13:03 +01:00
Z7_IFACE_IMP(IOpenCallbackUI)
2021-10-19 21:27:23 +01:00
2023-09-24 03:13:03 +01:00
#ifndef Z7_NO_CRYPTO
2021-10-19 21:27:23 +01:00
bool PasswordIsDefined;
// bool PasswordWasAsked;
UString Password;
#endif
};
#endif