WPXHeader.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpd
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) 2002 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net)
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://libwpd.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 WPXHEADER_H
28 #define WPXHEADER_H
29 
30 #include <libwpd/libwpd.h>
32 #include "libwpd_types.h"
33 
34 class WPXEncryption;
35 
36 class WPXHeader
37 {
38 public:
39  WPXHeader(WPXInputStream *input, WPXEncryption *encryption, uint32_t documentOffset, uint8_t productType,
40  uint8_t fileType, uint8_t majorVersion, uint8_t minorVersion, uint16_t documentEncryption);
41  virtual ~WPXHeader();
42 
43  static WPXHeader *constructHeader(WPXInputStream *input, WPXEncryption *encryption);
44 
45  uint32_t getDocumentOffset() const
46  {
47  return m_documentOffset;
48  }
49  uint8_t getProductType() const
50  {
51  return m_productType;
52  }
53  uint8_t getFileType() const
54  {
55  return m_fileType;
56  }
57  uint8_t getMajorVersion() const
58  {
59  return m_majorVersion;
60  }
61  uint8_t getMinorVersion() const
62  {
63  return m_minorVersion;
64  }
65  uint16_t getDocumentEncryption() const
66  {
67  return m_documentEncryption;
68  }
69 
70 private:
71  uint32_t m_documentOffset;
72  uint8_t m_productType;
73  uint8_t m_fileType;
74  uint8_t m_majorVersion;
75  uint8_t m_minorVersion;
77 };
78 
79 #endif /* WPXHEADER_H */
80 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
uint32_t m_documentOffset
Definition: WPXHeader.h:71
Definition: WPXHeader.h:36
static WPXHeader * constructHeader(WPXInputStream *input, WPXEncryption *encryption)
Definition: WPXHeader.cpp:53
virtual ~WPXHeader()
Definition: WPXHeader.cpp:49
uint8_t m_minorVersion
Definition: WPXHeader.h:75
uint8_t getMinorVersion() const
Definition: WPXHeader.h:61
uint8_t m_majorVersion
Definition: WPXHeader.h:74
uint8_t getMajorVersion() const
Definition: WPXHeader.h:57
uint8_t m_fileType
Definition: WPXHeader.h:73
uint8_t getProductType() const
Definition: WPXHeader.h:49
uint16_t getDocumentEncryption() const
Definition: WPXHeader.h:65
uint32_t getDocumentOffset() const
Definition: WPXHeader.h:45
uint16_t m_documentEncryption
Definition: WPXHeader.h:76
uint8_t m_productType
Definition: WPXHeader.h:72
WPXHeader(WPXInputStream *input, WPXEncryption *encryption, uint32_t documentOffset, uint8_t productType, uint8_t fileType, uint8_t majorVersion, uint8_t minorVersion, uint16_t documentEncryption)
Definition: WPXHeader.cpp:38
uint8_t getFileType() const
Definition: WPXHeader.h:53
Definition: WPXEncryption.h:35
Definition: WPXStream.h:36

Generated for libwpd by doxygen 1.8.5