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

Generated for libe-book by doxygen 1.8.14