aboutsummaryrefslogtreecommitdiffstats
path: root/include/afb
diff options
context:
space:
mode:
Diffstat (limited to 'include/afb')
-rw-r--r--include/afb/afb-event.h8
-rw-r--r--include/afb/afb-req.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/include/afb/afb-event.h b/include/afb/afb-event.h
index c3686fdd..2e7f6ab9 100644
--- a/include/afb/afb-event.h
+++ b/include/afb/afb-event.h
@@ -29,6 +29,14 @@ struct afb_event
};
/*
+ * Converts the 'event' to an afb_eventid.
+ */
+static inline struct afb_eventid *afb_event_to_eventid(struct afb_event event)
+{
+ return event.closure;
+}
+
+/*
* Checks wether the 'event' is valid or not.
*
* Returns 0 if not valid or 1 if valid.
diff --git a/include/afb/afb-req.h b/include/afb/afb-req.h
index 71dd31d1..6f98e900 100644
--- a/include/afb/afb-req.h
+++ b/include/afb/afb-req.h
@@ -31,6 +31,14 @@ struct afb_req
};
/*
+ * 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.
*
* Returns 0 if not valid or 1 if valid.