plugin_doc_marker.h

Go to the documentation of this file.
00001 /*
00002  * File Name: plugin_doc_marker.h
00003  */
00004 
00005 /*
00006  * This file is part of uds-plugin-common.
00007  *
00008  * uds-plugin-common is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * uds-plugin-common is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 /**
00023  * Copyright (C) 2008 iRex Technologies B.V.
00024  * All rights reserved.
00025  */
00026 
00027 #ifndef PLUGIN_DOC_MARKER_H_
00028 #define PLUGIN_DOC_MARKER_H_
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #include "plugin_type.h"
00035 #include "plugin_unknown.h"
00036 
00037 /**
00038  * @brief Universal Document Shell Plugin Marker Types declaration.
00039  */
00040 typedef enum
00041 {
00042     MARKER_UDS_PRIVATE = 0,     /**< The private marker defined by UDS. */
00043     MARKER_TOC,                 /**< The marker of Table-Of-Content. */
00044     MARKER_BUILTIN_BOOKMARK     /**< The built-in bookmark. */
00045 } PluginMarkerType;
00046 
00047 /**
00048  * @brief Universal Document Shell Plugin Marker Entry declaration. 
00049  */
00050 typedef struct _MarkerEntry
00051 {
00052     PluginMarkerType    type;               /**< The marker type. */
00053     UDSString           *anchor;            /**< The target anchor. */
00054     UDSString           *text;              /**< The display text. */
00055     struct _MarkerEntry *sibling;           /**< The next sibling entry. */
00056     struct _MarkerEntry *first_child;       /**< The first child entry. */
00057     unsigned int        uds_private_size;   /**< uds_private size in bytes. */
00058     unsigned char       uds_private[1];     /**< uds-private data. */
00059 } MarkerEntry;
00060 
00061 /**
00062  * @brief Universal Document Shell Plugin Marker Interface.
00063  * Through IPluginDocMarker, caller can request marker tree of document to 
00064  * plugin, and get plugin-supported marker types.
00065  */
00066 typedef struct 
00067 {
00068     /**
00069      * @brief Retrieve all supported marker types. 
00070      * @param thiz IPluginUnknown pointer of document object.
00071      * @return Returns IPluginUnknown pointer of collection object that 
00072      * contains all supported marker types if the document object contains
00073      * any markers. Otherwise this function returns NULL.
00074      */
00075     IPluginUnknown* (* get_supported_marker_types)( IPluginUnknown  *thiz );
00076 
00077     /**
00078      * @brief Check the document contains table of content or not.
00079      * @param thiz IPluginUnknown pointer of document object.
00080      * @return Returns PLUGIN_TRUE if the document contains the table of content.
00081      * Otherwise this function returns PLUGIN_FALSE.
00082      */
00083     PluginBool (* has_toc)( IPluginUnknown  *thiz );
00084 
00085     /**
00086      * @brief Request the marker trees. The marker tree won't be returned 
00087      * immediately after calling this function, but returned asynchronously
00088      * by some callback functions of UDS.
00089      * @param thiz IPluginUnknown pointer of document object.
00090      * @param uds_private_size The size of extra data buffer that plugin has to 
00091      * allocate for every marker tree node.
00092      * @return TODO. Add return code here.
00093      */
00094     PluginStatus (* request_marker_trees)( IPluginUnknown       *thiz, 
00095                                            const unsigned int   uds_private_size );
00096 
00097 } IPluginDocMarker;
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif 
00102 
00103 #endif
00104 
Generated by  doxygen 1.6.2-20100208