diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
| commit | 6232d13f5321b87ddf12a1aa36b4545da45f173d (patch) | |
| tree | 23f3316470a14136debd9d02f9e920ca2b06f4cc /src/ro_buffer.hh | |
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in
memroy.
Diffstat (limited to 'src/ro_buffer.hh')
| -rw-r--r-- | src/ro_buffer.hh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ro_buffer.hh b/src/ro_buffer.hh new file mode 100644 index 0000000..a538f78 --- /dev/null +++ b/src/ro_buffer.hh @@ -0,0 +1,23 @@ +#ifndef RO_BUFFER_HH +#define RO_BUFFER_HH + +#include <stddef.h> + +class RoBuffer { +public: + virtual ~RoBuffer() = default; + + virtual bool empty() const = 0; + + virtual char const* rbuf(size_t want, size_t& avail) = 0; + virtual void rcommit(size_t bytes) = 0; + + static size_t read(RoBuffer* buf, void* data, size_t len); + +protected: + RoBuffer() = default; + RoBuffer(RoBuffer const&) = delete; + RoBuffer& operator=(RoBuffer const&) = delete; +}; + +#endif // RO_BUFFER_HH |
