00001 /* 00002 * File Name: plugin_doc_hyperlink.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_HYPERLINK_H_ 00028 #define PLUGIN_HYPERLINK_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 Document Hyperlink interafce. 00039 * Through IPluginDocDictionary, UDS may be able to get explaination for 00040 * certain word. 00041 */ 00042 00043 typedef struct 00044 { 00045 /** 00046 * @brief Check whether a range is a hyperlink. 00047 * @param thiz IPluginUnknown pointer of a document object. 00048 * @param range The range of the object. 00049 * @return PLUGIN_TRUE if range contains exactly a hyperlink; 00050 * otherwise return PLUGIN_FALSE. 00051 */ 00052 PluginBool (* is_hyperlink)( IPluginUnknown *thiz, 00053 const PluginRange *range ); 00054 00055 /** 00056 * @brief Get the anchor pointed by the hyperlink. 00057 * @param thiz IPluginUnknown pointer of the document object. 00058 * @param range The object range containing the hyperlink. 00059 * @param anchor The anchor of the target position pointed by the 00060 * hyperlink. 00061 * @return TODO. Add return code here. 00062 */ 00063 PluginStatus (* get_target_from_hyperlink)( IPluginUnknown *thiz, 00064 const PluginRange *range, 00065 UDSString *anchor ); 00066 00067 /** 00068 * @brief Retrieve hyper links inside specified range. 00069 * @param thiz IPluginUnknown pointer of document object. 00070 * @param range The range that caller wants to retrieve hyper links. 00071 * @return This function returns IPluginUnknown pointer of collection object. 00072 * The collection object contains all hyper links' range that inside the page 00073 * specified by the page_anchor. It returns NULL when the specified page does 00074 * not contain any hyper links. 00075 */ 00076 IPluginUnknown * (* get_hyperlinks_in_range) ( IPluginUnknown *thiz, 00077 const PluginRange *range ); 00078 00079 } IPluginDocHyperlink; 00080 00081 #ifdef __cplusplus 00082 } 00083 #endif 00084 00085 #endif 00086