CHMStream.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 CHMSTREAM_H_INCLUDED
11 #define CHMSTREAM_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 CHMStream : public librevenge::RVNGInputStream
23 {
24 // disable copying
25  CHMStream(const CHMStream &other);
26  CHMStream &operator=(const CHMStream &other);
27 
28  struct Impl;
29 
30 public:
31  explicit CHMStream(const RVNGInputStreamPtr_t &input);
32  virtual ~CHMStream();
33 
34  virtual bool isStructured();
35  virtual unsigned subStreamCount();
36  virtual const char *subStreamName(unsigned id);
37  virtual bool existsSubStream(const char *name);
38  virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
39  virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
40 
41  virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
42  virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
43  virtual long tell();
44  virtual bool isEnd();
45 
46 private:
47  boost::scoped_ptr<Impl> m_impl;
48 };
49 
50 }
51 
52 #endif // CHMSTREAM_H_INCLUDED
53 
54 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EBOOKHTMLToken.h:91
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: CHMStream.cpp:557
virtual unsigned subStreamCount()
Definition: CHMStream.cpp:501
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
Definition: CHMStream.h:22
boost::scoped_ptr< Impl > m_impl
Definition: CHMStream.h:47
virtual ~CHMStream()
Definition: CHMStream.cpp:489
virtual long tell()
Definition: CHMStream.cpp:590
virtual bool isEnd()
Definition: CHMStream.cpp:595
CHMStream(const CHMStream &other)
CHMStream & operator=(const CHMStream &other)
Definition: CHMStream.cpp:381
virtual bool existsSubStream(const char *name)
Definition: CHMStream.cpp:523
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: CHMStream.cpp:580
virtual bool isStructured()
Definition: CHMStream.cpp:496
unsigned offset
Definition: IMPParser.cpp:73
string name
Definition: CHMStream.cpp:80
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: CHMStream.cpp:585
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: CHMStream.cpp:536
Definition: CHMParser.cpp:20
virtual const char * subStreamName(unsigned id)
Definition: CHMStream.cpp:506

Generated for libe-book by doxygen 1.8.8