aboutsummaryrefslogtreecommitdiffstats
path: root/include/afb/afb-event-itf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/afb/afb-event-itf.h')
-rw-r--r--include/afb/afb-event-itf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/afb/afb-event-itf.h b/include/afb/afb-event-itf.h
index e31f22c1..5f7b8370 100644
--- a/include/afb/afb-event-itf.h
+++ b/include/afb/afb-event-itf.h
@@ -43,6 +43,16 @@ struct afb_event {
};
/*
+ * Checks wether the 'event' is valid or not.
+ *
+ * Returns 0 if not valid or 1 if valid.
+ */
+static inline int afb_event_is_valid(struct afb_event event)
+{
+ return event.itf != NULL;
+}
+
+/*
* Broadcasts widely the 'event' with the data 'object'.
* 'object' can be NULL.
*