Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / other-licenses / 7zstub / src / 7zip / Archive / IArchive.h
blob12f9a3c4afc6bbda2f46fe7931071262ada25c0f
1 // IArchive.h
3 #ifndef __IARCHIVE_H
4 #define __IARCHIVE_H
6 #include "../IStream.h"
7 #include "../IProgress.h"
8 #include "../PropID.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); \
14 struct i: public base
16 #define ARCHIVE_INTERFACE(i, x) ARCHIVE_INTERFACE_SUB(i, IUnknown, x)
18 namespace NFileTimeType
20 enum EEnum
22 kWindows,
23 kUnix,
24 kDOS
28 namespace NArchive
30 enum
32 kName = 0,
33 kClassID,
34 kExtension,
35 kAddExtension,
36 kUpdate,
37 kKeepName,
38 kStartSignature,
39 kFinishSignature,
40 kAssociate
43 namespace NExtract
45 namespace NAskMode
47 enum
49 kExtract = 0,
50 kTest,
51 kSkip,
54 namespace NOperationResult
56 enum
58 kOK = 0,
59 kUnSupportedMethod,
60 kDataError,
61 kCRCError,
65 namespace NUpdate
67 namespace NOperationResult
69 enum
71 kOK = 0,
72 kError,
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
145 ) PURE;
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;
173 #endif