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 FB2COLLECTOR_H_INCLUDED 00018 #define FB2COLLECTOR_H_INCLUDED 00019 00020 namespace libebook 00021 { 00022 00023 struct FB2BlockFormat; 00024 class FB2Style; 00025 00026 class FB2Collector 00027 { 00028 public: 00029 virtual ~FB2Collector() = 0; 00030 00031 virtual void defineMetadataEntry(const char *name, const char *value) = 0; 00032 virtual void openMetadataEntry(const char *name) = 0; 00033 virtual void closeMetadataEntry() = 0; 00034 00035 virtual void defineID(const char *id) = 0; 00036 00037 virtual void openPageSpan() = 0; 00038 virtual void closePageSpan() = 0; 00039 00040 virtual void openBlock() = 0; 00041 virtual void closeBlock() = 0; 00042 00043 virtual void openParagraph(const FB2BlockFormat &format) = 0; 00044 virtual void closeParagraph() = 0; 00045 00046 virtual void openSpan(const FB2Style &style) = 0; 00047 virtual void closeSpan() = 0; 00048 00049 virtual void insertText(const char *text) = 0; 00050 00051 virtual void openTable(const FB2BlockFormat &format) = 0; 00052 virtual void closeTable() = 0; 00053 00054 virtual void openTableRow(const FB2BlockFormat &format) = 0; 00055 virtual void closeTableRow() = 0; 00056 00057 virtual void openTableCell(int rowspan, int colspan) = 0; 00058 virtual void closeTableCell() = 0; 00059 virtual void insertCoveredTableCell() = 0; 00060 00061 virtual void insertFootnote(const char *id) = 0; 00062 00063 virtual void insertBitmap(const char *id) = 0; 00064 virtual void insertBitmapData(const char *contentType, const char *base64Data) = 0; 00065 }; 00066 00067 } 00068 00069 #endif // FB2COLLECTOR_H_INCLUDED 00070 00071 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */