Provide conversions for afb_event and afb_req
[src/app-framework-binder.git] / include / afb / afb-req.h
index 71dd31d..6f98e90 100644 (file)
@@ -30,6 +30,14 @@ struct afb_req
        struct afb_request *closure;            /* the closure argument for functions of 'itf' */
 };
 
+/*
+ * Converts the 'req' to an afb_request.
+ */
+static inline struct afb_request *afb_req_to_request(struct afb_req req)
+{
+       return req.closure;
+}
+
 /*
  * Checks whether the request 'req' is valid or not.
  *