tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

OffsetStream.h (553B)


      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