X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-event-itf.h;h=5f7b8370cd6d94fd1a1b8d493ed0dd66dcceb180;hb=69162a9bf492fea52021e0b8d93454bbf496dedc;hp=e31f22c14b9f34aefec9ae794d23a848417600f8;hpb=2f585aedc463109b3d59ad63a9a6c82f324dd500;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.