1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// UpdateCallbackConsole.h 2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __UPDATE_CALLBACK_CONSOLE_H 4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __UPDATE_CALLBACK_CONSOLE_H 5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "Common/StdOutStream.h" 7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../Common/Update.h" 9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "PercentPrinter.h" 11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 12baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass CUpdateCallbackConsole: public IUpdateCallbackUI2 13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CPercentPrinter m_PercentPrinter; 15baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool m_NeedBeClosed; 16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool m_NeedNewLine; 17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool m_WarningsMode; 19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CStdOutStream *OutStream; 21baa3858d3f5d128a5c8466b700098109edcad5f2repo syncpublic: 22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool EnablePercents; 23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool StdOutMode; 24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #ifndef _NO_CRYPTO 26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool PasswordIsDefined; 27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UString Password; 28baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool AskPassword; 29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #endif 30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CUpdateCallbackConsole(): 32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync m_PercentPrinter(1 << 16), 33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #ifndef _NO_CRYPTO 34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync PasswordIsDefined(false), 35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync AskPassword(false), 36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #endif 37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync StdOutMode(false), 38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync EnablePercents(true), 39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync m_WarningsMode(false) 40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync {} 41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ~CUpdateCallbackConsole() { Finilize(); } 43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync void Init(CStdOutStream *outStream) 44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync { 45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync m_NeedBeClosed = false; 46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync m_NeedNewLine = false; 47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync FailedFiles.Clear(); 48baa3858d3f5d128a5c8466b700098109edcad5f2repo sync FailedCodes.Clear(); 49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync OutStream = outStream; 50baa3858d3f5d128a5c8466b700098109edcad5f2repo sync m_PercentPrinter.OutStream = outStream; 51baa3858d3f5d128a5c8466b700098109edcad5f2repo sync } 52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync INTERFACE_IUpdateCallbackUI2(;) 54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UStringVector FailedFiles; 56baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CRecordVector<HRESULT> FailedCodes; 57baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UStringVector CantFindFiles; 59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CRecordVector<HRESULT> CantFindCodes; 60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif 63