Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
add validity functions
[src/app-framework-binder.git]
/
include
/
afb
/
afb-event-itf.h
diff --git
a/include/afb/afb-event-itf.h
b/include/afb/afb-event-itf.h
index
e31f22c
..
5f7b837
100644
(file)
--- a/
include/afb/afb-event-itf.h
+++ b/
include/afb/afb-event-itf.h
@@
-42,6
+42,16
@@
struct afb_event {
void *closure; /* the closure argument for functions of 'itf' */
};
void *closure; /* the closure argument for functions of 'itf' */
};
+/*
+ * 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.
/*
* Broadcasts widely the 'event' with the data 'object'.
* 'object' can be NULL.