SoftBookHeader.h Source File documentation

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
18 class SoftBookHeader
19{
20public:
21 explicit SoftBookHeader(librevenge::RVNGInputStream *input);
22
23 static std::shared_ptr<SoftBookHeader> create(librevenge::RVNGInputStream *input);
24
25 unsigned getVersion() const;
26 SoftBookColorMode getColorMode() 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;
40 SoftBookColorMode m_colorMode;
41 unsigned m_files;
42 unsigned m_dirNameLength;
43 unsigned m_remainingBytes;
44 bool m_compressed;
45 bool m_encrypted;
46 SoftBookMetadata m_metadata;
47};
48
49}
50
51#endif // SOFTBOOKHEADER_H_INCLUDED
52
53/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
SoftBookTypes.h
libebook::SoftBookHeader
Definition SoftBookHeader.h:19
libebook::SoftBookHeader::getFileCount
unsigned getFileCount() const
Definition SoftBookHeader.cpp:83
libebook::SoftBookHeader::m_metadata
SoftBookMetadata m_metadata
Definition SoftBookHeader.h:46
libebook::SoftBookHeader::m_encrypted
bool m_encrypted
Definition SoftBookHeader.h:45
libebook::SoftBookHeader::m_compressed
bool m_compressed
Definition SoftBookHeader.h:44
libebook::SoftBookHeader::readHeader
void readHeader(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:108
libebook::SoftBookHeader::m_files
unsigned m_files
Definition SoftBookHeader.h:41
libebook::SoftBookHeader::create
static std::shared_ptr< SoftBookHeader > create(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:58
libebook::SoftBookHeader::getColorMode
SoftBookColorMode getColorMode() const
Definition SoftBookHeader.cpp:78
libebook::SoftBookHeader::getEncrypted
bool getEncrypted() const
Definition SoftBookHeader.cpp:93
libebook::SoftBookHeader::m_remainingBytes
unsigned m_remainingBytes
Definition SoftBookHeader.h:43
libebook::SoftBookHeader::getTOCOffset
unsigned getTOCOffset() const
Definition SoftBookHeader.cpp:103
libebook::SoftBookHeader::readBookProperties
void readBookProperties(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:156
libebook::SoftBookHeader::m_version
unsigned m_version
Definition SoftBookHeader.h:39
libebook::SoftBookHeader::SoftBookHeader
SoftBookHeader(librevenge::RVNGInputStream *input)
Definition SoftBookHeader.cpp:44
libebook::SoftBookHeader::getVersion
unsigned getVersion() const
Definition SoftBookHeader.cpp:73
libebook::SoftBookHeader::m_colorMode
SoftBookColorMode m_colorMode
Definition SoftBookHeader.h:40
libebook::SoftBookHeader::m_dirNameLength
unsigned m_dirNameLength
Definition SoftBookHeader.h:42
libebook::SoftBookHeader::getMetadata
const SoftBookMetadata & getMetadata() const
Definition SoftBookHeader.cpp:98
libebook::SoftBookHeader::getCompressed
bool getCompressed() const
Definition SoftBookHeader.cpp:88
libebook
Definition BBeBCollector.cpp:19
libebook::SoftBookColorMode
SoftBookColorMode
Definition SoftBookTypes.h:19
libebook::SoftBookMetadata
Definition SoftBookTypes.h:26