aboutsummaryrefslogtreecommitdiff
path: root/src/stable/myriadstream.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/myriadstream.h46
1 files changed, 19 insertions, 27 deletions
diff --git a/src/stable/myriadstream.h b/src/stable/myriadstream.h
index a94a9a2..27a15d5 100644
--- a/src/stable/myriadstream.h
+++ b/src/stable/myriadstream.h
@@ -1,38 +1,30 @@
1/*
2 * Copyright (C) 2007-2023 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 1#ifndef BU_MYRIAD_STREAM_H
9#define BU_MYRIAD_STREAM_H 2#define BU_MYRIAD_STREAM_H
10 3
11#include "bu/stream.h" 4#include "bu/stream.h"
5#include "bu/myriadstream.h"
12#include "bu/myriad.h" 6#include "bu/myriad.h"
13 7
14namespace Bu 8namespace Bu
15{ 9{
16 class MyriadStream : public Bu::Stream 10 class MyriadStream : public Bu::Stream
17 { 11 {
18 friend class Myriad; 12 friend class Myriad;
19 private: 13 private:
20 /** 14 MyriadStream( Bu::Myriad &rMyriad, Bu::Myriad::Stream *pStream,
21 * These can only be created by the Myriad class. 15 Bu::Myriad::Mode eMode );
22 */
23 MyriadStream( Myriad &rMyriad, Myriad::Stream *pStream );
24
25 public: 16 public:
26 virtual ~MyriadStream(); 17 virtual ~MyriadStream();
27 18
19 public:
28 virtual void close(); 20 virtual void close();
29 virtual Bu::size read( void *pBuf, Bu::size nBytes ); 21 virtual size read( void *pBuf, size iBytes );
30 virtual Bu::size write( const void *pBuf, Bu::size nBytes ); 22 virtual size write( const void *pBuf, size iBytes );
31 using Stream::write; 23 using Stream::write;
32 virtual Bu::size tell(); 24 virtual size tell();
33 virtual void seek( Bu::size offset ); 25 virtual void seek( size offset );
34 virtual void setPos( Bu::size pos ); 26 virtual void setPos( size pos );
35 virtual void setPosEnd( Bu::size pos ); 27 virtual void setPosEnd( size pos );
36 virtual bool isEos(); 28 virtual bool isEos();
37 virtual bool isOpen(); 29 virtual bool isOpen();
38 virtual void flush(); 30 virtual void flush();
@@ -43,18 +35,18 @@ namespace Bu
43 virtual bool isSeekable(); 35 virtual bool isSeekable();
44 virtual bool isBlocking(); 36 virtual bool isBlocking();
45 virtual void setBlocking( bool bBlocking=true ); 37 virtual void setBlocking( bool bBlocking=true );
46 virtual void setSize( Bu::size iSize ); 38 virtual void setSize( size iSize );
47
48 virtual size getSize() const; 39 virtual size getSize() const;
49 virtual size getBlockSize() const; 40 virtual size getBlockSize() const;
50 virtual Bu::String getLocation() const; 41 virtual Bu::String getLocation() const;
42 Myriad::StreamId getId() const;
51 43
52 private: 44 private:
53 Myriad &rMyriad; 45 mutable Bu::Mutex mAccess;
54 Myriad::Stream *pStream; 46 Bu::Myriad &rMyriad;
55 Myriad::Block *pCurBlock; 47 Bu::Myriad::Stream *pStream;
56 int iBlockSize; 48 Bu::Myriad::Mode eMode;
57 int iPos; 49 int32_t iPos;
58 }; 50 };
59}; 51};
60 52