Skip to content

Latest commit

 

History

History
82 lines (65 loc) · 2.44 KB

UpdateCallback.h

File metadata and controls

82 lines (65 loc) · 2.44 KB
 
Jan 23, 2008
Jan 23, 2008
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
76
77
78
79
80
81
82
// UpdateCallback.h
#ifndef __UPDATECALLBACK_H
#define __UPDATECALLBACK_H
#include "Common/MyCom.h"
#include "Common/MyString.h"
#include "../../IPassword.h"
#include "../../ICoder.h"
#include "../Common/UpdatePair.h"
#include "../Common/UpdateProduce.h"
#define INTERFACE_IUpdateCallbackUI(x) \
virtual HRESULT SetTotal(UInt64 size) x; \
virtual HRESULT SetCompleted(const UInt64 *completeValue) x; \
virtual HRESULT SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) x; \
virtual HRESULT CheckBreak() x; \
virtual HRESULT Finilize() x; \
virtual HRESULT SetNumFiles(UInt64 numFiles) x; \
virtual HRESULT GetStream(const wchar_t *name, bool isAnti) x; \
virtual HRESULT OpenFileError(const wchar_t *name, DWORD systemError) x; \
virtual HRESULT SetOperationResult(Int32 operationResult) x; \
virtual HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) x; \
// virtual HRESULT CloseProgress() { return S_OK; };
struct IUpdateCallbackUI
{
INTERFACE_IUpdateCallbackUI(=0)
};
class CArchiveUpdateCallback:
public IArchiveUpdateCallback2,
public ICryptoGetTextPassword2,
public ICompressProgressInfo,
public CMyUnknownImp
{
public:
MY_UNKNOWN_IMP3(
IArchiveUpdateCallback2,
ICryptoGetTextPassword2,
ICompressProgressInfo)
// IProgress
STDMETHOD(SetTotal)(UInt64 size);
STDMETHOD(SetCompleted)(const UInt64 *completeValue);
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
// IUpdateCallback
STDMETHOD(EnumProperties)(IEnumSTATPROPSTG **enumerator);
STDMETHOD(GetUpdateItemInfo)(UInt32 index,
Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive);
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream);
STDMETHOD(SetOperationResult)(Int32 operationResult);
STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size);
STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream);
STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password);
public:
CRecordVector<UInt64> VolumesSizes;
UString VolName;
UString VolExt;
IUpdateCallbackUI *Callback;
UString DirPrefix;
bool ShareForWrite;
bool StdInMode;
const CObjectVector<CDirItem> *DirItems;
const CObjectVector<CArchiveItem> *ArchiveItems;
const CObjectVector<CUpdatePair2> *UpdatePairs;
CMyComPtr<IInArchive> Archive;
CArchiveUpdateCallback();
};
#endif