aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap-json.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-07-31 16:31:47 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-07-31 16:31:47 +0200
commit129e549d44b5e8075ef87a260577344e912c92aa (patch)
tree8d2d3289a0596ce12bd7c857e262b8b79fc21754 /src/wrap-json.h
parentfbe9349a747aba8d7c8c27e51cdd8c3c5ef8b39c (diff)
wrap-json: add "for_all" functions
The "for_all" functions are facilities for handling collections of json objects Change-Id: Icaecb39e9f0108e1fb1c42bef2a90935feb312ed Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wrap-json.h')
-rw-r--r--src/wrap-json.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wrap-json.h b/src/wrap-json.h
index 7fe90eee..cb2d0bfe 100644
--- a/src/wrap-json.h
+++ b/src/wrap-json.h
@@ -34,3 +34,13 @@ extern int wrap_json_vcheck(struct json_object *object, const char *desc, va_lis
extern int wrap_json_check(struct json_object *object, const char *desc, ...);
extern int wrap_json_vmatch(struct json_object *object, const char *desc, va_list args);
extern int wrap_json_match(struct json_object *object, const char *desc, ...);
+
+extern void wrap_json_optarray_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure);
+extern void wrap_json_array_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure);
+
+extern void wrap_json_optarray_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure);
+extern void wrap_json_array_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure);
+extern void wrap_json_object_for_all(struct json_object *object, void (*callback)(void*,struct json_object*,const char*), void *closure);
+extern void wrap_json_optobject_for_all(struct json_object *object, void (*callback)(void*,struct json_object*,const char*), void *closure);
+extern void wrap_json_for_all(struct json_object *object, void (*callback)(void*,struct json_object*,const char*), void *closure);
+