From 6fed20d35d556afa95537a2be0b0efc8a2dd24c7 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Sun, 6 May 2018 14:24:42 +0200 Subject: Upgrade config schema Change the way to load LUA scripts. They are now considerate as Plugin and loads with them. This imply rework of how to search and find plugins as well as the way to load LUA. Also load an harcoded LUA scripts providing LUA helpers and managing global variables lock unlock mechanism Change-Id: I64e38aa27278d0cfdca787155db2d0c89953f905 Signed-off-by: Romain Forlot --- ctl-lib/ctl-lua.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ctl-lib/ctl-lua.h') diff --git a/ctl-lib/ctl-lua.h b/ctl-lib/ctl-lua.h index b3aea54..cf28dcb 100644 --- a/ctl-lib/ctl-lua.h +++ b/ctl-lib/ctl-lua.h @@ -39,11 +39,6 @@ extern "C" { #define CONTROL_LUA_EVENT "luaevt" #endif -// default use same search path for config.json and script.lua -#ifndef CONTROL_LUA_PATH -#define CONTROL_LUA_PATH CONTROL_CONFIG_PATH -#endif - // standard lua include file #ifdef CONTROL_SUPPORT_LUA #include "lua.h" @@ -62,7 +57,8 @@ typedef enum { LUA_DOSCRIPT, } LuaDoActionT; - +extern const char *lua_utils; +PUBLIC int luaLoadScript(const char *luaScriptPath); PUBLIC int LuaConfigLoad (AFB_ApiT apiHandle); PUBLIC int LuaConfigExec(AFB_ApiT apiHandle, const char * prefix); PUBLIC void LuaL2cNewLib(luaL_Reg *l2cFunc, int count); -- cgit 1.2.3-korg