Mercurial > vba-linux
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 // ICoder.h | |
2 | |
3 #ifndef __ICODER_H | |
4 #define __ICODER_H | |
5 | |
6 #include "IStream.h" | |
7 | |
8 #define CODER_INTERFACE(i, x) DECL_INTERFACE(i, 4, x) | |
9 | |
10 CODER_INTERFACE(ICompressProgressInfo, 0x04) | |
11 { | |
12 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE; | |
13 }; | |
14 | |
15 CODER_INTERFACE(ICompressCoder, 0x05) | |
16 { | |
17 STDMETHOD(Code)(ISequentialInStream *inStream, | |
18 ISequentialOutStream *outStream, | |
19 const UInt64 *inSize, | |
20 const UInt64 *outSize, | |
21 ICompressProgressInfo *progress) PURE; | |
22 }; | |
23 | |
24 CODER_INTERFACE(ICompressCoder2, 0x18) | |
25 { | |
26 STDMETHOD(Code)(ISequentialInStream **inStreams, | |
27 const UInt64 **inSizes, | |
28 UInt32 numInStreams, | |
29 ISequentialOutStream **outStreams, | |
30 const UInt64 **outSizes, | |
31 UInt32 numOutStreams, | |
32 ICompressProgressInfo *progress) PURE; | |
33 }; | |
34 | |
35 namespace NCoderPropID | |
36 { | |
37 enum EEnum | |
38 { | |
39 kDictionarySize = 0x400, | |
40 kUsedMemorySize, | |
41 kOrder, | |
42 kBlockSize, | |
43 kPosStateBits = 0x440, | |
44 kLitContextBits, | |
45 kLitPosBits, | |
46 kNumFastBytes = 0x450, | |
47 kMatchFinder, | |
48 kMatchFinderCycles, | |
49 kNumPasses = 0x460, | |
50 kAlgorithm = 0x470, | |
51 kMultiThread = 0x480, | |
52 kNumThreads, | |
53 kEndMarker = 0x490 | |
54 }; | |
55 } | |
56 | |
57 CODER_INTERFACE(ICompressSetCoderProperties, 0x20) | |
58 { | |
59 STDMETHOD(SetCoderProperties)(const PROPID *propIDs, | |
60 const PROPVARIANT *properties, UInt32 numProperties) PURE; | |
61 }; | |
62 | |
63 /* | |
64 CODER_INTERFACE(ICompressSetCoderProperties, 0x21) | |
65 { | |
66 STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE; | |
67 }; | |
68 */ | |
69 | |
70 CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22) | |
71 { | |
72 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE; | |
73 }; | |
74 | |
75 CODER_INTERFACE(ICompressWriteCoderProperties, 0x23) | |
76 { | |
77 STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE; | |
78 }; | |
79 | |
80 CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24) | |
81 { | |
82 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE; | |
83 }; | |
84 | |
85 CODER_INTERFACE(ICompressSetCoderMt, 0x25) | |
86 { | |
87 STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE; | |
88 }; | |
89 | |
90 CODER_INTERFACE(ICompressGetSubStreamSize, 0x30) | |
91 { | |
92 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE; | |
93 }; | |
94 | |
95 CODER_INTERFACE(ICompressSetInStream, 0x31) | |
96 { | |
97 STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE; | |
98 STDMETHOD(ReleaseInStream)() PURE; | |
99 }; | |
100 | |
101 CODER_INTERFACE(ICompressSetOutStream, 0x32) | |
102 { | |
103 STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE; | |
104 STDMETHOD(ReleaseOutStream)() PURE; | |
105 }; | |
106 | |
107 CODER_INTERFACE(ICompressSetInStreamSize, 0x33) | |
108 { | |
109 STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE; | |
110 }; | |
111 | |
112 CODER_INTERFACE(ICompressSetOutStreamSize, 0x34) | |
113 { | |
114 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE; | |
115 }; | |
116 | |
117 CODER_INTERFACE(ICompressFilter, 0x40) | |
118 { | |
119 STDMETHOD(Init)() PURE; | |
120 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE; | |
121 // Filter return outSize (UInt32) | |
122 // if (outSize <= size): Filter have converted outSize bytes | |
123 // if (outSize > size): Filter have not converted anything. | |
124 // and it needs at least outSize bytes to convert one block | |
125 // (it's for crypto block algorithms). | |
126 }; | |
127 | |
128 CODER_INTERFACE(ICompressCodecsInfo, 0x60) | |
129 { | |
130 STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods) PURE; | |
131 STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE; | |
132 STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder) PURE; | |
133 STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder) PURE; | |
134 }; | |
135 CODER_INTERFACE(ISetCompressCodecsInfo, 0x61) | |
136 { | |
137 STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo) PURE; | |
138 }; | |
139 | |
140 CODER_INTERFACE(ICryptoProperties, 0x80) | |
141 { | |
142 STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE; | |
143 STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE; | |
144 }; | |
145 | |
146 /* | |
147 CODER_INTERFACE(ICryptoResetSalt, 0x88) | |
148 { | |
149 STDMETHOD(ResetSalt)() PURE; | |
150 }; | |
151 */ | |
152 | |
153 CODER_INTERFACE(ICryptoResetInitVector, 0x8C) | |
154 { | |
155 STDMETHOD(ResetInitVector)() PURE; | |
156 }; | |
157 | |
158 CODER_INTERFACE(ICryptoSetPassword, 0x90) | |
159 { | |
160 STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE; | |
161 }; | |
162 | |
163 CODER_INTERFACE(ICryptoSetCRC, 0xA0) | |
164 { | |
165 STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE; | |
166 }; | |
167 | |
168 ////////////////////// | |
169 // It's for DLL file | |
170 namespace NMethodPropID | |
171 { | |
172 enum EEnum | |
173 { | |
174 kID, | |
175 kName, | |
176 kDecoder, | |
177 kEncoder, | |
178 kInStreams, | |
179 kOutStreams, | |
180 kDescription, | |
181 kDecoderIsAssigned, | |
182 kEncoderIsAssigned | |
183 }; | |
184 } | |
185 | |
186 #endif |