#include <string.h>
#include <json-c/json.h>
-#include <afb/afb-binding.h>
+#include <afb/afb-binding-v2.h>
#include "afb-api.h"
#include "afb-apiset.h"
extern struct afb_apiset *main_apiset;
+static struct afb_binding_data_v2 datav2;
+
int afb_monitor_init()
{
- static int v;
- return afb_api_so_v2_add_binding(&_afb_binding_v2_, NULL, main_apiset, &v);
+ return afb_api_so_v2_add_binding(&_afb_binding_v2_monitor, NULL, main_apiset, &datav2);
}
/******************************************************************************
n = json_object_array_length(spec);
for (i = 0 ; i < n ; i++)
get_verbosity_of(resu, json_object_get_string(json_object_array_get_idx(spec, i)));
+ } else if (json_object_is_type(spec, json_type_string)) {
+ get_verbosity_of(resu, json_object_get_string(spec));
} else if (json_object_get_boolean(spec)) {
get_verbosity_of(resu, "");
get_verbosity_of(resu, "*");
n = json_object_array_length(spec);
for (i = 0 ; i < n ; i++)
get_one_api(resu, json_object_get_string(json_object_array_get_idx(spec, i)), NULL);
+ } else if (json_object_is_type(spec, json_type_string)) {
+ get_one_api(resu, json_object_get_string(spec), NULL);
} else if (json_object_get_boolean(spec)) {
afb_apiset_enum(main_apiset, get_apis_of_all_cb, resu);
}