+static inline const char *afb_req_raw(struct afb_req req, size_t *size)
+{
+ return req.itf->raw(req.req_closure, size);
+}
+
+static inline void afb_req_send(struct afb_req req, char *buffer, size_t size)
+{
+ req.itf->send(req.req_closure, buffer, size);
+}
+
+static inline void *afb_req_context_get(struct afb_req req)
+{
+ return req.itf->context_get(req.ctx_closure);
+}
+
+static inline void afb_req_context_set(struct afb_req req, void *context, void (*free_context)(void*))
+{
+ return req.itf->context_set(req.ctx_closure, context, free_context);
+}
+
+static inline void afb_req_context_clear(struct afb_req req)
+{
+ afb_req_context_set(req, NULL, NULL);
+}
+
+static inline int afb_req_session_create(struct afb_req req)
+{
+ int result = req.itf->session_create(req.req_closure);
+ if (!result)
+ afb_req_fail(req, "fail", "Can't create the session");
+ return result;
+}
+
+static inline int afb_req_session_check(struct afb_req req, int refresh)
+{
+ int result = req.itf->session_check(req.req_closure, refresh);
+ if (!result)
+ afb_req_fail(req, "fail", "Token chek failed for the session");
+ return result;
+}
+
+static inline void afb_req_session_close(struct afb_req req)