1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// OffsetStream.h 2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __OFFSETSTREAM_H 4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __OFFSETSTREAM_H 5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "Common/MyCom.h" 7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../IStream.h" 8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 9baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass COffsetOutStream: 10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync public IOutStream, 11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync public CMyUnknownImp 12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 _offset; 14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CMyComPtr<IOutStream> _stream; 15baa3858d3f5d128a5c8466b700098109edcad5f2repo syncpublic: 16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync HRESULT Init(IOutStream *stream, UInt64 offset); 17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync MY_UNKNOWN_IMP 19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); 21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); 22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetSize)(UInt64 newSize); 23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif 26