UpdateCallbackConsole.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // UpdateCallbackConsole.h
  2. #ifndef __UPDATECALLBACKCONSOLE_H
  3. #define __UPDATECALLBACKCONSOLE_H
  4. #include "Common/MyString.h"
  5. #include "Common/StdOutStream.h"
  6. #include "PercentPrinter.h"
  7. #include "../Common/Update.h"
  8. class CUpdateCallbackConsole: public IUpdateCallbackUI2
  9. {
  10. CPercentPrinter m_PercentPrinter;
  11. bool m_NeedBeClosed;
  12. bool m_NeedNewLine;
  13. bool m_WarningsMode;
  14. CStdOutStream *OutStream;
  15. public:
  16. bool EnablePercents;
  17. bool StdOutMode;
  18. bool PasswordIsDefined;
  19. UString Password;
  20. bool AskPassword;
  21. CUpdateCallbackConsole():
  22. m_PercentPrinter(1 << 16),
  23. PasswordIsDefined(false),
  24. AskPassword(false),
  25. StdOutMode(false),
  26. EnablePercents(true),
  27. m_WarningsMode(false)
  28. {}
  29. ~CUpdateCallbackConsole() { Finilize(); }
  30. void Init(CStdOutStream *outStream)
  31. {
  32. m_NeedBeClosed = false;
  33. m_NeedNewLine = false;
  34. FailedFiles.Clear();
  35. FailedCodes.Clear();
  36. OutStream = outStream;
  37. m_PercentPrinter.OutStream = outStream;
  38. }
  39. INTERFACE_IUpdateCallbackUI2(;)
  40. UStringVector FailedFiles;
  41. CRecordVector<HRESULT> FailedCodes;
  42. UStringVector CantFindFiles;
  43. CRecordVector<HRESULT> CantFindCodes;
  44. };
  45. #endif