LITStream.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 LITSTREAM_H_INCLUDED
11 #define LITSTREAM_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 LITStream : public librevenge::RVNGInputStream
23 {
24 // disable copying
25 LITStream(const LITStream &other);
26 LITStream &operator=(const LITStream &other);
27
28 struct Impl;
29
30 public:
31 LITStream(const RVNGInputStreamPtr_t &input);
32 virtual ~LITStream();
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 // LITSTREAM_H_INCLUDED
53
54 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::LITStream::tell
virtual long tell()
Definition: LITStream.cpp:87
libebook::LITStream::subStreamCount
virtual unsigned subStreamCount()
Definition: LITStream.cpp:43
libebook::LITStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: LITStream.cpp:49
libebook::LITStream
Definition: LITStream.h:22
libebook::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
libebook::LITStream::operator=
LITStream & operator=(const LITStream &other)
libebook::LITStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: LITStream.cpp:56
libebook_utils.h
libebook::LITStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: LITStream.cpp:77
libebook::LITStream::LITStream
LITStream(const LITStream &other)
offset
unsigned offset
Definition: IMPParser.cpp:73
name
string name
Definition: CHMStream.cpp:80
libebook::LITStream::m_impl
boost::scoped_ptr< Impl > m_impl
Definition: LITStream.h:47
libebook::LITStream::isStructured
virtual bool isStructured()
Definition: LITStream.cpp:38
libebook::LITStream::isEnd
virtual bool isEnd()
Definition: LITStream.cpp:92
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook
Definition: CHMParser.cpp:20
libebook::LITStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: LITStream.cpp:63
libebook::LITStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: LITStream.cpp:82
libebook::LITStream::Impl
Definition: LITStream.cpp:17
libebook::LITStream::~LITStream
virtual ~LITStream()
Definition: LITStream.cpp:34
libebook::LITStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: LITStream.cpp:70