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