00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libwps 00003 * Copyright (C) 2002 William Lachance (william.lachance@sympatico.ca) 00004 * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00019 * 00020 * For further information visit http://libwps.sourceforge.net 00021 */ 00022 00023 /* 00024 * This file is in sync with CVS 00025 * /libwpd2/src/lib/WPXHeader.cpp 1.17 00026 */ 00027 00028 #ifndef WPSHEADER_H 00029 #define WPSHEADER_H 00030 00031 #include "libwps_internal.h" 00032 #include <libwpd-stream/libwpd-stream.h> 00033 00034 namespace libwps 00035 { 00036 class Storage; 00037 } 00038 00039 class WPSHeader 00040 { 00041 public: 00042 WPSHeader(WPXInputStreamPtr &input, shared_ptr<libwps::Storage> &ole, 00043 uint8_t majorVersion); 00044 virtual ~WPSHeader(); 00045 00046 static WPSHeader *constructHeader(WPXInputStreamPtr &input); 00047 00048 WPXInputStreamPtr &getInput() 00049 { 00050 return m_input; 00051 } 00052 00053 shared_ptr<libwps::Storage> &getOLEStorage() 00054 { 00055 return m_oleStorage; 00056 } 00057 00058 uint8_t getMajorVersion() const 00059 { 00060 return m_majorVersion; 00061 } 00062 00063 private: 00064 WPSHeader(const WPSHeader &); 00065 WPSHeader &operator=(const WPSHeader &); 00066 WPXInputStreamPtr m_input; 00067 shared_ptr<libwps::Storage> m_oleStorage; 00068 uint8_t m_majorVersion; 00069 }; 00070 00071 typedef shared_ptr<WPSHeader> WPSHeaderPtr; 00072 00073 #endif /* WPSHEADER_H */ 00074 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */