/[pdpsoft]/trunk/grid-mw-security/ees/src/app/main.c
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/src/app/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 892 - (show annotations) (download) (as text)
Sun Oct 11 16:47:54 2009 UTC (12 years, 3 months ago) by aramv
File MIME type: text/x-chdr
File size: 783 byte(s)
Added config example
1 #include "config.h"
2 #if HAVE_UNISTD_H
3 #include <unistd.h>
4 #endif
5 #include "eef.h"
6 #include "aos.h"
7
8 int main (int argc, char* argv[]){
9 char *config_file = "examples/example_1.pdl";
10
11 eef_log(LOG_INFO, "Loading config file: %s\n", config_file);
12 if(EEF_Init(config_file) == EES_FAILURE){
13 eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);
14 } else {
15 eef_log(LOG_INFO, "Loaded config file: %s\n", config_file);
16 eef_log(LOG_INFO, "Modules dir: %s\n", get_modules_path());
17 setObligation("test", "foobar");
18 if(EEF_Run() == EES_FAILURE){
19 eef_log(LOG_ERR, "Failed to load plugins from config file (%s), exiting...", config_file);
20 } else {
21 eef_log(LOG_INFO, "Finished run, exiting...");
22 }
23 }
24 EEF_Term();
25 return 0;
26 }

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