summaryrefslogtreecommitdiff
path: root/src/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.h')
-rw-r--r--src/stream.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/stream.h b/src/stream.h
index a80586b..ba070d3 100644
--- a/src/stream.h
+++ b/src/stream.h
@@ -31,12 +31,45 @@ namespace Bu
31 virtual void setPos( long pos ) = 0; 31 virtual void setPos( long pos ) = 0;
32 virtual void setPosEnd( long pos ) = 0; 32 virtual void setPosEnd( long pos ) = 0;
33 virtual bool isEOS() = 0; 33 virtual bool isEOS() = 0;
34 virtual bool isOpen() = 0;
34 35
35 virtual void flush() = 0; 36 virtual void flush() = 0;
36 37
38 /**
39 * In non-blocking streams this indicates if a read operation will
40 * return data at the moment or not. In blocking streams this should
41 * return the same value as isEOS().
42 */
37 virtual bool canRead() = 0; 43 virtual bool canRead() = 0;
44
45 /**
46 * In non-blocking streams this indicates if a write operation will
47 * succeed or fail. In some cases writing is not allowed (e.g.
48 * internal buffers are full) temporarilly. In blocking streams this
49 * should return the same value as isWritable.
50 */
38 virtual bool canWrite() = 0; 51 virtual bool canWrite() = 0;
39 virtual bool canSeek() = 0; 52
53 /**
54 * Indicates if the stream is capable of read operations. This does not
55 * indicate if such operations will return useful data, see canRead for
56 * that.
57 */
58 virtual bool isReadable() = 0;
59
60 /**
61 * Indicates if the stream is capable of write operations. This does
62 * not indicate if such operations will succeed or fail, see canWrite
63 * for that.
64 */
65 virtual bool isWritable() = 0;
66
67 /**
68 * Indicates if the stream is capable of seek operations. This is
69 * generally false for non-blocking streams. Some buffered streams may
70 * support limited in-buffer seeking.
71 */
72 virtual bool isSeekable() = 0;
40 73
41 virtual bool isBlocking() = 0; 74 virtual bool isBlocking() = 0;
42 virtual void setBlocking( bool bBlocking=true ) = 0; 75 virtual void setBlocking( bool bBlocking=true ) = 0;