aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config_v2.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib/ctl-config_v2.h')
-rw-r--r--ctl-lib/ctl-config_v2.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/ctl-lib/ctl-config_v2.h b/ctl-lib/ctl-config_v2.h
new file mode 100644
index 0000000..a835cbd
--- /dev/null
+++ b/ctl-lib/ctl-config_v2.h
@@ -0,0 +1,74 @@
+#ifndef _CTL_CONFIG_V2_INCLUDE_
+#define _CTL_CONFIG_V2_INCLUDE_
+
+#if(AFB_BINDING_VERSION==2)
+// ctl-action.c
+static inline CtlActionT *ActionConfig(AFB_ApiT apiHandle, json_object *actionsJ, int exportApi)
+{
+ return ActionConfig_V3(afbBindingV2data.service.closure, actionsJ, exportApi);
+}
+static inline int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *obj, int exportApi)
+{
+ return ActionLoadOne_V3(afbBindingV2data.service.closure, action, obj, exportApi);
+}
+
+// ctl-config.c
+static inline char* ConfigSearch(AFB_ApiT apiHandle, json_object *responseJ)
+{
+ return ConfigSearch_V3(afbBindingV2data.service.closure, responseJ);
+}
+static inline char* CtlConfigSearch(AFB_ApiT apiHandle, const char *dirList, const char *prefix)
+{
+ return CtlConfigSearch_V3(afbBindingV2data.service.closure, dirList, prefix);
+}
+static inline void DispatchRequireApi(AFB_ApiT apiHandle, json_object * requireJ)
+{
+ DispatchRequireApi_V3(afbBindingV2data.service.closure, requireJ);
+}
+static inline int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig)
+{
+ return CtlConfigExec_V3(afbBindingV2data.service.closure, ctlConfig);
+}
+static inline CtlConfigT *CtlLoadMetaDataJson(AFB_ApiT apiHandle,json_object *ctlConfigJ, const char *prefix)
+{
+ return CtlLoadMetaDataJson_V3(afbBindingV2data.service.closure, ctlConfigJ, prefix);
+}
+static inline CtlConfigT *CtlLoadMetaDataUsingPrefix(AFB_ApiT apiHandle,const char* filepath, const char *prefix)
+{
+ return CtlLoadMetaDataUsingPrefix_V3(afbBindingV2data.service.closure, filepath, prefix);
+}
+static inline int CtlLoadSections(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, CtlSectionT *sections)
+{
+ return CtlLoadSections_V3(afbBindingV2data.service.closure, ctlHandle, sections);
+}
+
+// ctl-event.c
+static inline int EventConfig(AFB_ApiT apihandle, CtlSectionT *section, json_object *actionsJ)
+{
+ return EventConfig_V3(afbBindingV2data.service.closure, section, actionsJ);
+}
+
+// ctl-control.c
+static inline int ControlConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ)
+{
+ return ControlConfig_V3(afbBindingV2data.service.closure, section, actionsJ);
+}
+
+// ctl-onload.c
+static inline int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ)
+{
+ return OnloadConfig_V3(afbBindingV2data.service.closure, section, actionsJ);
+}
+
+// ctl-plugin.c
+static inline int PluginConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *pluginsJ)
+{
+ return PluginConfig_V3(afbBindingV2data.service.closure, section, pluginsJ);
+}
+static inline int PluginGetCB(AFB_ApiT apiHandle, CtlActionT *action , json_object *callbackJ)
+{
+ return PluginGetCB_V3(afbBindingV2data.service.closure, action, callbackJ);
+}
+#endif
+
+#endif /* _CTL_CONFIG_INCLUDE_ */