blob: 2fcb891b1e1343f94174736984ebb53df68958ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// UpdateCallbackConsole.h
#ifndef __UPDATECALLBACKCONSOLE_H
#define __UPDATECALLBACKCONSOLE_H
#include "Common/String.h"
#include "Common/StdOutStream.h"
#include "PercentPrinter.h"
#include "../Common/Update.h"
class CUpdateCallbackConsole: public IUpdateCallbackUI2
{
CPercentPrinter m_PercentPrinter;
bool m_NeedBeClosed;
bool m_NeedNewLine;
bool m_WarningsMode;
CStdOutStream *OutStream;
public:
bool EnablePercents;
bool StdOutMode;
bool PasswordIsDefined;
UString Password;
bool AskPassword;
CUpdateCallbackConsole():
m_PercentPrinter(1 << 16),
PasswordIsDefined(false),
AskPassword(false),
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;
}
HRESULT OpenResult(const wchar_t *name, HRESULT result);
HRESULT StartScanning();
HRESULT CanNotFindError(const wchar_t *name, DWORD systemError);
HRESULT FinishScanning();
HRESULT StartArchive(const wchar_t *name, bool updating);
HRESULT FinishArchive();
HRESULT CheckBreak();
HRESULT Finilize();
HRESULT SetTotal(UInt64 size);
HRESULT SetCompleted(const UInt64 *completeValue);
HRESULT GetStream(const wchar_t *name, bool isAnti);
HRESULT OpenFileError(const wchar_t *name, DWORD systemError);
HRESULT SetOperationResult(Int32 operationResult);
HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password);
UStringVector FailedFiles;
CRecordVector<HRESULT> FailedCodes;
UStringVector CantFindFiles;
CRecordVector<HRESULT> CantFindCodes;
};
#endif
|