summaryrefslogtreecommitdiffstats
path: root/include/afb/afb-event.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-22 09:37:54 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-09 14:08:32 +0200
commitbe63003e3f1841b43614f0e11b0a291e11f1dad1 (patch)
tree58bfc359398ccdb3a5976f3204ee17f535f15569 /include/afb/afb-event.h
parent59d4e6a0654d361de19fbbfa65daf6c1dabd55a0 (diff)
Provide conversions for afb_event and afb_req
Provision is made here to convert, trivially: afb_event -> afb_eventid* afb_req -> afb_request* The opposite conversions aren't provided to favor new interfaces. Change-Id: Ib67c2317f782e2edfd1ba0e49e10b321a3b770a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb/afb-event.h')
-rw-r--r--include/afb/afb-event.h8
1 files changed, 8 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.