1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/7zstub/src/7zip/ICoder.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,163 @@ 1.4 +// ICoder.h 1.5 + 1.6 +#ifndef __ICODER_H 1.7 +#define __ICODER_H 1.8 + 1.9 +#include "IStream.h" 1.10 + 1.11 +// "23170F69-40C1-278A-0000-000400xx0000" 1.12 +#define CODER_INTERFACE(i, x) \ 1.13 +DEFINE_GUID(IID_ ## i, \ 1.14 +0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \ 1.15 +struct i: public IUnknown 1.16 + 1.17 +CODER_INTERFACE(ICompressProgressInfo, 0x04) 1.18 +{ 1.19 + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE; 1.20 +}; 1.21 + 1.22 +CODER_INTERFACE(ICompressCoder, 0x05) 1.23 +{ 1.24 + STDMETHOD(Code)(ISequentialInStream *inStream, 1.25 + ISequentialOutStream *outStream, 1.26 + const UInt64 *inSize, 1.27 + const UInt64 *outSize, 1.28 + ICompressProgressInfo *progress) PURE; 1.29 +}; 1.30 + 1.31 +CODER_INTERFACE(ICompressCoder2, 0x18) 1.32 +{ 1.33 + STDMETHOD(Code)(ISequentialInStream **inStreams, 1.34 + const UInt64 **inSizes, 1.35 + UInt32 numInStreams, 1.36 + ISequentialOutStream **outStreams, 1.37 + const UInt64 **outSizes, 1.38 + UInt32 numOutStreams, 1.39 + ICompressProgressInfo *progress) PURE; 1.40 +}; 1.41 + 1.42 +namespace NCoderPropID 1.43 +{ 1.44 + enum EEnum 1.45 + { 1.46 + kDictionarySize = 0x400, 1.47 + kUsedMemorySize, 1.48 + kOrder, 1.49 + kPosStateBits = 0x440, 1.50 + kLitContextBits, 1.51 + kLitPosBits, 1.52 + kNumFastBytes = 0x450, 1.53 + kMatchFinder, 1.54 + kMatchFinderCycles, 1.55 + kNumPasses = 0x460, 1.56 + kAlgorithm = 0x470, 1.57 + kMultiThread = 0x480, 1.58 + kNumThreads, 1.59 + kEndMarker = 0x490 1.60 + }; 1.61 +} 1.62 + 1.63 +CODER_INTERFACE(ICompressSetCoderProperties, 0x20) 1.64 +{ 1.65 + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, 1.66 + const PROPVARIANT *properties, UInt32 numProperties) PURE; 1.67 +}; 1.68 + 1.69 +/* 1.70 +CODER_INTERFACE(ICompressSetCoderProperties, 0x21) 1.71 +{ 1.72 + STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE; 1.73 +}; 1.74 +*/ 1.75 + 1.76 +CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22) 1.77 +{ 1.78 + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE; 1.79 +}; 1.80 + 1.81 +CODER_INTERFACE(ICompressWriteCoderProperties, 0x23) 1.82 +{ 1.83 + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE; 1.84 +}; 1.85 + 1.86 +CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24) 1.87 +{ 1.88 + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE; 1.89 +}; 1.90 + 1.91 +CODER_INTERFACE(ICompressSetCoderMt, 0x25) 1.92 +{ 1.93 + STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE; 1.94 +}; 1.95 + 1.96 +CODER_INTERFACE(ICompressGetSubStreamSize, 0x30) 1.97 +{ 1.98 + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE; 1.99 +}; 1.100 + 1.101 +CODER_INTERFACE(ICompressSetInStream, 0x31) 1.102 +{ 1.103 + STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE; 1.104 + STDMETHOD(ReleaseInStream)() PURE; 1.105 +}; 1.106 + 1.107 +CODER_INTERFACE(ICompressSetOutStream, 0x32) 1.108 +{ 1.109 + STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE; 1.110 + STDMETHOD(ReleaseOutStream)() PURE; 1.111 +}; 1.112 + 1.113 +CODER_INTERFACE(ICompressSetInStreamSize, 0x33) 1.114 +{ 1.115 + STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE; 1.116 +}; 1.117 + 1.118 +CODER_INTERFACE(ICompressSetOutStreamSize, 0x34) 1.119 +{ 1.120 + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE; 1.121 +}; 1.122 + 1.123 +CODER_INTERFACE(ICompressFilter, 0x40) 1.124 +{ 1.125 + STDMETHOD(Init)() PURE; 1.126 + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE; 1.127 + // Filter return outSize (UInt32) 1.128 + // if (outSize <= size): Filter have converted outSize bytes 1.129 + // if (outSize > size): Filter have not converted anything. 1.130 + // and it needs at least outSize bytes to convert one block 1.131 + // (it's for crypto block algorithms). 1.132 +}; 1.133 + 1.134 +CODER_INTERFACE(ICryptoProperties, 0x80) 1.135 +{ 1.136 + STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE; 1.137 + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE; 1.138 +}; 1.139 + 1.140 +CODER_INTERFACE(ICryptoSetPassword, 0x90) 1.141 +{ 1.142 + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE; 1.143 +}; 1.144 + 1.145 +CODER_INTERFACE(ICryptoSetCRC, 0xA0) 1.146 +{ 1.147 + STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE; 1.148 +}; 1.149 + 1.150 +////////////////////// 1.151 +// It's for DLL file 1.152 +namespace NMethodPropID 1.153 +{ 1.154 + enum EEnum 1.155 + { 1.156 + kID, 1.157 + kName, 1.158 + kDecoder, 1.159 + kEncoder, 1.160 + kInStreams, 1.161 + kOutStreams, 1.162 + kDescription 1.163 + }; 1.164 +} 1.165 + 1.166 +#endif