plugin.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: plugin.h 1261 2007-07-08 08:05:41Z christian $
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 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 
00059 
00060 
00061 typedef GWEN_PLUGIN* (*GWEN_PLUGIN_FACTORYFN)(GWEN_PLUGIN_MANAGER *pm,
00062                                               const char *name,
00063                                               const char *fileName);
00064 
00065 
00066 GWENHYWFAR_API
00067 GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm,
00068                              const char *name,
00069                              const char *fileName);
00070 
00071 GWENHYWFAR_API
00072 void GWEN_Plugin_free(GWEN_PLUGIN *p);
00073 
00074 GWENHYWFAR_API
00075 GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p);
00076 
00077 GWENHYWFAR_API
00078 const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p);
00079 
00080 GWENHYWFAR_API
00081 const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p);
00082 
00083 GWENHYWFAR_API
00084 GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p);
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 GWENHYWFAR_API
00093 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name);
00094 
00095 GWENHYWFAR_API
00096 void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm);
00097 
00098 
00099 GWENHYWFAR_API
00100 const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm);
00101 
00103 GWENHYWFAR_API
00104 int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm,
00105                                const char *s);
00106 GWENHYWFAR_API
00107 int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm,
00108                                   const char *s);
00109 
00110 GWENHYWFAR_API
00111 int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm,
00112                                   const char *s);
00113 
00133 GWENHYWFAR_API
00134 int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm,
00135                                          const char *keypath,
00136                                          const char *varname);
00137 
00140 GWENHYWFAR_API 
00141 const GWEN_STRINGLIST *
00142 GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm);
00143 
00144 GWENHYWFAR_API
00145 GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
00146                                            const char *modName);
00147 
00148 GWENHYWFAR_API
00149 GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm,
00150                                                const char *modName,
00151                                                const char *fname);
00152 
00153 
00154 GWENHYWFAR_API
00155 GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm,
00156                                           const char *s);
00157 
00158 GWENHYWFAR_API
00159 int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm);
00160 
00161 GWENHYWFAR_API
00162 int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm);
00163 
00164 GWENHYWFAR_API
00165 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s);
00166 
00167 
00168 GWENHYWFAR_API
00169 GWEN_PLUGIN_DESCRIPTION_LIST2*
00170 GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm);
00171 
00172 
00173 GWENHYWFAR_API
00174 GWEN_PLUGIN_DESCRIPTION*
00175 GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm,
00176                                   const char *modName);
00177 
00178 
00179 #ifdef __cplusplus
00180 }
00181 #endif
00182 
00183 #endif
00184 
00185 

Generated on Sat Sep 22 04:20:58 2007 for gwenhywfar by  doxygen 1.5.3