aboutsummaryrefslogtreecommitdiff
path: root/src/myriadstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/myriadstream.h')
-rw-r--r--src/myriadstream.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/myriadstream.h b/src/myriadstream.h
new file mode 100644
index 0000000..755ff53
--- /dev/null
+++ b/src/myriadstream.h
@@ -0,0 +1,58 @@
1/*
2 * Copyright (C) 2007-2008 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef BU_MYRIAD_STREAM_H
9#define BU_MYRIAD_STREAM_H
10
11#include "bu/stream.h"
12#include "bu/myriad.h"
13
14namespace Bu
15{
16 class MyriadStream : public Bu::Stream
17 {
18 friend class Myriad;
19 private:
20 /**
21 * These can only be created by the Myriad class.
22 */
23 MyriadStream( Myriad &rMyriad, uint32_t uStream );
24
25 public:
26 virtual ~MyriadStream();
27
28 virtual void close();
29 virtual size_t read( void *pBuf, size_t nBytes );
30 virtual size_t write( const void *pBuf, size_t nBytes );
31 using Stream::write;
32 virtual long tell();
33 virtual void seek( long offset );
34 virtual void setPos( long pos );
35 virtual void setPosEnd( long pos );
36 virtual bool isEos();
37 virtual bool isOpen();
38 virtual void flush();
39 virtual bool canRead();
40 virtual bool canWrite();
41 virtual bool isReadable();
42 virtual bool isWritable();
43 virtual bool isSeekable();
44 virtual bool isBlocking();
45 virtual void setBlocking( bool bBlocking=true );
46
47 private:
48 Myriad &rMyriad;
49 uint32_t uStream;
50 char *pCurBlock;
51 uint32_t uCurBlock;
52 uint32_t uSize;
53 uint32_t uBlockSize;
54 uint32_t uPos;
55 };
56};
57
58#endif