diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2015-12-22 20:15:13 +0100 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2015-12-22 20:15:13 +0100 |
commit | 1398adf363c182f25603f7d0c1ff52c5be8267b2 (patch) | |
tree | cc2d4007f3d35df79d1ce4ed7acc0bac34c16306 /include | |
parent | 6d575b22b86ebfac5e2b4c9d672f45805a5b63ce (diff) |
Does not compile
Diffstat (limited to 'include')
-rw-r--r-- | include/local-def.h | 12 | ||||
-rw-r--r-- | include/proto-def.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/local-def.h b/include/local-def.h index 22a3608b..abbbd61f 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -181,6 +181,7 @@ typedef struct { int cacheTimeout; int apiTimeout; int cntxTimeout; // Client Session Context timeout + int pluginCount; // loaded plugins count AFB_aliasdir *aliasdir; // alias mapping for icons,apps,... } AFB_config; @@ -228,8 +229,8 @@ typedef struct { 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 *ctx; // application specific context - AFB_plugin *plugin; // provide callback and easy access to plugin + void **ctx; // 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"); @@ -239,9 +240,9 @@ typedef struct { char *api; AFB_PostRequest *post; json_object *jresp; - AFB_clientCtx *client; // needed because libmicrohttp cannot create an empty response - int restfull; // request is resfull [uuid token provided] - int errcode; // http error code + 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; @@ -261,7 +262,6 @@ typedef struct { int fakemod; // respond to GET/POST request without interacting with sndboard int forceexit; // when autoconfig from script force exit before starting server AFB_plugin **plugins; // pointer to REST/API plugins - int pluginCount; // loaded plugins count magic_t magic; // Mime type file magic lib sigjmp_buf restartCkpt; // context save for restart set/longjmp } AFB_session; diff --git a/include/proto-def.h b/include/proto-def.h index df26ce1b..7f6fc065 100644 --- a/include/proto-def.h +++ b/include/proto-def.h @@ -47,7 +47,7 @@ PUBLIC AFB_error ctxTokenRefresh (AFB_request *request); PUBLIC AFB_error ctxTokenCreate (AFB_request *request); PUBLIC AFB_error ctxTokenCheck (AFB_request *request); PUBLIC AFB_error ctxTokenReset (AFB_request *request); -PUBLIC AFB_error ctxClientGet (AFB_request *request, AFB_plugin *plugin); +PUBLIC AFB_error ctxClientGet (AFB_request *request, AFB_session *session, int idx); PUBLIC void ctxStoreInit (int); |