aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/UI/Console/UpdateCallbackConsole.h
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-05-11 12:31:23 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-05-13 01:06:58 +0100
commitcd66d540cead3f8200b0c73bad9c276d67896c3d (patch)
treed25a4a409bd041f18b856e156cf1fa71f6169369 /CPP/7zip/UI/Console/UpdateCallbackConsole.h
parentb473eaa2840cccf2fef15d53f00bccf92c41b615 (diff)
downloadlzma-cd66d540cead3f8200b0c73bad9c276d67896c3d.tar.gz
Updated LZMA SDK to 9.38 beta.
The webpage says "If you use XZ code from LZMA SDK, it's recommended to upgrade to new XZ code from 7-Zip 9.38 beta. That new code fixes some bugs." and we do use the XZ code. The code is identical to the stock LZMA SDK with the following changes: deleted bin/ added C/Util/Lzma/Android.mk added MODULE_LICENSE_PUBLIC_DOMAIN added NOTICE added xz-embedded/ Change-Id: Ibc5d353748420f7b3ae2877d625d7ddb788bdc6e
Diffstat (limited to 'CPP/7zip/UI/Console/UpdateCallbackConsole.h')
-rw-r--r--[-rwxr-xr-x]CPP/7zip/UI/Console/UpdateCallbackConsole.h57
1 files changed, 35 insertions, 22 deletions
diff --git a/CPP/7zip/UI/Console/UpdateCallbackConsole.h b/CPP/7zip/UI/Console/UpdateCallbackConsole.h
index 59581f3..c73de67 100755..100644
--- a/CPP/7zip/UI/Console/UpdateCallbackConsole.h
+++ b/CPP/7zip/UI/Console/UpdateCallbackConsole.h
@@ -3,55 +3,39 @@
#ifndef __UPDATE_CALLBACK_CONSOLE_H
#define __UPDATE_CALLBACK_CONSOLE_H
-#include "Common/StdOutStream.h"
+#include "../../../Common/StdOutStream.h"
#include "../Common/Update.h"
#include "PercentPrinter.h"
-class CUpdateCallbackConsole: public IUpdateCallbackUI2
+class CCallbackConsoleBase
{
- CPercentPrinter m_PercentPrinter;
- bool m_NeedBeClosed;
- bool m_NeedNewLine;
-
bool m_WarningsMode;
+protected:
+ CPercentPrinter m_PercentPrinter;
CStdOutStream *OutStream;
+ HRESULT CanNotFindError_Base(const wchar_t *name, DWORD systemError);
public:
bool EnablePercents;
bool StdOutMode;
- #ifndef _NO_CRYPTO
- bool PasswordIsDefined;
- UString Password;
- bool AskPassword;
- #endif
-
- CUpdateCallbackConsole():
+ CCallbackConsoleBase():
m_PercentPrinter(1 << 16),
- #ifndef _NO_CRYPTO
- PasswordIsDefined(false),
- AskPassword(false),
- #endif
StdOutMode(false),
EnablePercents(true),
m_WarningsMode(false)
{}
- ~CUpdateCallbackConsole() { Finilize(); }
void Init(CStdOutStream *outStream)
{
- m_NeedBeClosed = false;
- m_NeedNewLine = false;
FailedFiles.Clear();
FailedCodes.Clear();
OutStream = outStream;
m_PercentPrinter.OutStream = outStream;
}
- INTERFACE_IUpdateCallbackUI2(;)
-
UStringVector FailedFiles;
CRecordVector<HRESULT> FailedCodes;
@@ -59,4 +43,33 @@ public:
CRecordVector<HRESULT> CantFindCodes;
};
+class CUpdateCallbackConsole: public IUpdateCallbackUI2, public CCallbackConsoleBase
+{
+ bool m_NeedBeClosed;
+ bool m_NeedNewLine;
+public:
+ #ifndef _NO_CRYPTO
+ bool PasswordIsDefined;
+ UString Password;
+ bool AskPassword;
+ #endif
+
+ CUpdateCallbackConsole()
+ #ifndef _NO_CRYPTO
+ :
+ PasswordIsDefined(false),
+ AskPassword(false)
+ #endif
+ {}
+
+ void Init(CStdOutStream *outStream)
+ {
+ m_NeedBeClosed = false;
+ m_NeedNewLine = false;
+ CCallbackConsoleBase::Init(outStream);
+ }
+ ~CUpdateCallbackConsole() { Finilize(); }
+ INTERFACE_IUpdateCallbackUI2(;)
+};
+
#endif