SoftBookHeader.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 SOFTBOOKHEADER_H_INCLUDED
11#define SOFTBOOKHEADER_H_INCLUDED
12
13#include "SoftBookTypes.h"
14
15namespace libebook
16{
17
19{
20public:
21 explicit SoftBookHeader(librevenge::RVNGInputStream *input);
22
23 static std::shared_ptr<SoftBookHeader> create(librevenge::RVNGInputStream *input);
24
25 unsigned getVersion() const;
27 unsigned getFileCount() const;
28 bool getCompressed() const;
29 bool getEncrypted() const;
30 const SoftBookMetadata &getMetadata() const;
31
32 unsigned getTOCOffset() const;
33
34private:
35 void readHeader(librevenge::RVNGInputStream *input);
36 void readBookProperties(librevenge::RVNGInputStream *input);
37
38private:
39 unsigned m_version;
41 unsigned m_files;
47};
48
49}
50
51#endif // SOFTBOOKHEADER_H_INCLUDED
52
53/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition SoftBookHeader.h:19
unsigned getFileCount() const
Definition SoftBookHeader.cpp:83
SoftBookMetadata m_metadata
Definition SoftBookHeader.h:46
bool m_encrypted
Definition SoftBookHeader.h:45
bool m_compressed
Definition SoftBookHeader.h:44
void readHeader(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:108
unsigned m_files
Definition SoftBookHeader.h:41
SoftBookColorMode getColorMode() const
Definition SoftBookHeader.cpp:78
bool getEncrypted() const
Definition SoftBookHeader.cpp:93
unsigned m_remainingBytes
Definition SoftBookHeader.h:43
unsigned getTOCOffset() const
Definition SoftBookHeader.cpp:103
void readBookProperties(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:156
unsigned m_version
Definition SoftBookHeader.h:39
SoftBookHeader(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:44
unsigned getVersion() const
Definition SoftBookHeader.cpp:73
SoftBookColorMode m_colorMode
Definition SoftBookHeader.h:40
unsigned m_dirNameLength
Definition SoftBookHeader.h:42
const SoftBookMetadata & getMetadata() const
Definition SoftBookHeader.cpp:98
bool getCompressed() const
Definition SoftBookHeader.cpp:88
@ input
Definition EBOOKHTMLToken.h:89
@ create
Definition FictionBook2Token.h:106
Definition BBeBCollector.cpp:19
SoftBookColorMode
Definition SoftBookTypes.h:19
Definition SoftBookTypes.h:26

Generated for libe-book by doxygen 1.12.0