X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=trace_snappyfile.hpp;fp=trace_snappyfile.hpp;h=398ff7900c335a4c7f3b55d8afe0e643c5651e49;hb=2257168033b52be3094efdbd7eadff8eb77a4c4e;hp=61b7ab1b29435aeeb51c833a05958c82f3bcee32;hpb=d4ca4e2090572b9bf8430c9d4ece5cb9c9b6528e;p=apitrace diff --git a/trace_snappyfile.hpp b/trace_snappyfile.hpp index 61b7ab1..398ff79 100644 --- a/trace_snappyfile.hpp +++ b/trace_snappyfile.hpp @@ -52,6 +52,9 @@ public: File::Mode mode = File::Read); virtual ~SnappyFile(); + virtual bool supportsOffsets() const; + virtual File::Offset currentOffset(); + virtual void setCurrentOffset(const File::Offset &offset); protected: virtual bool rawOpen(const std::string &filename, File::Mode mode); virtual bool rawWrite(const void *buffer, size_t length); @@ -59,6 +62,7 @@ protected: virtual int rawGetc(); virtual void rawClose(); virtual void rawFlush(); + virtual bool rawSkip(unsigned length); private: inline size_t usedCacheSize() const @@ -90,6 +94,8 @@ private: size_t m_cacheSize; char *m_compressedCache; + + File::Offset m_currentOffset; }; }