Run dos2unix on bayou and remove white space at the end of lines.
[coreboot.git] / payloads / bayou / util / pbuilder / lzma / C / 7zip / ICoder.h
1 // ICoder.h
2
3 #ifndef __ICODER_H
4 #define __ICODER_H
5
6 #include "IStream.h"
7
8 // "23170F69-40C1-278A-0000-000400xx0000"
9 #define CODER_INTERFACE(i, x) \
10 DEFINE_GUID(IID_ ## i, \
11 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \
12 struct i: public IUnknown
13
14 CODER_INTERFACE(ICompressProgressInfo, 0x04)
15 {
16   STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
17 };
18
19 CODER_INTERFACE(ICompressCoder, 0x05)
20 {
21   STDMETHOD(Code)(ISequentialInStream *inStream,
22       ISequentialOutStream *outStream,
23       const UInt64 *inSize,
24       const UInt64 *outSize,
25       ICompressProgressInfo *progress) PURE;
26 };
27
28 CODER_INTERFACE(ICompressCoder2, 0x18)
29 {
30   STDMETHOD(Code)(ISequentialInStream **inStreams,
31       const UInt64 **inSizes,
32       UInt32 numInStreams,
33       ISequentialOutStream **outStreams,
34       const UInt64 **outSizes,
35       UInt32 numOutStreams,
36       ICompressProgressInfo *progress) PURE;
37 };
38
39 namespace NCoderPropID
40 {
41   enum EEnum
42   {
43     kDictionarySize = 0x400,
44     kUsedMemorySize,
45     kOrder,
46     kPosStateBits = 0x440,
47     kLitContextBits,
48     kLitPosBits,
49     kNumFastBytes = 0x450,
50     kMatchFinder,
51     kMatchFinderCycles,
52     kNumPasses = 0x460,
53     kAlgorithm = 0x470,
54     kMultiThread = 0x480,
55     kNumThreads,
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_INTERFACE(ICompressSetDecoderProperties2, 0x22)
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(ICompressSetCoderMt, 0x25)
89 {
90   STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
91 };
92
93 CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
94 {
95   STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
96 };
97
98 CODER_INTERFACE(ICompressSetInStream, 0x31)
99 {
100   STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
101   STDMETHOD(ReleaseInStream)() PURE;
102 };
103
104 CODER_INTERFACE(ICompressSetOutStream, 0x32)
105 {
106   STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
107   STDMETHOD(ReleaseOutStream)() PURE;
108 };
109
110 CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
111 {
112   STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
113 };
114
115 CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
116 {
117   STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
118 };
119
120 CODER_INTERFACE(ICompressFilter, 0x40)
121 {
122   STDMETHOD(Init)() PURE;
123   STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
124   // Filter return outSize (UInt32)
125   // if (outSize <= size): Filter have converted outSize bytes
126   // if (outSize > size): Filter have not converted anything.
127   //      and it needs at least outSize bytes to convert one block
128   //      (it's for crypto block algorithms).
129 };
130
131 CODER_INTERFACE(ICryptoProperties, 0x80)
132 {
133   STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
134   STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
135 };
136
137 CODER_INTERFACE(ICryptoSetPassword, 0x90)
138 {
139   STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
140 };
141
142 CODER_INTERFACE(ICryptoSetCRC, 0xA0)
143 {
144   STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
145 };
146
147 //////////////////////
148 // It's for DLL file
149 namespace NMethodPropID
150 {
151   enum EEnum
152   {
153     kID,
154     kName,
155     kDecoder,
156     kEncoder,
157     kInStreams,
158     kOutStreams,
159     kDescription
160   };
161 }
162
163 #endif