Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef CHMSTREAM_H_INCLUDED
00011 #define CHMSTREAM_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 CHMStream : public librevenge::RVNGInputStream
00023 {
00024
00025 CHMStream(const CHMStream &other);
00026 CHMStream &operator=(const CHMStream &other);
00027
00028 struct Impl;
00029
00030 public:
00031 explicit CHMStream(const RVNGInputStreamPtr_t &input);
00032 virtual ~CHMStream();
00033
00034 virtual bool isStructured();
00035 virtual unsigned subStreamCount();
00036 virtual const char *subStreamName(unsigned id);
00037 virtual bool existsSubStream(const char *name);
00038 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
00039 virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
00040
00041 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
00042 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
00043 virtual long tell();
00044 virtual bool isEnd();
00045
00046 private:
00047 boost::scoped_ptr<Impl> m_impl;
00048 };
00049
00050 }
00051
00052 #endif // CHMSTREAM_H_INCLUDED
00053
00054