6 #include "../IStream.h"
7 #include "../IProgress.h"
10 // MIDL_INTERFACE("23170F69-40C1-278A-0000-000600xx0000")
11 #define ARCHIVE_INTERFACE_SUB(i, base, x) \
12 DEFINE_GUID(IID_ ## i, \
13 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x06, 0x00, x, 0x00, 0x00); \
16 #define ARCHIVE_INTERFACE(i, x) ARCHIVE_INTERFACE_SUB(i, IUnknown, x)
18 namespace NFileTimeType
54 namespace NOperationResult
67 namespace NOperationResult
78 ARCHIVE_INTERFACE(IArchiveOpenCallback
, 0x10)
80 STDMETHOD(SetTotal
)(const UInt64
*files
, const UInt64
*bytes
) PURE
;
81 STDMETHOD(SetCompleted
)(const UInt64
*files
, const UInt64
*bytes
) PURE
;
85 ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback
, IProgress
, 0x20)
87 STDMETHOD(GetStream
)(UInt32 index
, ISequentialOutStream
**outStream
,
88 Int32 askExtractMode
) PURE
;
89 // GetStream OUT: S_OK - OK, S_FALSE - skeep this file
90 STDMETHOD(PrepareOperation
)(Int32 askExtractMode
) PURE
;
91 STDMETHOD(SetOperationResult
)(Int32 resultEOperationResult
) PURE
;
95 ARCHIVE_INTERFACE(IArchiveOpenVolumeCallback
, 0x30)
97 STDMETHOD(GetProperty
)(PROPID propID
, PROPVARIANT
*value
) PURE
;
98 STDMETHOD(GetStream
)(const wchar_t *name
, IInStream
**inStream
) PURE
;
102 ARCHIVE_INTERFACE(IInArchiveGetStream
, 0x40)
104 STDMETHOD(GetStream
)(UInt32 index
, ISequentialInStream
**stream
) PURE
;
108 ARCHIVE_INTERFACE(IArchiveOpenSetSubArchiveName
, 0x50)
110 STDMETHOD(SetSubArchiveName
)(const wchar_t *name
) PURE
;
114 ARCHIVE_INTERFACE(IInArchive
, 0x60)
116 STDMETHOD(Open
)(IInStream
*stream
, const UInt64
*maxCheckStartPosition
,
117 IArchiveOpenCallback
*openArchiveCallback
) PURE
;
118 STDMETHOD(Close
)() PURE
;
119 STDMETHOD(GetNumberOfItems
)(UInt32
*numItems
) PURE
;
120 STDMETHOD(GetProperty
)(UInt32 index
, PROPID propID
, PROPVARIANT
*value
) PURE
;
121 STDMETHOD(Extract
)(const UInt32
* indices
, UInt32 numItems
,
122 Int32 testMode
, IArchiveExtractCallback
*extractCallback
) PURE
;
123 // indices must be sorted
124 // numItems = 0xFFFFFFFF means all files
125 // testMode != 0 means "test files operation"
127 STDMETHOD(GetArchiveProperty
)(PROPID propID
, PROPVARIANT
*value
) PURE
;
129 STDMETHOD(GetNumberOfProperties
)(UInt32
*numProperties
) PURE
;
130 STDMETHOD(GetPropertyInfo
)(UInt32 index
,
131 BSTR
*name
, PROPID
*propID
, VARTYPE
*varType
) PURE
;
133 STDMETHOD(GetNumberOfArchiveProperties
)(UInt32
*numProperties
) PURE
;
134 STDMETHOD(GetArchivePropertyInfo
)(UInt32 index
,
135 BSTR
*name
, PROPID
*propID
, VARTYPE
*varType
) PURE
;
139 ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback
, IProgress
, 0x80)
141 STDMETHOD(GetUpdateItemInfo
)(UInt32 index
,
142 Int32
*newData
, // 1 - new data, 0 - old data
143 Int32
*newProperties
, // 1 - new properties, 0 - old properties
144 UInt32
*indexInArchive
// -1 if there is no in archive, or if doesn't matter
146 STDMETHOD(GetProperty
)(UInt32 index
, PROPID propID
, PROPVARIANT
*value
) PURE
;
147 STDMETHOD(GetStream
)(UInt32 index
, ISequentialInStream
**inStream
) PURE
;
148 STDMETHOD(SetOperationResult
)(Int32 operationResult
) PURE
;
152 ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback2
, IArchiveUpdateCallback
, 0x82)
154 STDMETHOD(GetVolumeSize
)(UInt32 index
, UInt64
*size
) PURE
;
155 STDMETHOD(GetVolumeStream
)(UInt32 index
, ISequentialOutStream
**volumeStream
) PURE
;
159 ARCHIVE_INTERFACE(IOutArchive
, 0xA0)
161 STDMETHOD(UpdateItems
)(ISequentialOutStream
*outStream
, UInt32 numItems
,
162 IArchiveUpdateCallback
*updateCallback
) PURE
;
163 STDMETHOD(GetFileTimeType
)(UInt32
*type
) PURE
;
167 ARCHIVE_INTERFACE(ISetProperties
, 0x03)
169 STDMETHOD(SetProperties
)(const wchar_t **names
, const PROPVARIANT
*values
, Int32 numProperties
) PURE
;