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;
44  unsigned m_files;
45  unsigned m_dirNameLength;
46  unsigned m_remainingBytes;
50 };
51 
52 }
53 
54 #endif // IMPHEADER_H_INCLUDED
55 
56 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IMPMetadata m_metadata
Definition: IMPHeader.h:49
Definition: EBOOKHTMLToken.h:91
const IMPMetadata & getMetadata() const
Definition: IMPHeader.cpp:98
void readBookProperties(librevenge::RVNGInputStream *input)
Definition: IMPHeader.cpp:156
Definition: IMPHeader.h:21
unsigned getVersion() const
Definition: IMPHeader.cpp:73
IMPColorMode
Definition: IMPTypes.h:18
bool getCompressed() const
Definition: IMPHeader.cpp:88
unsigned m_remainingBytes
Definition: IMPHeader.h:46
void readHeader(librevenge::RVNGInputStream *input)
Definition: IMPHeader.cpp:108
bool m_encrypted
Definition: IMPHeader.h:48
Definition: IMPTypes.h:25
bool m_compressed
Definition: IMPHeader.h:47
unsigned m_dirNameLength
Definition: IMPHeader.h:45
bool getEncrypted() const
Definition: IMPHeader.cpp:93
static boost::shared_ptr< IMPHeader > create(librevenge::RVNGInputStream *input)
Definition: IMPHeader.cpp:58
unsigned m_version
Definition: IMPHeader.h:42
unsigned getTOCOffset() const
Definition: IMPHeader.cpp:103
unsigned getFileCount() const
Definition: IMPHeader.cpp:83
Definition: CHMParser.cpp:20
IMPColorMode getColorMode() const
Definition: IMPHeader.cpp:78
IMPColorMode m_colorMode
Definition: IMPHeader.h:43
unsigned m_files
Definition: IMPHeader.h:44
IMPHeader(librevenge::RVNGInputStream *input)
Definition: IMPHeader.cpp:44

Generated for libe-book by doxygen 1.8.8