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

Generated for libe-book by doxygen 1.9.3