00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libodfgen 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) 2004 William Lachance (wlach@interlog.com) 00011 * 00012 * For minor contributions see the git repository. 00013 * 00014 * Alternatively, the contents of this file may be used under the terms 00015 * of the GNU Lesser General Public License Version 2.1 or later 00016 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are 00017 * applicable instead of those above. 00018 * 00019 * For further information visit http://libwpd.sourceforge.net 00020 */ 00021 00022 /* "This product is not manufactured, approved, or supported by 00023 * Corel Corporation or Corel Corporation Limited." 00024 */ 00025 #ifndef _ODFDOCUMENTHANDLER_HXX_ 00026 #define _ODFDOCUMENTHANDLER_HXX_ 00027 #include <librevenge/librevenge.h> 00028 00029 #include "libodfgen-api.hxx" 00030 00035 enum ODFGENAPI OdfStreamType { ODF_FLAT_XML, ODF_CONTENT_XML, ODF_STYLES_XML, ODF_SETTINGS_XML, ODF_META_XML, ODF_MANIFEST_XML }; 00036 00037 class OdfDocumentHandler; 00038 00045 typedef bool (*OdfEmbeddedObject)(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType); 00046 00056 typedef bool (*OdfEmbeddedImage)(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output); 00057 00065 class ODFGENAPI OdfDocumentHandler 00066 { 00067 public: 00068 virtual ~OdfDocumentHandler() {} 00069 00072 virtual void startDocument() = 0; 00073 00076 virtual void endDocument() = 0; 00077 00083 virtual void startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) = 0; 00084 00090 virtual void endElement(const char *psName) = 0; 00091 00096 virtual void characters(const librevenge::RVNGString &sCharacters) = 0; 00097 }; 00098 #endif 00099 00100 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */