+
+// User Client Session Context
+typedef struct {
+ char uuid[37]; // long term authentication of remote client
+ char token[37]; // short term authentication of remote client
+ time_t timeStamp; // last time token was refresh
+ int restfull; // client does not use cookie
+ void **contexts; // application specific context [one per plugin]]
+ AFB_plugin **plugins; // we need plugins reference to cleanup session outside of call context
+} AFB_clientCtx;
+
+// MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "value");
+typedef struct {
+ const char *uuid;
+ const char *url;
+ char *prefix; // plugin convivial name
+ char *api;
+ AFB_PostRequest *post;
+ json_object *jresp;
+ void *context; // Hold Client Context when using session
+ int restfull; // request is resfull [uuid token provided]
+ int errcode; // http error code
+ 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;
+
+