aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-12-17 16:03:20 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-17 16:05:04 +0100
commit444e62f0c4ecae594da71dbdd51305148c433fb5 (patch)
tree7ccd0acb383141af39bef6badf608510470bf147 /ctl-lib/ctl-config.h
parent30d2f58557ca954f1500b1d6a06ea966786f3a28 (diff)
Update since the conversion to library
Use the latest submodule git master branch revision. Some modifications has been lost since like the getter/setter functions and the plugin loading process. Change-Id: Ic0079f73bac46fba71f3de523a0f28371f85c1e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-config.h')
-rw-r--r--ctl-lib/ctl-config.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/ctl-lib/ctl-config.h b/ctl-lib/ctl-config.h
index 285de7d..dc98bb2 100644
--- a/ctl-lib/ctl-config.h
+++ b/ctl-lib/ctl-config.h
@@ -18,6 +18,7 @@
* Json load using json_unpack https://jansson.readthedocs.io/en/2.9/apiref.html#parsing-and-validating-values
*/
+
#ifndef _CTL_CONFIG_INCLUDE_
#define _CTL_CONFIG_INCLUDE_
@@ -75,7 +76,7 @@ typedef struct {
json_object *configJ;
json_object *requireJ;
CtlSectionT *sections;
- CtlPluginT **ctlPlugins;
+ CtlPluginT *ctlPlugins;
void *external;
} CtlConfigT;
@@ -100,6 +101,8 @@ extern int ActionLabelToIndex(CtlActionT* actions, const char* actionLabel);
// ctl-config.c
extern int CtlConfigMagicNew();
+extern void* getExternalData(CtlConfigT *ctlConfig);
+extern void setExternalData(CtlConfigT *ctlConfig, void *data);
extern json_object* CtlConfigScan(const char *dirList, const char *prefix) ;
extern char* ConfigSearch(afb_api_t apiHandle, json_object *responseJ);
extern char* CtlConfigSearch(afb_api_t apiHandle, const char *dirList, const char *prefix) ;
@@ -124,6 +127,8 @@ extern int OnloadConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *
// ctl-plugin.c
extern int PluginConfig(afb_api_t UNUSED_ARG(apiHandle), CtlSectionT *section, json_object *pluginsJ);
extern int PluginGetCB (afb_api_t apiHandle, CtlActionT *action , json_object *callbackJ);
+extern void* getPluginContext(CtlPluginT *plugin);
+extern void setPluginContext(CtlPluginT *plugin, void *context);
#ifdef __cplusplus
}
#endif