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: */
EBOOKZlibStream(librevenge::RVNGInputStream *stream)
Definition: EBOOKZlibStream.cpp:104
unsigned offset
Definition: SoftBookParser.cpp:74
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: EBOOKZlibStream.cpp:149
bool isEnd() override
Definition: EBOOKZlibStream.cpp:164
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: EBOOKZlibStream.cpp:154
long tell() override
Definition: EBOOKZlibStream.cpp:159
unsigned subStreamCount() override
Definition: EBOOKZlibStream.cpp:124
const char * subStreamName(unsigned id) override
Definition: EBOOKZlibStream.cpp:129
RVNGInputStream * getSubStreamById(unsigned id) override
Definition: EBOOKZlibStream.cpp:144
bool existsSubStream(const char *name) override
Definition: EBOOKZlibStream.cpp:134
const char * name
Definition: EBOOKHTMLToken.cpp:44
Definition: EBOOKZlibStream.h:20
bool isStructured() override
Definition: EBOOKZlibStream.cpp:119
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: EBOOKZlibStream.h:39
Definition: BBeBCollector.cpp:18
~EBOOKZlibStream() override
Definition: EBOOKZlibStream.cpp:115
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: EBOOKZlibStream.cpp:139

Generated for libe-book by doxygen 1.8.14