allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / scripts / squashfs / lzma / C / 7zip / ICoder.h
blobce4594a0418cb2e11fa251b01cb981c9b19dede0
1 // ICoder.h
3 #ifndef __ICODER_H
4 #define __ICODER_H
6 #include "IStream.h"
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
14 CODER_INTERFACE(ICompressProgressInfo, 0x04)
16 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
19 CODER_INTERFACE(ICompressCoder, 0x05)
21 STDMETHOD(Code)(ISequentialInStream *inStream,
22 ISequentialOutStream *outStream,
23 const UInt64 *inSize,
24 const UInt64 *outSize,
25 ICompressProgressInfo *progress) PURE;
28 CODER_INTERFACE(ICompressCoder2, 0x18)
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;
39 namespace NCoderPropID
41 enum EEnum
43 kDictionarySize = 0x400,
44 kUsedMemorySize,
45 kOrder,
46 kPosStateBits = 0x440,
47 kLitContextBits,
48 kLitPosBits,
49 kNumFastBytes = 0x450,
50 kMatchFinder,
51 kNumPasses = 0x460,
52 kAlgorithm = 0x470,
53 kMultiThread = 0x480,
54 kEndMarker = 0x490
58 CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
60 STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
61 const PROPVARIANT *properties, UInt32 numProperties) PURE;
65 CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
67 STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
71 CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
73 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
76 CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
78 STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
81 CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
83 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
86 CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
88 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
91 CODER_INTERFACE(ICompressSetInStream, 0x31)
93 STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
94 STDMETHOD(ReleaseInStream)() PURE;
97 CODER_INTERFACE(ICompressSetOutStream, 0x32)
99 STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
100 STDMETHOD(ReleaseOutStream)() PURE;
103 CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
105 STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
108 CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
110 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
113 CODER_INTERFACE(ICompressFilter, 0x40)
115 STDMETHOD(Init)() PURE;
116 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
117 // Filter return outSize (UInt32)
118 // if (outSize <= size): Filter have converted outSize bytes
119 // if (outSize > size): Filter have not converted anything.
120 // and it needs at least outSize bytes to convert one block
121 // (it's for crypto block algorithms).
124 CODER_INTERFACE(ICryptoProperties, 0x80)
126 STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
127 STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
130 CODER_INTERFACE(ICryptoSetPassword, 0x90)
132 STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
135 CODER_INTERFACE(ICryptoSetCRC, 0xA0)
137 STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
140 //////////////////////
141 // It's for DLL file
142 namespace NMethodPropID
144 enum EEnum
146 kID,
147 kName,
148 kDecoder,
149 kEncoder,
150 kInStreams,
151 kOutStreams,
152 kDescription
156 #endif