00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libwps 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) 2002 William Lachance (william.lachance@sympatico.ca) 00011 * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net) 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://libwps.sourceforge.net 00021 */ 00022 00023 #ifndef WPSHEADER_H 00024 #define WPSHEADER_H 00025 00026 #include "libwps_internal.h" 00027 #include <librevenge-stream/librevenge-stream.h> 00028 00029 #include "libwps/libwps.h" 00030 00031 class WPSHeader 00032 { 00033 public: 00034 WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, uint8_t majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT); 00035 virtual ~WPSHeader(); 00036 00037 static WPSHeader *constructHeader(RVNGInputStreamPtr &input); 00038 00039 RVNGInputStreamPtr &getInput() 00040 { 00041 return m_input; 00042 } 00043 00044 RVNGInputStreamPtr &getFileInput() 00045 { 00046 return m_fileInput; 00047 } 00048 00049 libwps::WPSKind getKind() const 00050 { 00051 return m_kind; 00052 } 00053 00054 void setKind(libwps::WPSKind kind) 00055 { 00056 m_kind=kind; 00057 } 00058 00059 uint8_t getMajorVersion() const 00060 { 00061 return m_majorVersion; 00062 } 00063 00064 void setMajorVersion(uint8_t version) 00065 { 00066 m_majorVersion=version; 00067 } 00068 00069 private: 00070 WPSHeader(const WPSHeader &); 00071 WPSHeader &operator=(const WPSHeader &); 00072 RVNGInputStreamPtr m_input; 00073 RVNGInputStreamPtr m_fileInput; 00074 uint8_t m_majorVersion; 00075 libwps::WPSKind m_kind; 00076 }; 00077 00078 #endif /* WPSHEADER_H */ 00079 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */