diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-04-09 18:16:07 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-06-15 17:57:36 +0200 |
commit | 4521c1e7ae5371ab9d639adc617d17fb4e8ded0c (patch) | |
tree | a8a1416a2d58c16ab3993c7e4dc405fc71daab6a /bindings/tutorial/tuto-1.c | |
parent | 63682b4da9d3e892d1d0a671de860adc43068142 (diff) |
api-v3: First draft
This commit introduces the bindings v3 API for bindings.
The documentation has still to be improved and will come
very soon.
Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'bindings/tutorial/tuto-1.c')
-rw-r--r-- | bindings/tutorial/tuto-1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bindings/tutorial/tuto-1.c b/bindings/tutorial/tuto-1.c index 433a4ebb..1f58be6c 100644 --- a/bindings/tutorial/tuto-1.c +++ b/bindings/tutorial/tuto-1.c @@ -1,18 +1,18 @@ -#define AFB_BINDING_VERSION 2 +#define AFB_BINDING_VERSION 3 #include <afb/afb-binding.h> -void hello(afb_req req) +void hello(afb_req_t req) { AFB_REQ_DEBUG(req, "hello world"); - afb_req_success(req, NULL, "hello world"); + afb_req_reply(req, NULL, NULL, "hello world"); } -const afb_verb_v2 verbs[] = { +const afb_verb_t verbs[] = { { .verb="hello", .callback=hello }, { .verb=NULL } }; -const afb_binding_v2 afbBindingV2 = { +const afb_binding_t afbBindingExport = { .api = "tuto-1", .verbs = verbs }; |