From 23cebe4e31e1ddc15de71af393c4f1271e379124 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 27 Nov 2003 12:18:36 +0000 Subject: Tweaked buffers --- include/Buffer.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/Buffer.h b/include/Buffer.h index 316af13..8996b2d 100644 --- a/include/Buffer.h +++ b/include/Buffer.h @@ -11,7 +11,7 @@ class Buffer : public Handle { public: - Buffer(); + Buffer(bool seekable = false); Buffer(const Buffer &); virtual ~Buffer(); virtual ssize_t write(const void *buf, size_t count) throw(GeneralException); @@ -22,12 +22,16 @@ class Buffer : public Handle { virtual Buffer operator=(const Buffer &); virtual bool CanWatch() const; virtual ssize_t GetSize() const; - char operator[](size_t) const; - char & operator[](size_t); + virtual bool CanSeek() const; + virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException); + virtual off_t tell() const; + Byte operator[](size_t) const; + Byte & operator[](size_t); private: - char * buffer, zero; + Byte * buffer, zero; size_t realsiz, bufsiz, ptr; + bool seekable; }; #endif -- cgit v1.2.3