+static void set_verbosity_cb(void *closure, int level)
+{
+ struct api_so_v2 *desc = closure;
+ desc->ditf.interface.verbosity = level;
+}
+
+static struct json_object *describe_cb(void *closure)
+{
+ struct api_so_v2 *desc = closure;
+ return desc->binding->specification ? json_tokener_parse(desc->binding->specification) : NULL;
+}
+
+static struct afb_api_itf so_v2_api_itf = {
+ .call = call_cb,
+ .service_start = service_start_cb,
+ .update_hooks = update_hooks_cb,
+ .get_verbosity = get_verbosity_cb,
+ .set_verbosity = set_verbosity_cb,
+ .describe = describe_cb
+
+};
+
+int afb_api_so_v2_add_binding(const struct afb_binding_v2 *binding, void *handle, struct afb_apiset *apiset)
+{
+ int rc;
+ struct api_so_v2 *desc;
+ struct afb_api afb_api;
+ const struct afb_verb_v2 *bv;
+ int count, i, j;