aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-xreq.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-xreq.h')
-rw-r--r--src/afb-xreq.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afb-xreq.h b/src/afb-xreq.h
index 4e79686c..6da614e1 100644
--- a/src/afb-xreq.h
+++ b/src/afb-xreq.h
@@ -18,6 +18,7 @@
#pragma once
#include <afb/afb-request-itf.h>
+#include <afb/afb-req-itf.h>
#include "afb-context.h"
struct json_object;
@@ -147,6 +148,13 @@ extern void afb_xreq_call_verb_v1(struct afb_xreq *xreq, const struct afb_verb_d
extern void afb_xreq_call_verb_v2(struct afb_xreq *xreq, const struct afb_verb_v2 *verb);
extern void afb_xreq_call_verb_vdyn(struct afb_xreq *xreq, const struct afb_api_dyn_verb *verb);
+/******************************************************************************/
+
+static inline struct afb_req xreq_to_req(struct afb_xreq *xreq)
+{
+ return (struct afb_req){ .itf = xreq->request.itf, .closure = &xreq->request };
+}
+
static inline struct afb_request *xreq_to_request(struct afb_xreq *xreq)
{
return &xreq->request;