Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add ability to provide binding settings
[src/app-framework-binder.git]
/
bindings
/
samples
/
hello3.c
diff --git
a/bindings/samples/hello3.c
b/bindings/samples/hello3.c
index
7e54e3a
..
99a3582
100644
(file)
--- 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);
}
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;
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="api", .callback=api},
{ .verb="mute", .callback=mute},
{ .verb="queue", .callback=queue},
+ { .verb="settings", .callback=settings},
{ .verb=NULL}
};
{ .verb=NULL}
};