Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef RBSTREAM_H_INCLUDED
00011 #define RBSTREAM_H_INCLUDED
00012
00013 #include <boost/scoped_ptr.hpp>
00014
00015 #include <librevenge-stream/librevenge-stream.h>
00016
00017 #include "libebook_utils.h"
00018
00019 namespace libebook
00020 {
00021
00022 class RBHeader;
00023
00024 class RBStream : public librevenge::RVNGInputStream
00025 {
00026
00027 RBStream(const RBStream &other);
00028 RBStream &operator=(const RBStream &other);
00029
00030 struct Impl;
00031
00032 public:
00033 RBStream(const RVNGInputStreamPtr_t &input, const RBHeader &header);
00034 virtual ~RBStream();
00035
00036 virtual bool isStructured();
00037 virtual unsigned subStreamCount();
00038 virtual const char *subStreamName(unsigned id);
00039 virtual bool existsSubStream(const char *name);
00040 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
00041 virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
00042
00043 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
00044 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
00045 virtual long tell();
00046 virtual bool isEnd();
00047
00048 private:
00049 boost::scoped_ptr<Impl> m_impl;
00050 };
00051
00052 }
00053
00054 #endif // RBSTREAM_H_INCLUDED
00055
00056