3 #ifndef __UPDATECALLBACK_H
4 #define __UPDATECALLBACK_H
6 #include "Common/MyCom.h"
7 #include "Common/MyString.h"
9 #include "../../IPassword.h"
10 #include "../../ICoder.h"
12 #include "../Common/UpdatePair.h"
13 #include "../Common/UpdateProduce.h"
15 #define INTERFACE_IUpdateCallbackUI(x) \
16 virtual HRESULT SetTotal(UInt64 size) x; \
17 virtual HRESULT SetCompleted(const UInt64 *completeValue) x; \
18 virtual HRESULT SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) x; \
19 virtual HRESULT CheckBreak() x; \
20 virtual HRESULT Finilize() x; \
21 virtual HRESULT SetNumFiles(UInt64 numFiles) x; \
22 virtual HRESULT GetStream(const wchar_t *name, bool isAnti) x; \
23 virtual HRESULT OpenFileError(const wchar_t *name, DWORD systemError) x; \
24 virtual HRESULT SetOperationResult(Int32 operationResult) x; \
25 virtual HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) x; \
27 // virtual HRESULT CloseProgress() { return S_OK; };
29 struct IUpdateCallbackUI
31 INTERFACE_IUpdateCallbackUI(=0)
34 class CArchiveUpdateCallback:
35 public IArchiveUpdateCallback2,
36 public ICryptoGetTextPassword2,
37 public ICompressProgressInfo,
42 IArchiveUpdateCallback2,
43 ICryptoGetTextPassword2,
44 ICompressProgressInfo)
47 STDMETHOD(SetTotal)(UInt64 size);
48 STDMETHOD(SetCompleted)(const UInt64 *completeValue);
49 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
52 STDMETHOD(EnumProperties)(IEnumSTATPROPSTG **enumerator);
53 STDMETHOD(GetUpdateItemInfo)(UInt32 index,
54 Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive);
55 STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
56 STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream);
57 STDMETHOD(SetOperationResult)(Int32 operationResult);
59 STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size);
60 STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream);
62 STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password);
65 CRecordVector<UInt64> VolumesSizes;
69 IUpdateCallbackUI *Callback;
74 const CObjectVector<CDirItem> *DirItems;
75 const CObjectVector<CArchiveItem> *ArchiveItems;
76 const CObjectVector<CUpdatePair2> *UpdatePairs;
77 CMyComPtr<IInArchive> Archive;
79 CArchiveUpdateCallback();