X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=bindings%2Fsamples%2Fhello3.c;h=b50ea46d515dc0b8a1d1fa564fd99ac4c71bb73a;hb=9295a52e5ea920a969aa0bf7aedd2342fb59c8fe;hp=7e54e3a98612ee78c25fedd71b595ec957ecabff;hpb=4772c5626204f6ab0e26b938f49a6719fb10f88d;p=src%2Fapp-framework-binder.git diff --git a/bindings/samples/hello3.c b/bindings/samples/hello3.c index 7e54e3a9..b50ea46d 100644 --- a/bindings/samples/hello3.c +++ b/bindings/samples/hello3.c @@ -539,6 +539,11 @@ static void mute(afb_req_t request) { } +static void mutebug(afb_req_t request) +{ + afb_req_addref(request); +} + void queue_cb(int signum, void *arg) { afb_req_t request = arg; @@ -552,6 +557,13 @@ static void queue(afb_req_t request) afb_api_queue_job(afb_req_get_api(request), queue_cb, request, NULL, 0); } +static void settings(afb_req_t request) +{ + afb_api_t api = afb_req_get_api(request); + struct json_object *object = afb_api_settings(api); + afb_req_reply(request, json_object_get(object), NULL, NULL); +} + static void rootdir (afb_req_t request) { ssize_t s; @@ -734,7 +746,9 @@ static const struct afb_verb_v3 verbs[]= { { .verb="locale", .callback=locale}, { .verb="api", .callback=api}, { .verb="mute", .callback=mute}, + { .verb="mutebug", .callback=mutebug}, { .verb="queue", .callback=queue}, + { .verb="settings", .callback=settings}, { .verb=NULL} };