summaryrefslogtreecommitdiffstats
path: root/controller/ctl-plugin.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-17 19:20:40 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit12097251ec058b1fa9d9202998c829b27ee5554f (patch)
tree415d2592913bfa0b980232ffbee09d6cfb48fd02 /controller/ctl-plugin.h
parent5bbc6cb56995d23cb8a4eb584ef0161be092da1f (diff)
Get CPP controller plugin works
Context passing variables not working well Change-Id: Ibc67bef353e5cc2e53ef9e5579d106baab92a604 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-plugin.h')
-rw-r--r--controller/ctl-plugin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/controller/ctl-plugin.h b/controller/ctl-plugin.h
index 7c1d0f1..1c772c7 100644
--- a/controller/ctl-plugin.h
+++ b/controller/ctl-plugin.h
@@ -49,7 +49,7 @@ typedef struct {
typedef struct {
long magic;
- char *label;
+ const char *label;
void *handle;
} CtlPluginMagicT;
@@ -66,7 +66,7 @@ typedef void*(*DispatchPluginInstallCbT)(CtlPluginT *plugin, void* handle);
#define MACRO_STR_VALUE(arg) #arg
-#define CTLP_REGISTER(pluglabel) CtlPluginMagicT CtlPluginMagic={.magic=CTL_PLUGIN_MAGIC,.label=pluglabel}; struct afb_binding_data_v2;
+#define CTLP_REGISTER(pluglabel) CtlPluginMagicT CtlPluginMagic={.magic=CTL_PLUGIN_MAGIC,.label=pluglabel,.handle=NULL}; struct afb_binding_data_v2;
#define CTLP_ONLOAD(plugin, handle) void* CtlPluginOnload(CtlPluginT *plugin, void* handle)
#define CTLP_CAPI(funcname, source, argsJ, queryJ, context) int funcname(CtlSourceT *source, json_object* argsJ, json_object* queryJ, void* context)