2 #define AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO
5 #include <json-c/json.h>
6 #include <afb/afb-binding-v2.h>
7 #include <afb/afb-req-v2.h>
8 #include <afb/afb-req-itf.h>
10 // ---------- Verb's declaration ----------------------------------------------
11 static void verb_login(struct afb_req req);
12 static void verb_logout(struct afb_req req);
13 static void verb_open_session(struct afb_req req);
14 static void verb_close_session(struct afb_req req);
15 static void verb_set_data(struct afb_req req);
16 static void verb_get_data(struct afb_req req);
18 // ---------- Binding's metadata ----------------------------------------------
19 static const struct afb_auth _afb_auth_v2_identity[] = {};
21 static const struct afb_verb_v2 _afb_verbs_v2_identity[] =
25 .callback = verb_login,
31 .callback = verb_logout,
36 .verb = "open_session",
37 .callback = verb_open_session,
42 .verb = "close_session",
43 .callback = verb_close_session,
49 .callback = verb_get_data,
62 static const struct afb_binding_v2 _afb_binding_v2_identity =
65 .specification = NULL,
66 .verbs = _afb_verbs_v2_identity,
72 // ---------- Verb's implementation -------------------------------------------
74 static void verb_login(struct afb_req req)
78 static void verb_logout(struct afb_req req)
82 static void verb_open_session(struct afb_req req)
86 static void verb_close_session(struct afb_req req)
90 static void verb_get_data(struct afb_req req)
94 static void verb_set_data(struct afb_req req)