plugin.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id$
00005     begin       : Fri Sep 12 2003
00006     copyright   : (C) 2003 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029 #ifndef GWENHYWFAR_PLUGIN_H
00030 #define GWENHYWFAR_PLUGIN_H
00031 
00032 #include <gwenhywfar/inherit.h>
00033 #include <gwenhywfar/misc.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 typedef struct GWEN_PLUGIN GWEN_PLUGIN;
00040 typedef struct GWEN_PLUGIN_MANAGER GWEN_PLUGIN_MANAGER;
00041 
00042 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN, GWENHYWFAR_API)
00043 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN_MANAGER, GWENHYWFAR_API)
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 #include <gwenhywfar/error.h>
00050 #include <gwenhywfar/libloader.h>
00051 #include <gwenhywfar/plugindescr.h>
00052 #include <gwenhywfar/stringlist.h>
00053 #include <gwenhywfar/pathmanager.h>
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00059 
00060 
00061 
00062 typedef GWEN_PLUGIN* (*GWEN_PLUGIN_FACTORYFN)(GWEN_PLUGIN_MANAGER *pm,
00063                                               const char *name,
00064                                               const char *fileName);
00065 
00066 
00067 GWENHYWFAR_API
00068 GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm,
00069                              const char *name,
00070                              const char *fileName);
00071 
00072 GWENHYWFAR_API
00073 void GWEN_Plugin_free(GWEN_PLUGIN *p);
00074 
00075 GWENHYWFAR_API
00076 GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p);
00077 
00078 GWENHYWFAR_API
00079 const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p);
00080 
00081 GWENHYWFAR_API
00082 const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p);
00083 
00084 GWENHYWFAR_API
00085 GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p);
00086 
00087 
00088 
00089 
00090 
00091 
00096 GWENHYWFAR_API
00097 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name,
00098                                             const char *destLib);
00099 
00100 GWENHYWFAR_API
00101 void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm);
00102 
00103 
00104 GWENHYWFAR_API
00105 const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm);
00106 
00112 GWENHYWFAR_API
00113 int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm,
00114                                const char *callingLib,
00115                                const char *path);
00116 
00117 GWENHYWFAR_API
00118 int GWEN_PluginManager_AddRelPath(GWEN_PLUGIN_MANAGER *pm,
00119                                   const char *callingLib,
00120                                   const char *relpath,
00121                                   GWEN_PATHMANAGER_RELMODE rm);
00122 
00128 GWENHYWFAR_API
00129 int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm,
00130                                   const char *callingLib,
00131                                   const char *path);
00132 
00133 GWENHYWFAR_API
00134 int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm,
00135                                   const char *callingLib,
00136                                   const char *path);
00137 
00161 GWENHYWFAR_API
00162 int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm,
00163                                          const char *callingLib,
00164                                          const char *keypath,
00165                                          const char *varname);
00166 
00169 GWENHYWFAR_API 
00170 GWEN_STRINGLIST *GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm);
00171 
00172 GWENHYWFAR_API
00173 GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
00174                                            const char *modName);
00175 
00176 GWENHYWFAR_API
00177 GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm,
00178                                                const char *modName,
00179                                                const char *fname);
00180 
00181 
00182 GWENHYWFAR_API
00183 GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm,
00184                                           const char *s);
00185 
00191 GWENHYWFAR_API
00192 void GWEN_PluginManager_AddPlugin(GWEN_PLUGIN_MANAGER *pm, GWEN_PLUGIN *p);
00193 
00194 
00195 GWENHYWFAR_API
00196 int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm);
00197 
00198 GWENHYWFAR_API
00199 int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm);
00200 
00201 GWENHYWFAR_API
00202 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s);
00203 
00204 
00205 GWENHYWFAR_API
00206 GWEN_PLUGIN_DESCRIPTION_LIST2*
00207 GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm);
00208 
00209 
00210 GWENHYWFAR_API
00211 GWEN_PLUGIN_DESCRIPTION*
00212 GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm,
00213                                   const char *modName);
00214 
00215 
00216 #ifdef __cplusplus
00217 }
00218 #endif
00219 
00220 #endif
00221 
00222 

Generated on Wed Sep 3 15:21:59 2008 for gwenhywfar by  doxygen 1.5.6