X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-req-itf.h;h=153887b028595458d87ce3af42e34e9d417e21f5;hb=eba60812e6bcd5cfbe4c82fceaf98393c8f6b7d3;hp=bc4b618cb0fe69716bb461145a964cc2a0467e1d;hpb=bbddc1e584dd01b60042f622f8cecfc69361020b;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-req-itf.h b/include/afb/afb-req-itf.h index bc4b618c..153887b0 100644 --- a/include/afb/afb-req-itf.h +++ b/include/afb/afb-req-itf.h @@ -82,6 +82,16 @@ struct afb_req { void *closure; /* the closure argument for functions of 'itf' */ }; +/* + * Checks wether the request 'req' is valid or not. + * + * Returns 0 if not valid or 1 if valid. + */ +static inline int afb_req_is_valid(struct afb_req req) +{ + return req.itf != NULL; +} + /* * Gets from the request 'req' the argument of 'name'. * Returns a PLAIN structure of type 'struct afb_arg'.