X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-event-itf.h;h=5f7b8370cd6d94fd1a1b8d493ed0dd66dcceb180;hb=eba60812e6bcd5cfbe4c82fceaf98393c8f6b7d3;hp=e31f22c14b9f34aefec9ae794d23a848417600f8;hpb=bbddc1e584dd01b60042f622f8cecfc69361020b;p=src%2Fapp-framework-binder.git 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 @@ -42,6 +42,16 @@ struct afb_event { 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.