aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-config.h9
-rw-r--r--ctl-lib/ctl-lua.h7
-rw-r--r--ctl-lib/ctl-plugin.h7
-rw-r--r--ctl-lib/ctl-timer.h8
4 files changed, 29 insertions, 2 deletions
diff --git a/ctl-lib/ctl-config.h b/ctl-lib/ctl-config.h
index a7b07b5..d6967bc 100644
--- a/ctl-lib/ctl-config.h
+++ b/ctl-lib/ctl-config.h
@@ -21,6 +21,10 @@
#ifndef _CTL_CONFIG_INCLUDE_
#define _CTL_CONFIG_INCLUDE_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@@ -93,8 +97,6 @@ PUBLIC int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) ;
PUBLIC CtlConfigT *CtlLoadMetaData(AFB_ApiT apiHandle,const char* filepath) ;
PUBLIC int CtlLoadSections(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, CtlSectionT *sections);
-
-
// ctl-event.c
PUBLIC int EventConfig(AFB_ApiT apihandle, CtlSectionT *section, json_object *actionsJ);
#ifdef AFB_BINDING_PREV3
@@ -113,5 +115,8 @@ PUBLIC int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *a
PUBLIC int PluginConfig(AFB_ApiT UNUSED_ARG(apiHandle), CtlSectionT *section, json_object *pluginsJ);
PUBLIC int PluginGetCB (AFB_ApiT apiHandle, CtlActionT *action , json_object *callbackJ);
+#ifdef __cplusplus
+}
+#endif
#endif /* _CTL_CONFIG_INCLUDE_ */
diff --git a/ctl-lib/ctl-lua.h b/ctl-lib/ctl-lua.h
index d0d89bd..3a70b71 100644
--- a/ctl-lib/ctl-lua.h
+++ b/ctl-lib/ctl-lua.h
@@ -21,6 +21,10 @@
#ifndef _LUA_CTL_INCLUDE_
#define _LUA_CTL_INCLUDE_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@@ -68,5 +72,8 @@ PUBLIC void ctlapi_lua_docall (afb_req request);
PUBLIC void ctlapi_lua_dostring (afb_req request);
PUBLIC void ctlapi_lua_doscript (afb_req request);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/ctl-lib/ctl-plugin.h b/ctl-lib/ctl-plugin.h
index 2adfbef..f4a0e7b 100644
--- a/ctl-lib/ctl-plugin.h
+++ b/ctl-lib/ctl-plugin.h
@@ -20,6 +20,9 @@
#ifndef _CTL_PLUGIN_INCLUDE_
#define _CTL_PLUGIN_INCLUDE_
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -240,4 +243,8 @@ typedef int (*Lua2cWrapperT) (void*luaHandle, char *funcname, Lua2cFunctionT cal
int lua2c_ ## funcname (void* luaState){return((*Lua2cWrap)(luaState, MACRO_STR_VALUE(funcname), funcname));};\
static int funcname (CtlSourceT* source, json_object* argsJ, json_object** responseJ)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CTL_PLUGIN_INCLUDE_ */
diff --git a/ctl-lib/ctl-timer.h b/ctl-lib/ctl-timer.h
index 333f172..4b06bdf 100644
--- a/ctl-lib/ctl-timer.h
+++ b/ctl-lib/ctl-timer.h
@@ -19,6 +19,10 @@
#ifndef CTL_TIMER_INCLUDE
#define CTL_TIMER_INCLUDE
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <systemd/sd-event.h>
// ctl-timer.c
@@ -42,4 +46,8 @@ PUBLIC int TimerEvtInit (AFB_ApiT apiHandle);
PUBLIC void TimerEvtStart(AFB_ApiT apiHandle, TimerHandleT *timerHandle, timerCallbackT callback, void *context);
PUBLIC void TimerEvtStop(TimerHandleT *timerHandle);
+#ifdef __cplusplus
+}
+#endif
+
#endif // CTL_TIMER_INCLUDE