RocketEBookStream.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 ROCKETEBOOKSTREAM_H_INCLUDED
11 #define ROCKETEBOOKSTREAM_H_INCLUDED
12
13 #include <librevenge-stream/librevenge-stream.h>
14
15 #include "libebook_utils.h"
16
17 namespace libebook
18 {
19
20 class RocketEBookHeader;
21
22 class RocketEBookStream : public librevenge::RVNGInputStream
23 {
24 // disable copying
25 RocketEBookStream(const RocketEBookStream &other);
26 RocketEBookStream &operator=(const RocketEBookStream &other);
27
28 struct Impl;
29
30 public:
31 RocketEBookStream(const RVNGInputStreamPtr_t &input, const RocketEBookHeader &header);
32 virtual ~RocketEBookStream();
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 std::unique_ptr<Impl> m_impl;
48 };
49
50 }
51
52 #endif // ROCKETEBOOKSTREAM_H_INCLUDED
53
54 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
name
string name
Definition: HTMLHelpStream.cpp:80
offset
unsigned offset
Definition: SoftBookParser.cpp:74
libebook::RocketEBookStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: RocketEBookStream.cpp:151
libebook::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:54
libebook::RocketEBookStream
Definition: RocketEBookStream.h:22
libebook::RocketEBookStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: RocketEBookStream.cpp:143
libebook::RocketEBookStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: RocketEBookStream.cpp:158
libebook::RocketEBookHeader
Definition: RocketEBookHeader.h:21
libebook_utils.h
libebook::RocketEBookStream::~RocketEBookStream
virtual ~RocketEBookStream()
Definition: RocketEBookStream.cpp:117
libebook::RocketEBookStream::isStructured
virtual bool isStructured()
Definition: RocketEBookStream.cpp:121
libebook::RocketEBookStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: RocketEBookStream.cpp:138
libebook::RocketEBookStream::m_impl
std::unique_ptr< Impl > m_impl
Definition: RocketEBookStream.h:47
libebook::RocketEBookStream::isEnd
virtual bool isEnd()
Definition: RocketEBookStream.cpp:173
libebook::RocketEBookStream::subStreamCount
virtual unsigned subStreamCount()
Definition: RocketEBookStream.cpp:126
libebook::RocketEBookStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: RocketEBookStream.cpp:163
libebook::RocketEBookStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: RocketEBookStream.cpp:131
libebook::RocketEBookStream::operator=
RocketEBookStream & operator=(const RocketEBookStream &other)
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:89
libebook
Definition: BBeBCollector.cpp:18
libebook::EBOOKHTMLToken::header
Definition: EBOOKHTMLToken.h:82
libebook::RocketEBookStream::RocketEBookStream
RocketEBookStream(const RocketEBookStream &other)
libebook::RocketEBookStream::tell
virtual long tell()
Definition: RocketEBookStream.cpp:168
libebook::RocketEBookStream::Impl
Definition: RocketEBookStream.cpp:98