Mercurial > vba-linux
comparison src/win32/7zip/7z/CPP/7zip/Archive/7z/7zSpecStream.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 // 7zSpecStream.h | |
2 | |
3 #ifndef __7Z_SPEC_STREAM_H | |
4 #define __7Z_SPEC_STREAM_H | |
5 | |
6 #include "../../IStream.h" | |
7 #include "../../ICoder.h" | |
8 #include "../../../Common/MyCom.h" | |
9 | |
10 class CSequentialInStreamSizeCount2: | |
11 public ISequentialInStream, | |
12 public ICompressGetSubStreamSize, | |
13 public CMyUnknownImp | |
14 { | |
15 CMyComPtr<ISequentialInStream> _stream; | |
16 CMyComPtr<ICompressGetSubStreamSize> _getSubStreamSize; | |
17 UInt64 _size; | |
18 public: | |
19 void Init(ISequentialInStream *stream) | |
20 { | |
21 _stream = stream; | |
22 _getSubStreamSize = 0; | |
23 _stream.QueryInterface(IID_ICompressGetSubStreamSize, &_getSubStreamSize); | |
24 _size = 0; | |
25 } | |
26 UInt64 GetSize() const { return _size; } | |
27 | |
28 MY_UNKNOWN_IMP1(ICompressGetSubStreamSize) | |
29 | |
30 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); | |
31 | |
32 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value); | |
33 }; | |
34 | |
35 #endif |