Change-Id: I56f4f6aebe673363c8b07c55f68ebbb1362b04fc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
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.
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'.