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 <librevenge-stream/librevenge-stream.h>
31
33{
34public:
35 WPGHeader();
36
37 bool load(librevenge::RVNGInputStream *input);
38
39 bool isSupported() const;
40
41 unsigned long startOfDocument() const;
42
43 int majorVersion() const;
44
45private:
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: */
unsigned long m_startOfDocument
Definition WPGHeader.h:47
unsigned char m_fileType
Definition WPGHeader.h:49
unsigned char m_majorVersion
Definition WPGHeader.h:50
unsigned int m_startOfPacketData
Definition WPGHeader.h:53
bool load(librevenge::RVNGInputStream *input)
Definition WPGHeader.cpp:62
unsigned char m_minorVersion
Definition WPGHeader.h:51
unsigned char m_productType
Definition WPGHeader.h:48
WPGHeader()
Definition WPGHeader.cpp:46
bool isSupported() const
Definition WPGHeader.cpp:94
unsigned long startOfDocument() const
Definition WPGHeader.cpp:109
int majorVersion() const
Definition WPGHeader.cpp:114
unsigned char m_identifier[4]
Definition WPGHeader.h:46
unsigned int m_encryptionKey
Definition WPGHeader.h:52

Generated for libwpg by doxygen 1.14.0