X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-xreq.h;h=6da614e15280b1e728779c053bb89491a2b8a5c1;hb=d69f7604c515e211f8021306b5aa51044f927add;hp=4e79686c847985ff721e39f44ed82e4209c1cd41;hpb=ca820c65c2b03a24e8936218171c6c1d138fd1f7;p=src%2Fapp-framework-binder.git 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 +#include #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;