aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-03-31 17:56:32 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-03-31 17:56:32 +0200
commit1205c90cccd3144bab24b4b5fd8dcbf0d0e6b570 (patch)
treeed8b93e852f4f7e6b1884348891e39b562eb74bb /include
parentcc4b56b6710624c069642d1a510d0060949fe5b9 (diff)
refactoring (in progress, tbf)
Change-Id: I8f2684a38d0894d827510d9a171ee6d5c39fb55e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include')
-rw-r--r--include/local-def.h17
-rw-r--r--include/proto-def.h4
2 files changed, 7 insertions, 14 deletions
diff --git a/include/local-def.h b/include/local-def.h
index 91b61abc..3f618717 100644
--- a/include/local-def.h
+++ b/include/local-def.h
@@ -202,15 +202,6 @@ typedef struct {
size_t len;
} AFB_redirect_msg;
-// 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_clientCtx;
-
// main config structure
struct AFB_config
{
@@ -233,15 +224,17 @@ struct AFB_config
typedef struct {
const char *uuid;
const char *url;
- char *prefix; // plugin convivial name
- char *method;
+ const char *prefix; // plugin convivial name
+ const char *method;
+/*
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
struct AFB_config *config; // plugin may need access to config
- struct MHD_Connection *connection;
+ struct afb_req *areq;
} AFB_request;
struct afb_hsrv_handler;
diff --git a/include/proto-def.h b/include/proto-def.h
index 0db8abb1..c364035a 100644
--- a/include/proto-def.h
+++ b/include/proto-def.h
@@ -22,10 +22,10 @@
// helper-api
extern const char* getQueryValue (const AFB_request * request, const char *name);
extern int getQueryAll(AFB_request * request, char *query, size_t len);
-extern AFB_PostHandle* getPostHandle (AFB_request *request);
+/*
extern json_object* getPostFile (AFB_request *request, AFB_PostItem *item, char* destination) ;
-extern AFB_PostCtx* getPostContext (AFB_request *request);
extern char* getPostPath (AFB_request *request);
+*/
extern json_object *jsonNewMessage (AFB_error level, char* format, ...);