aboutsummaryrefslogtreecommitdiff
path: root/src/myriadstream.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-02-10 18:20:40 +0000
committerMike Buland <eichlan@xagasoft.com>2010-02-10 18:20:40 +0000
commit79b7b631750b69cbe06daedb0453306595dea6ad (patch)
tree284dc89fa2ee6ec88e9b0625a412185d5d1348b0 /src/myriadstream.h
parent1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b (diff)
downloadlibbu++-79b7b631750b69cbe06daedb0453306595dea6ad.tar.gz
libbu++-79b7b631750b69cbe06daedb0453306595dea6ad.tar.bz2
libbu++-79b7b631750b69cbe06daedb0453306595dea6ad.tar.xz
libbu++-79b7b631750b69cbe06daedb0453306595dea6ad.zip
Changed the name of nids to Myriad, I like it, but I'm not getting rid of nids
until I can safely migrate to Myriad.
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