aboutsummaryrefslogtreecommitdiffstats
path: root/controller/ctl-plugin.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-26 12:17:55 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitbbb4351eab7476be9a93f0248860ac0d1574d8a6 (patch)
tree1c5624454be5fc37828341b20de2f2e79fc90013 /controller/ctl-plugin.h
parent1480ff8d68ee4b923596d8178e37eba7b9202a30 (diff)
Make calling lua2c function from lua works
Change-Id: I56d78a3fe567d1f7a6c675f6a56473f96d325c85 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-plugin.h')
-rw-r--r--controller/ctl-plugin.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/controller/ctl-plugin.h b/controller/ctl-plugin.h
index 7934d8d..361fd34 100644
--- a/controller/ctl-plugin.h
+++ b/controller/ctl-plugin.h
@@ -43,6 +43,8 @@ extern "C" {
#define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x
#endif
+typedef struct luaL_Reg luaL_Reg;
+
typedef struct {
char *label;
char *info;
@@ -50,25 +52,26 @@ typedef struct {
void *context;
} CtlSourceT;
-
typedef struct {
long magic;
const char *label;
void *handle;
} CtlPluginMagicT;
-
typedef struct {
const char *label;
const char *info;
const char *version;
void *context;
void *dlHandle;
+#ifdef CONTROL_SUPPORT_LUA
+ luaL_Reg *l2cFunc;
+ int l2cCount;
+#endif
} CtlPluginT;
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,.handle=NULL}; struct afb_binding_data_v2;
#define CTLP_ONLOAD(plugin, handle) void* CtlPluginOnload(CtlPluginT *plugin, void* handle)