From 3fc9254e06becfea47338ab1711600bdf4813666 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 2 Oct 2018 14:18:19 +0200 Subject: Add setter/getter for user free defined pointer Change-Id: I617f758890c3508f55d568b0e5c57c8c5d4d5dd1 Signed-off-by: Romain Forlot --- ctl-lib/ctl-plugin.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ctl-lib/ctl-plugin.c') diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c index 5d3ae1f..a632450 100644 --- a/ctl-lib/ctl-plugin.c +++ b/ctl-lib/ctl-plugin.c @@ -24,6 +24,14 @@ #include "ctl-config.h" +void* getPluginContext(CtlPluginT *plugin) { + return plugin->context; +} + +void setPluginContext(CtlPluginT *plugin, void *context) { + plugin->context = context; +} + int PluginGetCB (AFB_ApiT apiHandle, CtlActionT *action , json_object *callbackJ) { const char *plugin=NULL, *function=NULL; json_object *argsJ; -- cgit 1.2.3-korg