X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-monitor.c;h=4b1c0384dd2002a3fcd33a9be225eec3f77f5b27;hb=7b42076a77b81e205ecc704c3bb7538716567487;hp=6bd91f908796719975b4a223276e55228cf12283;hpb=2e83db0375d44c0b05742e787f6abd4127e2aac8;p=src%2Fapp-framework-binder.git diff --git a/src/afb-monitor.c b/src/afb-monitor.c index 6bd91f90..4b1c0384 100644 --- a/src/afb-monitor.c +++ b/src/afb-monitor.c @@ -16,7 +16,6 @@ */ #define _GNU_SOURCE -#define AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO #include @@ -27,7 +26,6 @@ #include "afb-api.h" #include "afb-apiset.h" #include "afb-api-so-v2.h" -#include "afb-ditf.h" #include "afb-evt.h" #include "afb-xreq.h" #include "afb-trace.h" @@ -115,7 +113,7 @@ static void set_verbosity_to(const char *name, int level) if (!name || !name[0]) verbosity = level; else if (name[0] == '*' && !name[1]) - afb_apiset_enum(main_apiset, set_verbosity_to_all_cb, (void*)(intptr_t)level); + afb_apiset_enum(main_apiset, 1, set_verbosity_to_all_cb, (void*)(intptr_t)level); else afb_apiset_set_verbosity(main_apiset, name, level); } @@ -149,7 +147,7 @@ static void set_verbosity(struct json_object *spec) /** * Translate verbosity level to a protocol indication. - * @param level the verbosity + * @param level the verbosity * @return the encoded verbosity */ static struct json_object *encode_verbosity(int level) @@ -189,7 +187,7 @@ static void get_verbosity_of(struct json_object *resu, const char *name) if (!name || !name[0]) json_object_object_add(resu, "", encode_verbosity(verbosity)); else if (name[0] == '*' && !name[1]) - afb_apiset_enum(main_apiset, get_verbosity_of_all_cb, resu); + afb_apiset_enum(main_apiset, 1, get_verbosity_of_all_cb, resu); else { l = afb_apiset_get_verbosity(main_apiset, name); if (l >= 0) @@ -243,7 +241,7 @@ static void get_one_api(struct json_object *resu, const char *name, struct json_ struct json_object *o; o = afb_apiset_describe(main_apiset, name); - if (o || afb_apiset_has(main_apiset, name, 0)) + if (o || afb_apiset_lookup(main_apiset, name, 1)) json_object_object_add(resu, name, o); } @@ -285,7 +283,7 @@ static struct json_object *get_apis(struct json_object *spec) } 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); + afb_apiset_enum(main_apiset, 1, get_apis_of_all_cb, resu); } return resu; }