RBStream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libe-book project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * For further information visit http://libebook.sourceforge.net
8  */
9 
10 #ifndef RBSTREAM_H_INCLUDED
11 #define RBSTREAM_H_INCLUDED
12 
13 #include <boost/scoped_ptr.hpp>
14 
15 #include <librevenge-stream/librevenge-stream.h>
16 
17 #include "libebook_utils.h"
18 
19 namespace libebook
20 {
21 
22 class RBHeader;
23 
24 class RBStream : public librevenge::RVNGInputStream
25 {
26 // disable copying
27  RBStream(const RBStream &other);
28  RBStream &operator=(const RBStream &other);
29 
30  struct Impl;
31 
32 public:
34  virtual ~RBStream();
35 
36  virtual bool isStructured();
37  virtual unsigned subStreamCount();
38  virtual const char *subStreamName(unsigned id);
39  virtual bool existsSubStream(const char *name);
40  virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
41  virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
42 
43  virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
44  virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
45  virtual long tell();
46  virtual bool isEnd();
47 
48 private:
49  boost::scoped_ptr<Impl> m_impl;
50 };
51 
52 }
53 
54 #endif // RBSTREAM_H_INCLUDED
55 
56 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EBOOKHTMLToken.h:91
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
Definition: RBStream.h:24
Definition: RBStream.cpp:97
virtual const char * subStreamName(unsigned id)
Definition: RBStream.cpp:130
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: RBStream.cpp:142
virtual bool existsSubStream(const char *name)
Definition: RBStream.cpp:137
virtual long tell()
Definition: RBStream.cpp:167
virtual unsigned subStreamCount()
Definition: RBStream.cpp:125
virtual bool isStructured()
Definition: RBStream.cpp:120
Definition: RBHeader.h:21
virtual ~RBStream()
Definition: RBStream.cpp:116
RBStream & operator=(const RBStream &other)
RBStream(const RBStream &other)
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: RBStream.cpp:162
Definition: EBOOKHTMLToken.h:84
unsigned offset
Definition: IMPParser.cpp:73
string name
Definition: CHMStream.cpp:80
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: RBStream.cpp:157
boost::scoped_ptr< Impl > m_impl
Definition: RBStream.h:49
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: RBStream.cpp:150
Definition: CHMParser.cpp:20
virtual bool isEnd()
Definition: RBStream.cpp:172

Generated for libe-book by doxygen 1.8.8