00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* libe-book 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 * Alternatively, the contents of this file may be used under the terms 00010 * of the GNU Lesser General Public License Version 2.1 or later 00011 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are 00012 * applicable instead of those above. 00013 * 00014 * For further information visit http://libebook.sourceforge.net 00015 */ 00016 00017 #ifndef FB2METADATACOLLECTOR_H_INCLUDED 00018 #define FB2METADATACOLLECTOR_H_INCLUDED 00019 00020 #include "FB2Collector.h" 00021 00022 class WPXPropertyList; 00023 00024 namespace libebook 00025 { 00026 00027 class FB2MetadataCollector : public FB2Collector 00028 { 00029 public: 00030 FB2MetadataCollector(WPXPropertyList &metadata); 00031 00032 private: 00033 virtual void defineMetadataEntry(const char *name, const char *value); 00034 virtual void openMetadataEntry(const char *name); 00035 virtual void closeMetadataEntry(); 00036 00037 virtual void defineID(const char *id); 00038 00039 virtual void openPageSpan(); 00040 virtual void closePageSpan(); 00041 00042 virtual void openBlock(); 00043 virtual void closeBlock(); 00044 00045 virtual void openParagraph(const FB2BlockFormat &format); 00046 virtual void closeParagraph(); 00047 00048 virtual void openSpan(const FB2Style &style); 00049 virtual void closeSpan(); 00050 00051 virtual void insertText(const char *text); 00052 00053 virtual void openTable(const FB2BlockFormat &format); 00054 virtual void closeTable(); 00055 00056 virtual void openTableRow(const FB2BlockFormat &format); 00057 virtual void closeTableRow(); 00058 00059 virtual void openTableCell(int rowspan, int colspan); 00060 virtual void closeTableCell(); 00061 virtual void insertCoveredTableCell(); 00062 00063 virtual void insertFootnote(const char *id); 00064 00065 virtual void insertBitmap(const char *id); 00066 virtual void insertBitmapData(const char *contentType, const char *base64Data); 00067 00068 private: 00069 WPXPropertyList &m_metadata; 00070 }; 00071 00072 } 00073 00074 #endif // FB2METADATACOLLECTOR_H_INCLUDED 00075 00076 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */