73
#define INTERFACE_IArchiveOpenCallback(x) \
74
STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes) x; \
75
STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes) x; \
73
77
ARCHIVE_INTERFACE(IArchiveOpenCallback, 0x10)
75
STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes) PURE;
76
STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes) PURE;
79
INTERFACE_IArchiveOpenCallback(PURE);
83
#define INTERFACE_IArchiveExtractCallback(x) \
84
INTERFACE_IProgress(x) \
85
/* GetStream OUT: S_OK - OK, S_FALSE - skeep this file */ \
86
STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) x; \
87
STDMETHOD(PrepareOperation)(Int32 askExtractMode) x; \
88
STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) x; \
80
90
ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback, IProgress, 0x20)
82
STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream,
83
Int32 askExtractMode) PURE;
84
// GetStream OUT: S_OK - OK, S_FALSE - skeep this file
85
STDMETHOD(PrepareOperation)(Int32 askExtractMode) PURE;
86
STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) PURE;
92
INTERFACE_IArchiveExtractCallback(PURE)
96
#define INTERFACE_IArchiveOpenVolumeCallback(x) \
97
STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) x; \
98
STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) x; \
90
100
ARCHIVE_INTERFACE(IArchiveOpenVolumeCallback, 0x30)
92
STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) PURE;
93
STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) PURE;
102
INTERFACE_IArchiveOpenVolumeCallback(PURE);
97
106
ARCHIVE_INTERFACE(IInArchiveGetStream, 0x40)
99
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream) PURE;
108
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream) PURE;
143
#define INTERFACE_IArchiveUpdateCallback(x) \
144
INTERFACE_IProgress(x); \
145
STDMETHOD(GetUpdateItemInfo)(UInt32 index, \
146
Int32 *newData, /*1 - new data, 0 - old data */ \
147
Int32 *newProperties, /* 1 - new properties, 0 - old properties */ \
148
UInt32 *indexInArchive /* -1 if there is no in archive, or if doesn't matter */ \
150
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \
151
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) x; \
152
STDMETHOD(SetOperationResult)(Int32 operationResult) x; \
134
154
ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback, IProgress, 0x80)
136
STDMETHOD(GetUpdateItemInfo)(UInt32 index,
137
Int32 *newData, // 1 - new data, 0 - old data
138
Int32 *newProperties, // 1 - new properties, 0 - old properties
139
UInt32 *indexInArchive // -1 if there is no in archive, or if doesn't matter
141
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE;
142
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) PURE;
143
STDMETHOD(SetOperationResult)(Int32 operationResult) PURE;
156
INTERFACE_IArchiveUpdateCallback(PURE);
159
#define INTERFACE_IArchiveUpdateCallback2(x) \
160
INTERFACE_IArchiveUpdateCallback(x) \
161
STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) x; \
162
STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) x; \
147
164
ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback2, IArchiveUpdateCallback, 0x82)
149
STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) PURE;
150
STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) PURE;
166
INTERFACE_IArchiveUpdateCallback2(PURE);
196
212
{ *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
197
213
STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp(kArcProps)
215
#define IMP_IInArchive_ArcProps_WITH_NAME \
216
STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
217
{ *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
218
STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kArcProps)
199
220
#define IMP_IInArchive_ArcProps_NO \
200
221
STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
201
222
{ *numProperties = 0; return S_OK; } \
202
223
STDMETHODIMP CHandler::GetArchivePropertyInfo(UInt32, BSTR *, PROPID *, VARTYPE *) \
203
224
{ return E_NOTIMPL; } \
204
225
STDMETHODIMP CHandler::GetArchiveProperty(PROPID, PROPVARIANT *value) \
205
{ value->vt = VT_EMPTY; return S_OK; }
226
{ value->vt = VT_EMPTY; return S_OK; }