Mercurial > vba-linux
diff src/win32/7zip/7z/CPP/7zip/ICoder.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/ICoder.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,186 @@ 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 +#define CODER_INTERFACE(i, x) DECL_INTERFACE(i, 4, x) 1.12 + 1.13 +CODER_INTERFACE(ICompressProgressInfo, 0x04) 1.14 +{ 1.15 + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE; 1.16 +}; 1.17 + 1.18 +CODER_INTERFACE(ICompressCoder, 0x05) 1.19 +{ 1.20 + STDMETHOD(Code)(ISequentialInStream *inStream, 1.21 + ISequentialOutStream *outStream, 1.22 + const UInt64 *inSize, 1.23 + const UInt64 *outSize, 1.24 + ICompressProgressInfo *progress) PURE; 1.25 +}; 1.26 + 1.27 +CODER_INTERFACE(ICompressCoder2, 0x18) 1.28 +{ 1.29 + STDMETHOD(Code)(ISequentialInStream **inStreams, 1.30 + const UInt64 **inSizes, 1.31 + UInt32 numInStreams, 1.32 + ISequentialOutStream **outStreams, 1.33 + const UInt64 **outSizes, 1.34 + UInt32 numOutStreams, 1.35 + ICompressProgressInfo *progress) PURE; 1.36 +}; 1.37 + 1.38 +namespace NCoderPropID 1.39 +{ 1.40 + enum EEnum 1.41 + { 1.42 + kDictionarySize = 0x400, 1.43 + kUsedMemorySize, 1.44 + kOrder, 1.45 + kBlockSize, 1.46 + kPosStateBits = 0x440, 1.47 + kLitContextBits, 1.48 + kLitPosBits, 1.49 + kNumFastBytes = 0x450, 1.50 + kMatchFinder, 1.51 + kMatchFinderCycles, 1.52 + kNumPasses = 0x460, 1.53 + kAlgorithm = 0x470, 1.54 + kMultiThread = 0x480, 1.55 + kNumThreads, 1.56 + kEndMarker = 0x490 1.57 + }; 1.58 +} 1.59 + 1.60 +CODER_INTERFACE(ICompressSetCoderProperties, 0x20) 1.61 +{ 1.62 + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, 1.63 + const PROPVARIANT *properties, UInt32 numProperties) PURE; 1.64 +}; 1.65 + 1.66 +/* 1.67 +CODER_INTERFACE(ICompressSetCoderProperties, 0x21) 1.68 +{ 1.69 + STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE; 1.70 +}; 1.71 +*/ 1.72 + 1.73 +CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22) 1.74 +{ 1.75 + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE; 1.76 +}; 1.77 + 1.78 +CODER_INTERFACE(ICompressWriteCoderProperties, 0x23) 1.79 +{ 1.80 + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE; 1.81 +}; 1.82 + 1.83 +CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24) 1.84 +{ 1.85 + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE; 1.86 +}; 1.87 + 1.88 +CODER_INTERFACE(ICompressSetCoderMt, 0x25) 1.89 +{ 1.90 + STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE; 1.91 +}; 1.92 + 1.93 +CODER_INTERFACE(ICompressGetSubStreamSize, 0x30) 1.94 +{ 1.95 + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE; 1.96 +}; 1.97 + 1.98 +CODER_INTERFACE(ICompressSetInStream, 0x31) 1.99 +{ 1.100 + STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE; 1.101 + STDMETHOD(ReleaseInStream)() PURE; 1.102 +}; 1.103 + 1.104 +CODER_INTERFACE(ICompressSetOutStream, 0x32) 1.105 +{ 1.106 + STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE; 1.107 + STDMETHOD(ReleaseOutStream)() PURE; 1.108 +}; 1.109 + 1.110 +CODER_INTERFACE(ICompressSetInStreamSize, 0x33) 1.111 +{ 1.112 + STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE; 1.113 +}; 1.114 + 1.115 +CODER_INTERFACE(ICompressSetOutStreamSize, 0x34) 1.116 +{ 1.117 + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE; 1.118 +}; 1.119 + 1.120 +CODER_INTERFACE(ICompressFilter, 0x40) 1.121 +{ 1.122 + STDMETHOD(Init)() PURE; 1.123 + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE; 1.124 + // Filter return outSize (UInt32) 1.125 + // if (outSize <= size): Filter have converted outSize bytes 1.126 + // if (outSize > size): Filter have not converted anything. 1.127 + // and it needs at least outSize bytes to convert one block 1.128 + // (it's for crypto block algorithms). 1.129 +}; 1.130 + 1.131 +CODER_INTERFACE(ICompressCodecsInfo, 0x60) 1.132 +{ 1.133 + STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods) PURE; 1.134 + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE; 1.135 + STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder) PURE; 1.136 + STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder) PURE; 1.137 +}; 1.138 +CODER_INTERFACE(ISetCompressCodecsInfo, 0x61) 1.139 +{ 1.140 + STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo) PURE; 1.141 +}; 1.142 + 1.143 +CODER_INTERFACE(ICryptoProperties, 0x80) 1.144 +{ 1.145 + STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE; 1.146 + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE; 1.147 +}; 1.148 + 1.149 +/* 1.150 +CODER_INTERFACE(ICryptoResetSalt, 0x88) 1.151 +{ 1.152 + STDMETHOD(ResetSalt)() PURE; 1.153 +}; 1.154 +*/ 1.155 + 1.156 +CODER_INTERFACE(ICryptoResetInitVector, 0x8C) 1.157 +{ 1.158 + STDMETHOD(ResetInitVector)() PURE; 1.159 +}; 1.160 + 1.161 +CODER_INTERFACE(ICryptoSetPassword, 0x90) 1.162 +{ 1.163 + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE; 1.164 +}; 1.165 + 1.166 +CODER_INTERFACE(ICryptoSetCRC, 0xA0) 1.167 +{ 1.168 + STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE; 1.169 +}; 1.170 + 1.171 +////////////////////// 1.172 +// It's for DLL file 1.173 +namespace NMethodPropID 1.174 +{ 1.175 + enum EEnum 1.176 + { 1.177 + kID, 1.178 + kName, 1.179 + kDecoder, 1.180 + kEncoder, 1.181 + kInStreams, 1.182 + kOutStreams, 1.183 + kDescription, 1.184 + kDecoderIsAssigned, 1.185 + kEncoderIsAssigned 1.186 + }; 1.187 +} 1.188 + 1.189 +#endif