plugin_library.h

Go to the documentation of this file.
00001 /*
00002  * File Name: plugin_library.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_LIBRARY_H_
00028 #define PLUGIN_LIBRARY_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 Library interface.
00039  * Through IPluginLibrary, caller is able to:
00040  * - Check the library whether can it open the specified document or not.
00041  * - Create a new document object if the plug-in uses the low level interfaces.
00042  *    and retrieve the IPlugUnknown pointer of the library object.
00043  * - Create a new reader object if the plug-in uses the high level interfaces.
00044  */
00045 typedef struct 
00046 {
00047 
00048     /**
00049      * @brief Check this plugin library whether can it open specified document
00050      * or not.
00051      * @param thiz The IPluginUnknown pointer of plugin library.
00052      * @param path The document path.
00053      * @return Returns PLUGIN_TRUE if the specified document can be imported 
00054      * successfully, otherwise returns PLUGIN_FALSE.
00055      */
00056     PluginBool (* is_supported_document)( IPluginUnknown    *thiz, 
00057                                           const UDSString   *path );
00058 
00059     /**
00060      * @brief Create an empty document object it the plug-in uses the low level interfaces. 
00061      * It can import concrete document in succeed.
00062      * @param thiz The IPluginUnknown pointer of library object.
00063      * @return Returns IPluginUnknown pointer of document object creating 
00064      * successes, otherwise returns NULL.
00065      */
00066     IPluginUnknown * (* create_document)( IPluginUnknown * thiz );
00067 
00068 } IPluginLibrary;
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif 
00073 
00074 #endif
00075 
Generated by  doxygen 1.6.2-20100208