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: */
libebook::CHMStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: CHMStream.cpp:557
libebook::CHMStream::subStreamCount
virtual unsigned subStreamCount()
Definition: CHMStream.cpp:501
libebook::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
libebook::CHMStream
Definition: CHMStream.h:22
libebook::CHMStream::m_impl
boost::scoped_ptr< Impl > m_impl
Definition: CHMStream.h:47
libebook::CHMStream::~CHMStream
virtual ~CHMStream()
Definition: CHMStream.cpp:489
libebook::CHMStream::tell
virtual long tell()
Definition: CHMStream.cpp:590
libebook_utils.h
libebook::CHMStream::isEnd
virtual bool isEnd()
Definition: CHMStream.cpp:595
libebook::CHMStream::CHMStream
CHMStream(const CHMStream &other)
libebook::CHMStream::operator=
CHMStream & operator=(const CHMStream &other)
libebook::CHMStream::Impl
Definition: CHMStream.cpp:381
libebook::CHMStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: CHMStream.cpp:523
libebook::CHMStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: CHMStream.cpp:580
libebook::CHMStream::isStructured
virtual bool isStructured()
Definition: CHMStream.cpp:496
offset
unsigned offset
Definition: IMPParser.cpp:73
name
string name
Definition: CHMStream.cpp:80
libebook::CHMStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: CHMStream.cpp:585
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook::CHMStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: CHMStream.cpp:536
libebook
Definition: CHMParser.cpp:20
libebook::CHMStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: CHMStream.cpp:506