added the binding's stub.
[apps/agl-service-data-persistence.git] / binding / identity-binding.c
1 #define _GNU_SOURCE
2 #define AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO
3
4 #include <string.h>
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>
9
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);
17
18 // ---------- Binding's metadata ----------------------------------------------
19 static const struct afb_auth _afb_auth_v2_identity[] = {};
20
21 static const struct afb_verb_v2 _afb_verbs_v2_identity[] =
22 {
23         {
24                 .verb = "login",
25                 .callback = verb_login,
26                 .auth = NULL,
27                 .session = 0,
28         },
29         {
30                 .verb = "logout",
31                 .callback = verb_logout,
32                 .auth = NULL,
33                 .session = 0,
34         },
35         {
36                 .verb = "open_session",
37                 .callback = verb_open_session,
38                 .auth = NULL,
39                 .session = 0,
40         },
41         {
42                 .verb = "close_session",
43                 .callback = verb_close_session,
44                 .auth = NULL,
45                 .session = 0,
46         },
47         {
48                 .verb = "get_data",
49                 .callback = verb_get_data,
50                 .auth = NULL,
51                 .session = 0,
52         },
53         {
54                 .verb = "set_data",
55                 .callback = set_data,
56                 .auth = NULL,
57                 .session = 0,
58         },
59         { .verb = NULL }
60 };
61
62 static const struct afb_binding_v2 _afb_binding_v2_identity =
63 {
64         .api = "identity",
65         .specification = NULL,
66         .verbs = _afb_verbs_v2_identity,
67         .preinit = NULL,
68         .init = NULL,
69         .onevent = NULL
70 };
71
72 // ---------- Verb's implementation -------------------------------------------
73
74 static void verb_login(struct afb_req req)
75 {
76 }
77
78 static void verb_logout(struct afb_req req)
79 {
80 }
81
82 static void verb_open_session(struct afb_req req)
83 {
84 }
85
86 static void verb_close_session(struct afb_req req)
87 {
88 }
89
90 static void verb_get_data(struct afb_req req)
91 {
92 }
93
94 static void verb_set_data(struct afb_req req)
95 {
96 }