/[pdpsoft]/trunk/grid-mw-security/ees/include/common/_plugin_manager.h
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/include/common/_plugin_manager.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1235 - (show annotations) (download) (as text)
Fri Dec 4 11:35:24 2009 UTC (12 years, 9 months ago) by aramv
File MIME type: text/x-csrc
File size: 2367 byte(s)
Moved around control logic of the parser to stop and report errors if they are encountered
1 /*
2
3 \file _plugin_manager.h
4 \brief Private functions of the PluginManager
5 \author Aram Verstegen
6
7 This header contains the declarations of the private Plugin Manager functions:
8 -# PluginInit(argc, argv): Initialize plugin and add it to the list.
9 -# get_procsymbol(handle, symbol): Retrieve dlsym symbol from specified dl-handle.
10 -# print_eef_plugin(log_level, plugin): Print plugin fields to log with specified log_level.
11 -# clean_plugin_list(plugin_list): Clean the linkedlist and close all the dl handles.
12 -# get_plugin(plugin_name): Retrieve a plugin from the list by name.
13
14 */
15 #ifndef _PLUGINMANAGER_H
16 #define _PLUGINMANAGER_H
17
18 #if HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 #if HAVE_ERRNO_H
22 #include <errno.h>
23 #endif
24 #if HAVE_SYS_DIR_H
25 #include <sys/dir.h>
26 #endif
27 #if HAVE_FNMATCH_H
28 #include <fnmatch.h>
29 #endif
30 #if HAVE_SYSLOG_H
31 #include <syslog.h>
32 #endif
33 #if HAVE_STDLIB_H
34 #include <stdlib.h>
35 #endif
36 #if HAVE_STDIO_H
37 #include <stdio.h>
38 #endif
39 #if HAVE_STRING_H
40 #include <string.h>
41 #endif
42 #ifdef HAVE_DLFCN_H
43 #include <dlfcn.h>
44 #endif
45 #ifdef HAVE_MALLOC_H
46 #include <malloc.h>
47 #endif
48
49 #include "plugin_manager.h"
50 #include "eef.h"
51
52 int errsv;
53 static char abs_plugin_path[FILENAME_MAX];
54 const char* local_module_dir;
55 typedef EES_PL_RC (*init_fnc_ptr_t)(int, char**); /*!< init function pointer */
56 typedef EES_PL_RC (*run_fnc_ptr_t)(void); /*!< run function pointer */
57 typedef EES_PL_RC (*term_fnc_ptr_t)(void); /*!< run function pointer */
58
59 static init_fnc_ptr_t init_fnc_ptr;
60 static run_fnc_ptr_t run_fnc_ptr;
61 static term_fnc_ptr_t term_fnc_ptr;
62
63 static eef_plugindl_t * plugin_list;
64 static eef_plugindl_t * _running_plugin;
65
66
67 eef_proc_t get_procsymbol(void*, char*);
68 eef_plugindl_t * create_plugin_struct(int, char**);
69
70 EES_RC initialize_plugin(eef_plugindl_t*);
71 EES_PL_RC run_plugin_by_name(char*);
72 EES_PL_RC run_plugin(eef_plugindl_t*);
73 EES_PL_RC term_plugin(char*);
74
75 EES_RC print_eef_plugin(int, eef_plugindl_t*);
76 EES_RC clean_plugin_list(eef_plugindl_t*);
77
78
79 #endif
80

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28