aboutsummaryrefslogtreecommitdiff
path: root/src/stream.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-03 04:50:36 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-03 04:50:36 +0000
commitda89e6d30e57bd6dbb10b4d36b093ce9bbf5c666 (patch)
tree0c8d31d13521011dc52a3fbadbf9e7e27929308f /src/stream.h
parentf4c20290509d7ed3a8fd5304577e7a4cc0b9d974 (diff)
downloadlibbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.gz
libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.bz2
libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.xz
libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.zip
The first batch seem to have made it alright. Unfortunately the Archive class
isn't done yet, I'm going to make it rely on streams, so those will be next, then we can make it work all sortsa' well.
Diffstat (limited to '')
-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