WPGHeader.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpg
3  * Version: MPL 2.0 / LGPLv2.1+
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  * Major Contributor(s):
10  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
11  * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
12  *
13  * For minor contributions see the git repository.
14  *
15  * Alternatively, the contents of this file may be used under the terms
16  * of the GNU Lesser General Public License Version 2.1 or later
17  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18  * applicable instead of those above.
19  *
20  * For further information visit http://libwpg.sourceforge.net
21  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef __WPGHEADER_H__
28 #define __WPGHEADER_H__
29 
30 #include <libwpd-stream/WPXStream.h>
31 
32 class WPGHeader
33 {
34 public:
35  WPGHeader();
36 
37  bool load(WPXInputStream *input);
38 
39  bool isSupported() const;
40 
41  unsigned long startOfDocument() const;
42 
43  int majorVersion() const;
44 
45 private:
46  unsigned char m_identifier[4]; // should always be 0xFF followed by "WPC"
47  unsigned long m_startOfDocument; // index into file
48  unsigned char m_productType; // should always be 1 for WPG files
49  unsigned char m_fileType; // should always be 22 for WPG files
50  unsigned char m_majorVersion; // 2 for WPG 8.0 files
51  unsigned char m_minorVersion; // 0 for WPG 8.0 files
52  unsigned int m_encryptionKey; // 0 when not encrypted
53  unsigned int m_startOfPacketData; // unused, since according to the docs no packets are defined
54 };
55 
56 #endif // WPGHEADER
57 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpg by doxygen 1.8.3.1