# plugin.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  $RCSfile: plugin.h,v $
    00003                              -------------------
    00004     cvs         : $Id: plugin.h,v 1.5 2005/04/04 12:33:14 cstim Exp $
    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
    00033 #include <gwenhywfar/inherit.h>
    00034 #include <gwenhywfar/libloader.h>
    00035 #include <gwenhywfar/plugindescr.h>
    00036
    00037 #ifdef __cplusplus
    00038 extern "C" {
    00039 #endif
    00040
    00041
    00042 typedef struct GWEN_PLUGIN GWEN_PLUGIN;
    00043 typedef struct GWEN_PLUGIN_MANAGER GWEN_PLUGIN_MANAGER;
    00044
    00045
    00046 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN, GWENHYWFAR_API)
    00047 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN_MANAGER, GWENHYWFAR_API)
    00048
    00049
    00050 typedef GWEN_PLUGIN* (*GWEN_PLUGIN_FACTORYFN)(GWEN_PLUGIN_MANAGER *pm,
    00051                                               const char *name,
    00052                                               const char *fileName);
    00053
    00054
    00055 GWENHYWFAR_API
    00056 GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm,
    00057                              const char *name,
    00058                              const char *fileName);
    00059
    00060 GWENHYWFAR_API
    00061 void GWEN_Plugin_free(GWEN_PLUGIN *p);
    00062
    00063 GWENHYWFAR_API
    00064 GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p);
    00065
    00066 GWENHYWFAR_API
    00067 const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p);
    00068
    00069 GWENHYWFAR_API
    00070 const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p);
    00071
    00072 GWENHYWFAR_API
    00073 GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p);
    00074
    00075
    00076
    00077
    00078
    00079
    00080
    00081 GWENHYWFAR_API
    00082 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name);
    00083
    00084 GWENHYWFAR_API
    00085 void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm);
    00086
    00087
    00088 GWENHYWFAR_API
    00089 const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm);
    00090
    00092 GWENHYWFAR_API
    00093 int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm,
    00094                                const char *s);
    00112 GWENHYWFAR_API
    00113 int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm,
    00114                                          const char *keypath,
    00115                                          const char *varname);
    00116
    00119 GWENHYWFAR_API
    00120 const GWEN_STRINGLIST *
    00121 GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm);
    00122
    00123 GWENHYWFAR_API
    00124 GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
    00125                                            const char *modName);
    00126
    00127 GWENHYWFAR_API
    00128 GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm,
    00129                                                const char *modName,
    00130                                                const char *fname);
    00131
    00132
    00133 GWENHYWFAR_API
    00134 GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm,
    00135                                           const char *s);
    00136
    00137 GWENHYWFAR_API
    00138 int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm);
    00139
    00140 GWENHYWFAR_API
    00141 int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm);
    00142
    00143 GWENHYWFAR_API
    00144 GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s);
    00145
    00146
    00147 GWENHYWFAR_API
    00148 GWEN_PLUGIN_DESCRIPTION_LIST2*
    00149 GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm);
    00150
    00151
    00152 #ifdef __cplusplus
    00153 }
    00154 #endif
    00155
    00156 #endif
    00157
    00158