From d663f702c0e4fa562783504a483dce8f362d628e Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 12 Sep 2017 00:29:28 +0200 Subject: Progression on config parsing. Change-Id: Idd8d8987ccabef381f6d79c1d508930a2d4bae3c Signed-off-by: Romain Forlot --- controller/ctl-lua.h | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'controller/ctl-lua.h') diff --git a/controller/ctl-lua.h b/controller/ctl-lua.h index 6f2ce7d..628db7f 100644 --- a/controller/ctl-lua.h +++ b/controller/ctl-lua.h @@ -21,7 +21,9 @@ #ifndef _LUA_CTL_INCLUDE_ #define _LUA_CTL_INCLUDE_ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif // prefix start debug script #ifndef CONTROL_DOSCRIPT_PRE @@ -38,16 +40,19 @@ #define CONTROL_LUA_PATH CONTROL_CONFIG_PATH #endif +#define AFB_BINDING_VERSION 2 +#include + +#include // standard lua include file -#ifdef CONTROL_SUPPORT_LUA -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" -#endif +#include +#include +#include #include "ctl-timer.h" +#include "ctl-config.h" -PUBLIC int LuaLibInit (); +int LuaLibInit (); typedef int (*Lua2cFunctionT)(char *funcname, json_object *argsJ); typedef int (*Lua2cWrapperT) (lua_State* luaState, char *funcname, Lua2cFunctionT callback); @@ -64,14 +69,14 @@ typedef enum { } LuaDoActionT; -PUBLIC int LuaConfigLoad(); -PUBLIC int LuaConfigExec(); -PUBLIC void LuaL2cNewLib(const char *label, luaL_Reg *l2cFunc, int count); -PUBLIC int Lua2cWrapper(lua_State* luaState, char *funcname, Lua2cFunctionT callback); -PUBLIC int LuaCallFunc (CtlActionT *action, json_object *queryJ) ; -PUBLIC void ctlapi_lua_docall (afb_req request); -PUBLIC void ctlapi_lua_dostring (afb_req request); -PUBLIC void ctlapi_lua_doscript (afb_req request); +int LuaConfigLoad(); +int LuaConfigExec(); +void LuaL2cNewLib(const char *label, luaL_Reg *l2cFunc, int count); +int Lua2cWrapper(lua_State* luaState, char *funcname, Lua2cFunctionT callback); +int LuaCallFunc (CtlActionT *action, json_object *queryJ) ; +void ctlapi_lua_docall (afb_req request); +void ctlapi_lua_dostring (afb_req request); +void ctlapi_lua_doscript (afb_req request); -#endif \ No newline at end of file +#endif -- cgit 1.2.3-korg