summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib/ctl-config.h')
-rw-r--r--ctl-lib/ctl-config.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/ctl-lib/ctl-config.h b/ctl-lib/ctl-config.h
index d36b5f5..8a7f2a3 100644
--- a/ctl-lib/ctl-config.h
+++ b/ctl-lib/ctl-config.h
@@ -33,6 +33,10 @@ extern "C" {
#include <filescan-utils.h>
#include <wrap-json.h>
+#ifdef CONTROL_SUPPORT_LUA
+ #include "ctl-lua.h"
+#endif
+
#ifndef CONTROL_MAXPATH_LEN
#define CONTROL_MAXPATH_LEN 255
#endif
@@ -43,6 +47,7 @@ extern "C" {
#ifndef CTL_PLUGIN_EXT
#define CTL_PLUGIN_EXT ".ctlso"
+ #define CTL_SCRIPT_EXT ".lua"
#endif
#define LUA_ACTION_PREFIX "lua://"
@@ -68,16 +73,6 @@ typedef struct {
CtlSectionT *sections;
} CtlConfigT;
-
-#ifdef CONTROL_SUPPORT_LUA
- #include "ctl-lua.h"
-
- typedef struct CtlLua2cFuncT {
- luaL_Reg *l2cFunc;
- int l2cCount;
-} CtlLua2cFuncT;
-#endif
-
// This should not be global as application may want to define their own sections
typedef enum {
CTL_SECTION_PLUGIN,
@@ -89,7 +84,6 @@ typedef enum {
CTL_SECTION_ENDTAG,
} SectionEnumT;
-
// ctl-action.c
PUBLIC CtlActionT *ActionConfig(AFB_ApiT apiHandle, json_object *actionsJ, int exportApi);
PUBLIC void ActionExecUID(AFB_ReqT request, CtlConfigT *ctlConfig, const char *uid, json_object *queryJ);
@@ -97,7 +91,6 @@ PUBLIC void ActionExecOne( CtlSourceT *source, CtlActionT* action, json_object *
PUBLIC int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *, int exportApi);
PUBLIC int ActionLabelToIndex(CtlActionT* actions, const char* actionLabel);
-
// ctl-config.c
PUBLIC int CtlConfigMagicNew();
PUBLIC json_object* CtlConfigScan(const char *dirList, const char *prefix) ;