aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-23 18:54:24 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-23 18:54:24 +0100
commit97cfff753ccb7e5739ebe53e43a5af29dc0f6577 (patch)
treea1708825d3a60114d78d711e97b40eae75f0a4c7 /include
parent5d293eac235f2d59eccc9b23de803821b821c12e (diff)
Add plugin handle into request, pass it to free callback
We need the global handle in requests, and in the free function. Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'include')
-rw-r--r--include/local-def.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/local-def.h b/include/local-def.h
index 9c584417..843805f8 100644
--- a/include/local-def.h
+++ b/include/local-def.h
@@ -97,7 +97,7 @@ extern char *ERROR_LABEL[];
typedef json_object* (*AFB_apiCB)();
-typedef void (*AFB_freeCtxCB)(void*, char*);
+typedef void (*AFB_freeCtxCB)(void*, void*, char*);
// Error code are requested through function to manage json usage count
typedef struct {
@@ -237,7 +237,7 @@ typedef struct {
typedef struct {
const char *uuid;
const char *url;
- char *plugin;
+ char *prefix; // plugin convivial name
char *api;
AFB_PostRequest *post;
json_object *jresp;
@@ -247,6 +247,7 @@ typedef struct {
sigjmp_buf checkPluginCall; // context save for timeout set/longjmp
AFB_config *config; // plugin may need access to config
struct MHD_Connection *connection;
+ AFB_plugin *plugin; // provide callback and easy access to plugin
AFB_plugin **plugins;
} AFB_request;