RocketEBookStream.h Source File documentation

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: */
RocketEBookStream.h
libebook::RocketEBookStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: RocketEBookStream.cpp:158
libebook::getRemainingLength
unsigned long getRemainingLength(librevenge::RVNGInputStream *const input)
Definition: libebook_utils.cpp:170
libebook::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:54
libebook::EBOOKHTMLToken::dir
Definition: EBOOKHTMLToken.h:63
libebook
Definition: BBeBCollector.cpp:18
libebook::RocketEBookStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: RocketEBookStream.cpp:151
libebook::RocketEBookHeader::FLAG_DEFLATED
Definition: RocketEBookHeader.h:29
libebook::RocketEBookStream::Impl
Definition: RocketEBookStream.cpp:98
libebook_utils.h
libebook::RocketEBookStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: RocketEBookStream.cpp:143
libebook::RocketEBookStream::isStructured
virtual bool isStructured()
Definition: RocketEBookStream.cpp:121
EBOOKMemoryStream.h
offset
unsigned offset
Definition: SoftBookParser.cpp:74
libebook::EBOOKHTMLToken::i
Definition: EBOOKHTMLToken.h:86
libebook::RocketEBookStream::m_impl
std::unique_ptr< Impl > m_impl
Definition: RocketEBookStream.h:47
libebook::EBOOKHTMLToken::id
Definition: EBOOKHTMLToken.h:203
libebook::RocketEBookStream::~RocketEBookStream
virtual ~RocketEBookStream()
Definition: RocketEBookStream.cpp:117
m_name
const char *const m_name
Definition: RocketEBookStream.cpp:93
libebook::RocketEBookStream::Impl::Impl
Impl(const RVNGInputStreamPtr_t &input, const RocketEBookHeader::Directory_t &directory)
Definition: RocketEBookStream.cpp:106
libebook::seek
void seek(librevenge::RVNGInputStream *const input, const unsigned long pos)
Definition: libebook_utils.cpp:152
stream
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
libebook::RocketEBookStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: RocketEBookStream.cpp:163
data
MSPackFileData * data
Definition: HTMLHelpStream.cpp:63
libebook::RocketEBookHeader
Definition: RocketEBookHeader.h:21
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:89
libebook::RocketEBookStream::Impl::dir
const RocketEBookHeader::Directory_t dir
Definition: RocketEBookStream.cpp:101
libebook::RocketEBookStream::subStreamCount
virtual unsigned subStreamCount()
Definition: RocketEBookStream.cpp:126
libebook::RocketEBookStream::operator=
RocketEBookStream & operator=(const RocketEBookStream &other)
libebook::RocketEBookStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: RocketEBookStream.cpp:138
libebook::readU32
uint32_t readU32(librevenge::RVNGInputStream *input, bool bigEndian)
Definition: libebook_utils.cpp:73
libebook::EBOOKHTMLToken::header
Definition: EBOOKHTMLToken.h:82
libebook::RocketEBookStream::isEnd
virtual bool isEnd()
Definition: RocketEBookStream.cpp:173
name
string name
Definition: HTMLHelpStream.cpp:80
libebook::RocketEBookStream::RocketEBookStream
RocketEBookStream(const RocketEBookStream &other)
RocketEBookHeader.h
libebook::RocketEBookStream::tell
virtual long tell()
Definition: RocketEBookStream.cpp:168
libebook::readNBytes
const unsigned char * readNBytes(librevenge::RVNGInputStream *const input, const unsigned long numBytes)
Definition: libebook_utils.cpp:105
EBOOKZlibStream.h
libebook::RocketEBookStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: RocketEBookStream.cpp:131
libebook::RocketEBookStream
Definition: RocketEBookStream.h:22
libebook::RocketEBookStream::Impl::stream
const RVNGInputStreamPtr_t stream
Definition: RocketEBookStream.cpp:100
EBOOKStreamView.h
length
unsigned length
Definition: SoftBookParser.cpp:73
libebook::RocketEBookHeader::Directory_t
std::deque< Entry > Directory_t
Definition: RocketEBookHeader.h:42