From 5ef271effacb83552f9ea56572c751c2f5a556b6 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Fri, 27 Jul 2018 17:38:22 +0200 Subject: Add ability to provide binding settings Change-Id: Iab93a26340fa9743a58ca43cd903bbf31c783e5b Signed-off-by: Jose Bollo --- bindings/samples/hello3.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bindings/samples') diff --git a/bindings/samples/hello3.c b/bindings/samples/hello3.c index 7e54e3a9..99a35829 100644 --- a/bindings/samples/hello3.c +++ b/bindings/samples/hello3.c @@ -552,6 +552,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; @@ -735,6 +742,7 @@ static const struct afb_verb_v3 verbs[]= { { .verb="api", .callback=api}, { .verb="mute", .callback=mute}, { .verb="queue", .callback=queue}, + { .verb="settings", .callback=settings}, { .verb=NULL} }; -- cgit