00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libe-book project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef IMPHEADER_H_INCLUDED 00011 #define IMPHEADER_H_INCLUDED 00012 00013 #include <boost/shared_ptr.hpp> 00014 00015 #include "IMPTypes.h" 00016 00017 00018 namespace libebook 00019 { 00020 00021 class IMPHeader 00022 { 00023 public: 00024 explicit IMPHeader(librevenge::RVNGInputStream *input); 00025 00026 static boost::shared_ptr<IMPHeader> create(librevenge::RVNGInputStream *input); 00027 00028 unsigned getVersion() const; 00029 IMPColorMode getColorMode() const; 00030 unsigned getFileCount() const; 00031 bool getCompressed() const; 00032 bool getEncrypted() const; 00033 const IMPMetadata &getMetadata() const; 00034 00035 unsigned getTOCOffset() const; 00036 00037 private: 00038 void readHeader(librevenge::RVNGInputStream *input); 00039 void readBookProperties(librevenge::RVNGInputStream *input); 00040 00041 private: 00042 unsigned m_version; 00043 IMPColorMode m_colorMode; 00044 unsigned m_files; 00045 unsigned m_dirNameLength; 00046 unsigned m_remainingBytes; 00047 bool m_compressed; 00048 bool m_encrypted; 00049 IMPMetadata m_metadata; 00050 }; 00051 00052 } 00053 00054 #endif // IMPHEADER_H_INCLUDED 00055 00056 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */