EBOOKZlibStream.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  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef EBOOKZLIBSTREAM_H_INCLUDED
11 #define EBOOKZLIBSTREAM_H_INCLUDED
12 
13 #include <memory>
14 
15 #include <librevenge-stream/librevenge-stream.h>
16 
17 namespace libebook
18 {
19 
20 class EBOOKZlibStream : public librevenge::RVNGInputStream
21 {
22 public:
23  EBOOKZlibStream(librevenge::RVNGInputStream *stream);
24  ~EBOOKZlibStream() override;
25 
26  bool isStructured() override;
27  unsigned subStreamCount() override;
28  const char *subStreamName(unsigned id) override;
29  bool existsSubStream(const char *name) override;
30  librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
31  RVNGInputStream *getSubStreamById(unsigned id) override;
32 
33  const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
34  int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
35  long tell() override;
36  bool isEnd() override;
37 
38 private:
39  std::unique_ptr<librevenge::RVNGInputStream> m_stream;
40 };
41 
42 }
43 
44 #endif // EBOOKZLIBSTREAM_H_INCLUDED
45 
46 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::EBOOKZlibStream::isEnd
bool isEnd() override
Definition: EBOOKZlibStream.cpp:164
m_stream
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: PeanutPressParser.cpp:74
libebook
Definition: BBeBCollector.cpp:19
libebook::EBOOKZlibStream::subStreamCount
unsigned subStreamCount() override
Definition: EBOOKZlibStream.cpp:124
libebook_utils.h
libebook::EBOOKZlibStream::isStructured
bool isStructured() override
Definition: EBOOKZlibStream.cpp:119
libebook::EBOOKZlibStream::existsSubStream
bool existsSubStream(const char *name) override
Definition: EBOOKZlibStream.cpp:134
EBOOKMemoryStream.h
offset
unsigned offset
Definition: SoftBookParser.cpp:74
libebook::EBOOKZlibStream::~EBOOKZlibStream
~EBOOKZlibStream() override
Definition: EBOOKZlibStream.cpp:115
stream
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
data
MSPackFileData * data
Definition: HTMLHelpStream.cpp:63
libebook::EBOOKZlibStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: EBOOKZlibStream.cpp:154
libebook::EBOOKZlibStream::tell
long tell() override
Definition: EBOOKZlibStream.cpp:159
libebook::EBOOKHTMLToken::input
@ input
Definition: EBOOKHTMLToken.h:89
libebook::readU8
uint8_t readU8(librevenge::RVNGInputStream *input, bool)
Definition: libebook_utils.cpp:45
libebook::EBOOKZlibStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: EBOOKZlibStream.cpp:139
libebook::EndOfStreamException
Definition: libebook_utils.h:100
libebook::EBOOKZlibStream
Definition: EBOOKZlibStream.h:21
name
string name
Definition: HTMLHelpStream.cpp:80
libebook::EBOOKZlibStream::EBOOKZlibStream
EBOOKZlibStream(librevenge::RVNGInputStream *stream)
Definition: EBOOKZlibStream.cpp:104
libebook::EBOOKZlibStream::subStreamName
const char * subStreamName(unsigned id) override
Definition: EBOOKZlibStream.cpp:129
libebook::EBOOKZlibStream::getSubStreamById
RVNGInputStream * getSubStreamById(unsigned id) override
Definition: EBOOKZlibStream.cpp:144
libebook::EBOOKZlibStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: EBOOKZlibStream.cpp:149
libebook::EBOOKZlibStream::m_stream
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: EBOOKZlibStream.h:39
EBOOKZlibStream.h

Generated for libe-book by doxygen 1.8.20