aboutsummaryrefslogtreecommitdiff
path: root/src/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.h')
-rw-r--r--src/stream.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/stream.h b/src/stream.h
new file mode 100644
index 0000000..274f4fd
--- /dev/null
+++ b/src/stream.h
@@ -0,0 +1,34 @@
1#ifndef STREAM_H
2#define STREAM_H
3
4#include <stdint.h>
5#include <stdio.h>
6
7namespace Bu
8{
9 class Stream
10 {
11 public:
12 Stream();
13 virtual ~Stream();
14
15 virtual void close() = 0;
16 virtual size_t read( char *pBuf, size_t nBytes ) = 0;
17 virtual size_t write( const char *pBuf, size_t nBytes ) = 0;
18
19 virtual long tell() = 0;
20 virtual void seek( long offset ) = 0;
21 virtual void setPos( long pos ) = 0;
22 virtual void setPosEnd( long pos ) = 0;
23 virtual bool isEOS() = 0;
24
25 virtual bool canRead() = 0;
26 virtual bool canWrite() = 0;
27 virtual bool canSeek() = 0;
28
29 private:
30
31 };
32}
33
34#endif