diff options
Diffstat (limited to 'CPP/7zip/Common/OffsetStream.h')
-rw-r--r-- | CPP/7zip/Common/OffsetStream.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/CPP/7zip/Common/OffsetStream.h b/CPP/7zip/Common/OffsetStream.h new file mode 100644 index 0000000..9074a24 --- /dev/null +++ b/CPP/7zip/Common/OffsetStream.h | |||
@@ -0,0 +1,26 @@ | |||
1 | // OffsetStream.h | ||
2 | |||
3 | #ifndef __OFFSET_STREAM_H | ||
4 | #define __OFFSET_STREAM_H | ||
5 | |||
6 | #include "../../Common/MyCom.h" | ||
7 | |||
8 | #include "../IStream.h" | ||
9 | |||
10 | class COffsetOutStream: | ||
11 | public IOutStream, | ||
12 | public CMyUnknownImp | ||
13 | { | ||
14 | UInt64 _offset; | ||
15 | CMyComPtr<IOutStream> _stream; | ||
16 | public: | ||
17 | HRESULT Init(IOutStream *stream, UInt64 offset); | ||
18 | |||
19 | MY_UNKNOWN_IMP | ||
20 | |||
21 | STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); | ||
22 | STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); | ||
23 | STDMETHOD(SetSize)(UInt64 newSize); | ||
24 | }; | ||
25 | |||
26 | #endif | ||