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: */
stream
RVNGInputStreamPtr_t stream
Definition HTMLHelpStream.cpp:79
name
string name
Definition HTMLHelpStream.cpp:80
offset
unsigned offset
Definition SoftBookParser.cpp:74
libebook::EBOOKZlibStream
Definition EBOOKZlibStream.h:21
libebook::EBOOKZlibStream::m_stream
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition EBOOKZlibStream.h:39
libebook::EBOOKZlibStream::subStreamName
const char * subStreamName(unsigned id) override
Definition EBOOKZlibStream.cpp:129
libebook::EBOOKZlibStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition EBOOKZlibStream.cpp:154
libebook::EBOOKZlibStream::~EBOOKZlibStream
~EBOOKZlibStream() override
Definition EBOOKZlibStream.cpp:115
libebook::EBOOKZlibStream::existsSubStream
bool existsSubStream(const char *name) override
Definition EBOOKZlibStream.cpp:134
libebook::EBOOKZlibStream::isStructured
bool isStructured() override
Definition EBOOKZlibStream.cpp:119
libebook::EBOOKZlibStream::subStreamCount
unsigned subStreamCount() override
Definition EBOOKZlibStream.cpp:124
libebook::EBOOKZlibStream::tell
long tell() override
Definition EBOOKZlibStream.cpp:159
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::isEnd
bool isEnd() override
Definition EBOOKZlibStream.cpp:164
libebook::EBOOKZlibStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition EBOOKZlibStream.cpp:139
libebook
Definition BBeBCollector.cpp:19