plugin.h
Go to the documentation of this file.
/***************************************************************************
begin : Fri Sep 12 2003
copyright : (C) 2022 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWENHYWFAR_PLUGIN_H
#define GWENHYWFAR_PLUGIN_H
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/misc.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GWEN_PLUGIN GWEN_PLUGIN;
typedef struct GWEN_PLUGIN_MANAGER GWEN_PLUGIN_MANAGER;
GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN, GWENHYWFAR_API)
GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_PLUGIN_MANAGER, GWENHYWFAR_API)
#ifdef __cplusplus
}
#endif
#include <gwenhywfar/error.h>
#include <gwenhywfar/libloader.h>
#include <gwenhywfar/plugindescr.h>
#include <gwenhywfar/stringlist.h>
#include <gwenhywfar/pathmanager.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef GWEN_PLUGIN *(*GWEN_PLUGIN_FACTORYFN)(GWEN_PLUGIN_MANAGER *pm,
const char *name,
const char *fileName);
GWENHYWFAR_API
GWEN_PLUGIN *GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm,
const char *name,
const char *fileName);
GWENHYWFAR_API
void GWEN_Plugin_free(GWEN_PLUGIN *p);
GWENHYWFAR_API
GWEN_PLUGIN_MANAGER *GWEN_Plugin_GetManager(const GWEN_PLUGIN *p);
GWENHYWFAR_API
const char *GWEN_Plugin_GetName(const GWEN_PLUGIN *p);
GWENHYWFAR_API
const char *GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p);
GWENHYWFAR_API
GWEN_LIBLOADER *GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p);
GWENHYWFAR_API
const GWEN_PLUGIN_DESCRIPTION *GWEN_Plugin_GetPluginDescription(const GWEN_PLUGIN *p);
GWENHYWFAR_API
void GWEN_Plugin_SetPluginDescription(GWEN_PLUGIN *p, GWEN_PLUGIN_DESCRIPTION *pd);
GWENHYWFAR_API
GWEN_PLUGIN_MANAGER *GWEN_PluginManager_new(const char *name,
const char *destLib);
GWENHYWFAR_API
void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
const char *GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *path);
GWENHYWFAR_API
int GWEN_PluginManager_AddRelPath(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *relpath,
GWEN_PATHMANAGER_RELMODE rm);
GWENHYWFAR_API
int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *path);
GWENHYWFAR_API
int GWEN_PluginManager_InsertRelPath(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *relpath,
GWEN_PATHMANAGER_RELMODE rm);
GWENHYWFAR_API
int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *path);
GWENHYWFAR_API
int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm,
const char *callingLib,
const char *keypath,
const char *varname);
GWENHYWFAR_API
GWEN_STRINGLIST *GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
const char *modName);
GWENHYWFAR_API
GWEN_PLUGIN *GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm,
const char *modName,
const char *fname);
GWENHYWFAR_API
GWEN_PLUGIN *GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm,
const char *s);
GWENHYWFAR_API
void GWEN_PluginManager_AddPlugin(GWEN_PLUGIN_MANAGER *pm, GWEN_PLUGIN *p);
GWENHYWFAR_API
int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
GWEN_PLUGIN_MANAGER *GWEN_PluginManager_FindPluginManager(const char *s);
GWENHYWFAR_API
GWEN_PLUGIN_DESCRIPTION_LIST2 *
GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm);
GWENHYWFAR_API
GWEN_PLUGIN_DESCRIPTION *
GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm,
const char *modName);
#ifdef __cplusplus
}
#endif
#endif
error.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
inherit.h
GWEN_INHERIT_FUNCTION_LIB_DEFS
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
Definition inherit.h:125
libloader.h
GWEN_LIBLOADER
struct GWEN_LIBLOADER GWEN_LIBLOADER
Definition libloader.h:60
GWEN_PLUGIN_DESCRIPTION_LIST2
struct GWEN_PLUGIN_DESCRIPTION_LIST2 GWEN_PLUGIN_DESCRIPTION_LIST2
Definition listdoc.h:6538
misc.h
pathmanager.h
GWEN_PATHMANAGER_RELMODE
GWEN_PATHMANAGER_RELMODE
Definition pathmanager.h:38
GWEN_PluginManager_AddPathFromWinReg
GWENHYWFAR_API int GWEN_PluginManager_AddPathFromWinReg(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *keypath, const char *varname)
GWEN_Plugin_free
GWENHYWFAR_API void GWEN_Plugin_free(GWEN_PLUGIN *p)
GWEN_PluginManager_Unregister
GWENHYWFAR_API int GWEN_PluginManager_Unregister(GWEN_PLUGIN_MANAGER *pm)
GWEN_PluginManager_GetPluginDescrs
GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 * GWEN_PluginManager_GetPluginDescrs(GWEN_PLUGIN_MANAGER *pm)
GWEN_PLUGIN_MANAGER
struct GWEN_PLUGIN_MANAGER GWEN_PLUGIN_MANAGER
Definition plugin.h:37
GWEN_Plugin_SetPluginDescription
GWENHYWFAR_API void GWEN_Plugin_SetPluginDescription(GWEN_PLUGIN *p, GWEN_PLUGIN_DESCRIPTION *pd)
GWEN_Plugin_GetFileName
GWENHYWFAR_API const char * GWEN_Plugin_GetFileName(const GWEN_PLUGIN *p)
GWEN_PluginManager_AddRelPath
GWENHYWFAR_API int GWEN_PluginManager_AddRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *relpath, GWEN_PATHMANAGER_RELMODE rm)
GWEN_Plugin_new
GWENHYWFAR_API GWEN_PLUGIN * GWEN_Plugin_new(GWEN_PLUGIN_MANAGER *pm, const char *name, const char *fileName)
GWEN_PluginManager_GetPlugin
GWENHYWFAR_API GWEN_PLUGIN * GWEN_PluginManager_GetPlugin(GWEN_PLUGIN_MANAGER *pm, const char *s)
GWEN_PluginManager_free
GWENHYWFAR_API void GWEN_PluginManager_free(GWEN_PLUGIN_MANAGER *pm)
GWEN_PluginManager_Register
GWENHYWFAR_API int GWEN_PluginManager_Register(GWEN_PLUGIN_MANAGER *pm)
GWEN_Plugin_GetManager
GWENHYWFAR_API GWEN_PLUGIN_MANAGER * GWEN_Plugin_GetManager(const GWEN_PLUGIN *p)
GWEN_PluginManager_InsertRelPath
GWENHYWFAR_API int GWEN_PluginManager_InsertRelPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *relpath, GWEN_PATHMANAGER_RELMODE rm)
GWEN_Plugin_GetLibLoader
GWENHYWFAR_API GWEN_LIBLOADER * GWEN_Plugin_GetLibLoader(const GWEN_PLUGIN *p)
GWEN_Plugin_GetPluginDescription
GWENHYWFAR_API const GWEN_PLUGIN_DESCRIPTION * GWEN_Plugin_GetPluginDescription(const GWEN_PLUGIN *p)
GWEN_PluginManager_AddPath
GWENHYWFAR_API int GWEN_PluginManager_AddPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path)
GWEN_PluginManager_AddPlugin
GWENHYWFAR_API void GWEN_PluginManager_AddPlugin(GWEN_PLUGIN_MANAGER *pm, GWEN_PLUGIN *p)
GWEN_PluginManager_GetName
GWENHYWFAR_API const char * GWEN_PluginManager_GetName(const GWEN_PLUGIN_MANAGER *pm)
GWEN_Plugin_GetName
GWENHYWFAR_API const char * GWEN_Plugin_GetName(const GWEN_PLUGIN *p)
GWEN_PluginManager_FindPluginManager
GWENHYWFAR_API GWEN_PLUGIN_MANAGER * GWEN_PluginManager_FindPluginManager(const char *s)
GWEN_PluginManager_LoadPlugin
GWENHYWFAR_API GWEN_PLUGIN * GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm, const char *modName)
GWEN_PluginManager_new
GWENHYWFAR_API GWEN_PLUGIN_MANAGER * GWEN_PluginManager_new(const char *name, const char *destLib)
GWEN_PluginManager_GetPaths
GWENHYWFAR_API GWEN_STRINGLIST * GWEN_PluginManager_GetPaths(const GWEN_PLUGIN_MANAGER *pm)
GWEN_PluginManager_LoadPluginFile
GWENHYWFAR_API GWEN_PLUGIN * GWEN_PluginManager_LoadPluginFile(GWEN_PLUGIN_MANAGER *pm, const char *modName, const char *fname)
GWEN_PluginManager_RemovePath
GWENHYWFAR_API int GWEN_PluginManager_RemovePath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path)
GWEN_PluginManager_InsertPath
GWENHYWFAR_API int GWEN_PluginManager_InsertPath(GWEN_PLUGIN_MANAGER *pm, const char *callingLib, const char *path)
GWEN_PluginManager_GetPluginDescr
GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION * GWEN_PluginManager_GetPluginDescr(GWEN_PLUGIN_MANAGER *pm, const char *modName)
GWEN_PLUGIN
struct GWEN_PLUGIN GWEN_PLUGIN
Definition plugin.h:36
plugindescr.h
GWEN_PLUGIN_DESCRIPTION
struct GWEN_PLUGIN_DESCRIPTION GWEN_PLUGIN_DESCRIPTION
Definition plugindescr.h:38
stringlist.h
GWEN_STRINGLIST
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56