00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libwpg 00003 * Version: MPL 2.0 / LGPLv2.1+ 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 * Major Contributor(s): 00010 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) 00011 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) 00012 * 00013 * For minor contributions see the git repository. 00014 * 00015 * Alternatively, the contents of this file may be used under the terms 00016 * of the GNU Lesser General Public License Version 2.1 or later 00017 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are 00018 * applicable instead of those above. 00019 * 00020 * For further information visit http://libwpg.sourceforge.net 00021 */ 00022 00023 /* "This product is not manufactured, approved, or supported by 00024 * Corel Corporation or Corel Corporation Limited." 00025 */ 00026 00027 #ifndef __WPGHEADER_H__ 00028 #define __WPGHEADER_H__ 00029 00030 #include <librevenge-stream/librevenge-stream.h> 00031 00032 class WPGHeader 00033 { 00034 public: 00035 WPGHeader(); 00036 00037 bool load(librevenge::RVNGInputStream *input); 00038 00039 bool isSupported() const; 00040 00041 unsigned long startOfDocument() const; 00042 00043 int majorVersion() const; 00044 00045 private: 00046 unsigned char m_identifier[4]; // should always be 0xFF followed by "WPC" 00047 unsigned long m_startOfDocument; // index into file 00048 unsigned char m_productType; // should always be 1 for WPG files 00049 unsigned char m_fileType; // should always be 22 for WPG files 00050 unsigned char m_majorVersion; // 2 for WPG 8.0 files 00051 unsigned char m_minorVersion; // 0 for WPG 8.0 files 00052 unsigned int m_encryptionKey; // 0 when not encrypted 00053 unsigned int m_startOfPacketData; // unused, since according to the docs no packets are defined 00054 }; 00055 00056 #endif // WPGHEADER 00057 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */