diff options
Diffstat (limited to 'controller/ctl-config.h')
-rw-r--r-- | controller/ctl-config.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/controller/ctl-config.h b/controller/ctl-config.h index 2e3a16a..3b39f53 100644 --- a/controller/ctl-config.h +++ b/controller/ctl-config.h @@ -21,7 +21,14 @@ #ifndef _CTL_CONFIG_INCLUDE_ #define _CTL_CONFIG_INCLUDE_ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + #define AFB_BINDING_VERSION 2 #include <afb/afb-binding.h> #include <json-c/json.h> @@ -72,7 +79,7 @@ typedef struct ConfigSectionS { const char *label; const char *info; int (*loadCB)(struct ConfigSectionS *section, json_object *sectionJ); - void *handle; + void *handle; } CtlSectionT; typedef struct { @@ -84,30 +91,28 @@ typedef struct { CtlSectionT *sections; } CtlConfigT; - #ifdef CONTROL_SUPPORT_LUA #include "ctl-lua.h" -#else - typedef void* Lua2cWrapperT; #endif - // ctl-action.c -PUBLIC CtlActionT *ActionLoad(json_object *actionsJ); -PUBLIC int ActionExecOne(CtlActionT* action, json_object *queryJ); -PUBLIC int ActionLoadOne(CtlActionT *action, json_object *actionJ); +CtlActionT *ActionLoad(json_object *actionsJ); +int ActionExecOne(CtlActionT* action, json_object *queryJ); +int ActionLoadOne(CtlActionT *action, json_object *actionJ); // ctl-config.c -PUBLIC CtlConfigT *CtlConfigLoad(const char* filepath, CtlSectionT *sections); -PUBLIC int CtlConfigExec(CtlConfigT *ctlConfig); +CtlConfigT *CtlConfigLoad(const char* filepath, CtlSectionT *sections); +int CtlConfigExec(CtlConfigT *ctlConfig); // ctl-onload.c -PUBLIC int OnloadConfig(CtlSectionT *section, json_object *actionsJ); - +int OnloadConfig(CtlSectionT *section, json_object *actionsJ); // ctl-plugin.c -PUBLIC int PluginConfig(CtlSectionT *section, json_object *pluginsJ); -PUBLIC int PluginGetCB (CtlActionT *action , json_object *callbackJ); +int PluginConfig(CtlSectionT *section, json_object *pluginsJ); +int PluginGetCB (CtlActionT *action , json_object *callbackJ); +#ifdef __cplusplus +} +#endif -#endif /* _CTL_CONFIG_INCLUDE_ */
\ No newline at end of file +#endif /* _CTL_CONFIG_INCLUDE_ */ |