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-req-itf.h
diff --git
a/include/afb/afb-req-itf.h
b/include/afb/afb-req-itf.h
index
bc4b618
..
153887b
100644
(file)
--- 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' */
};
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'.
/*
* Gets from the request 'req' the argument of 'name'.
* Returns a PLAIN structure of type 'struct afb_arg'.