diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-25 14:37:48 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-25 14:37:58 +0200 |
commit | b79a76136974423445f647db9f04c236938401ce (patch) | |
tree | 6b4364896e9a752e8bbd9bab7d1a47f7ba614e4a /ctl-lib/ctl-config.h | |
parent | c3d7de27a97f4d4ba7de818d2da3775a85973ee7 (diff) |
Split loading JSON controller file.
This make possible to load from a binding either a file
or directly a JSON object.
Change-Id: If3f3edb8aaed066922982250dd162d483a7dc47a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-config.h')
-rw-r--r-- | ctl-lib/ctl-config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ctl-lib/ctl-config.h b/ctl-lib/ctl-config.h index 2fc51cb..c130ece 100644 --- a/ctl-lib/ctl-config.h +++ b/ctl-lib/ctl-config.h @@ -103,9 +103,10 @@ extern char* ConfigSearch(AFB_ApiT apiHandle, json_object *responseJ); extern char* CtlConfigSearch(AFB_ApiT apiHandle, const char *dirList, const char *prefix) ; extern void DispatchRequireApi(AFB_ApiT apiHandle, json_object * requireJ); extern int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) ; -extern CtlConfigT *CtlLoadMetaData(AFB_ApiT apiHandle,const char* filepath) ; +extern CtlConfigT *CtlLoadMetaDataJson(AFB_ApiT apiHandle,json_object *ctlConfigJ, const char *prefix) ; extern CtlConfigT *CtlLoadMetaDataUsingPrefix(AFB_ApiT apiHandle,const char* filepath, const char *prefix) ; extern int CtlLoadSections(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, CtlSectionT *sections); +#define CtlLoadMetaData(api, filepath, prefix) CtlLoadMetaDataUsingPrefix(api, filepath, NULL) // ctl-event.c extern int EventConfig(AFB_ApiT apihandle, CtlSectionT *section, json_object *actionsJ); |