summaryrefslogtreecommitdiffstats
path: root/bindings/samples/tic-tac-toe.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-06-28 15:51:54 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-07-05 15:54:40 +0200
commitd31bd193cb4eeb5dc4e383d610ef94a9855810b7 (patch)
tree8a9bd196bbb34e58402d06b7c5bee36b0ce8dbde /bindings/samples/tic-tac-toe.c
parent17e428f46f0e093270be7eff79788e1575bcfb14 (diff)
Bindings V2: reintroduce field 'info' for verbs
CAUTION, this breaks binary compatibility Change-Id: I67acfffe1f04cdddee0ad1230b227b080da1ab06 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'bindings/samples/tic-tac-toe.c')
-rw-r--r--bindings/samples/tic-tac-toe.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/bindings/samples/tic-tac-toe.c b/bindings/samples/tic-tac-toe.c
index 3cff9afc..bf4904ea 100644
--- a/bindings/samples/tic-tac-toe.c
+++ b/bindings/samples/tic-tac-toe.c
@@ -564,16 +564,15 @@ static void wait(struct afb_req req)
* array of the verbs exported to afb-daemon
*/
static const struct afb_verb_v2 verbs[] = {
- /* VERB'S NAME SESSION MANAGEMENT FUNCTION TO CALL SHORT DESCRIPTION */
- { "new", new, NULL, AFB_SESSION_NONE },
- { "play", play, NULL, AFB_SESSION_NONE },
- { "move", move, NULL, AFB_SESSION_NONE },
- { "board", board, NULL, AFB_SESSION_NONE },
- { "level", level, NULL, AFB_SESSION_NONE },
- { "join", join, NULL, AFB_SESSION_NONE },
- { "undo", undo, NULL, AFB_SESSION_NONE },
- { "wait", wait, NULL, AFB_SESSION_NONE },
- { NULL, NULL, NULL, AFB_SESSION_NONE } /* marker for end of the array */
+ { .verb="new", .callback=new },
+ { .verb="play", .callback=play },
+ { .verb="move", .callback=move },
+ { .verb="board", .callback=board },
+ { .verb="level", .callback=level },
+ { .verb="join", .callback=join },
+ { .verb="undo", .callback=undo },
+ { .verb="wait", .callback=wait },
+ { .verb=NULL }
};
/*