aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-action.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-13 15:01:13 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:55 +0100
commit816c65ed373288974b2276f5fbb4a3131a447f77 (patch)
tree81b92b5e1bef596434b45406421c5793ed0c0cda /ctl-lib/ctl-action.c
parent7387497703fc8a26eaacb7e974137ea78e02514d (diff)
Add ctlPlugins array to the ctlConfig structure
This lets you add new actions to a section from a plugin, typically at its init step. Change-Id: I33a61c6162d25332d680d8a0e2d1841a457e0e80 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-action.c')
-rw-r--r--ctl-lib/ctl-action.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index a42e8b5..4c72105 100644
--- a/ctl-lib/ctl-action.c
+++ b/ctl-lib/ctl-action.c
@@ -407,3 +407,8 @@ int AddActionsToSection(AFB_ApiT apiHandle, CtlSectionT *section, json_object *a
}
return 0;
}
+
+int AddActionsToSectionFromPlugin(AFB_ApiT apiHandle, CtlPluginT *externalCtlPlugins, CtlSectionT *section, json_object *actionsJ, int exportApi) {
+ ctlPlugins = externalCtlPlugins;
+ return AddActionsToSection(apiHandle, section, actionsJ, exportApi);
+}