Debian Codegraph @

utils/lzma/SRC/7zip/ICoder.h

raw
1 // ICoder.h
2
3 #ifndef __ICODER_H
4 #define __ICODER_H
5
6 #include "IStream.h"
7
8 // "23170F69-40C1-278A-0000-000200xxyy00"
9 #define CODER_INTERFACE2(i, x, y) \
10 DEFINE_GUID(IID_ ## i, \
11 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x02, 0x00, x, y, 0x00); \
12 struct i: public IUnknown
13
14 #define CODER_INTERFACE(i, x) CODER_INTERFACE2(i, x, 0x00)
15
16 CODER_INTERFACE(ICompressProgressInfo, 0x04)
17 {
18 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
19 };
20
21 CODER_INTERFACE(ICompressCoder, 0x05)
22 {
23 STDMETHOD(Code)(ISequentialInStream *inStream,
24 ISequentialOutStream *outStream,
25 const UInt64 *inSize,
26 const UInt64 *outSize,
27 ICompressProgressInfo *progress) PURE;
28 };
29
30 CODER_INTERFACE(ICompressCoder2, 0x18)
31 {
32 STDMETHOD(Code)(ISequentialInStream **inStreams,
33 const UInt64 **inSizes,
34 UInt32 numInStreams,
35 ISequentialOutStream **outStreams,
36 const UInt64 **outSizes,
37 UInt32 numOutStreams,
38 ICompressProgressInfo *progress) PURE;
39 };
40
41 namespace NCoderPropID
42 {
43 enum EEnum
44 {
45 kDictionarySize = 0x400,
46 kUsedMemorySize,
47 kOrder,
48 kPosStateBits = 0x440,
49 kLitContextBits,
50 kLitPosBits,
51 kNumFastBytes = 0x450,
52 kMatchFinder,
53 kNumPasses = 0x460,
54 kAlgorithm = 0x470,
55 kMultiThread = 0x480,
56 kEndMarker = 0x490
57 };
58 }
59
60 CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
61 {
62 STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
63 const PROPVARIANT *properties, UInt32 numProperties) PURE;
64 };
65
66 /*
67 CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
68 {
69 STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
70 };
71 */
72
73 CODER_INTERFACE2(ICompressSetDecoderProperties2, 0x21, 0x02)
74 {
75 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
76 };
77
78 CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
79 {
80 STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
81 };
82
83 CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
84 {
85 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
86 };
87
88 CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
89 {
90 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
91 };
92
93 CODER_INTERFACE(ICompressSetInStream, 0x31)
94 {
95 STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
96 STDMETHOD(ReleaseInStream)() PURE;
97 };
98
99 CODER_INTERFACE(ICompressSetOutStream, 0x32)
100 {
101 STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
102 STDMETHOD(ReleaseOutStream)() PURE;
103 };
104
105 CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
106 {
107 STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
108 };
109
110 CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
111 {
112 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
113 };
114
115 CODER_INTERFACE(ICompressFilter, 0x40)
116 {
117 STDMETHOD(Init)() PURE;
118 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
119 // Filter return outSize (UInt32)
120 // if (outSize <= size): Filter have converted outSize bytes
121 // if (outSize > size): Filter have not converted anything.
122 // and it needs at least outSize bytes to convert one block
123 // (it's for crypto block algorithms).
124 };
125
126 CODER_INTERFACE(ICryptoProperties, 0x80)
127 {
128 STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
129 STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
130 };
131
132 //////////////////////
133 // It's for DLL file
134 namespace NMethodPropID
135 {
136 enum EEnum
137 {
138 kID,
139 kName,
140 kDecoder,
141 kEncoder,
142 kInStreams,
143 kOutStreams,
144 kDescription
145 };
146 }
147
148 #endif