aboutsummaryrefslogtreecommitdiffstats
path: root/src/monitor-api.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-04-09 18:16:07 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-15 17:57:36 +0200
commit4521c1e7ae5371ab9d639adc617d17fb4e8ded0c (patch)
treea8a1416a2d58c16ab3993c7e4dc405fc71daab6a /src/monitor-api.inc
parent63682b4da9d3e892d1d0a671de860adc43068142 (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 'src/monitor-api.inc')
-rw-r--r--src/monitor-api.inc39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/monitor-api.inc b/src/monitor-api.inc
index cbc1187f..e4dc2c92 100644
--- a/src/monitor-api.inc
+++ b/src/monitor-api.inc
@@ -1,5 +1,5 @@
-static const char _afb_description_v2_monitor[] =
+static const char _afb_description_monitor[] =
"{\"openapi\":\"3.0.0\",\"info\":{\"description\":\"monitoring of binding"
"s and internals\",\"title\":\"monitor\",\"version\":\"1.0\",\"x-binding-"
"c-generator\":{\"api\":\"monitor\",\"version\":2,\"prefix\":\"f_\",\"pos"
@@ -118,57 +118,68 @@ static const char _afb_description_v2_monitor[] =
"}}}}}}}}}"
;
-static void f_get(struct afb_req req);
-static void f_set(struct afb_req req);
-static void f_trace(struct afb_req req);
-static void f_session(struct afb_req req);
+static void f_get(afb_req_t req);
+static void f_set(afb_req_t req);
+static void f_trace(afb_req_t req);
+static void f_session(afb_req_t req);
-static const struct afb_verb_v2 _afb_verbs_v2_monitor[] = {
+static const struct afb_verb_v3 _afb_verbs_monitor[] = {
{
.verb = "get",
.callback = f_get,
.auth = NULL,
.info = "Get monitoring data.",
- .session = AFB_SESSION_CHECK_V2
+ .session = AFB_SESSION_CHECK,
+ .vcbdata = NULL,
+ .glob = 0
},
{
.verb = "set",
.callback = f_set,
.auth = NULL,
.info = "Set monitoring actions.",
- .session = AFB_SESSION_CHECK_V2
+ .session = AFB_SESSION_CHECK,
+ .vcbdata = NULL,
+ .glob = 0
},
{
.verb = "trace",
.callback = f_trace,
.auth = NULL,
.info = "Set monitoring actions.",
- .session = AFB_SESSION_CHECK_V2
+ .session = AFB_SESSION_CHECK,
+ .vcbdata = NULL,
+ .glob = 0
},
{
.verb = "session",
.callback = f_session,
.auth = NULL,
.info = "describes the session.",
- .session = AFB_SESSION_CHECK_V2
+ .session = AFB_SESSION_CHECK,
+ .vcbdata = NULL,
+ .glob = 0
},
{
.verb = NULL,
.callback = NULL,
.auth = NULL,
.info = NULL,
- .session = 0
+ .session = 0,
+ .vcbdata = NULL,
+ .glob = 0
}
};
-static const struct afb_binding_v2 _afb_binding_v2_monitor = {
+static const struct afb_binding_v3 _afb_binding_monitor = {
.api = "monitor",
- .specification = _afb_description_v2_monitor,
+ .specification = _afb_description_monitor,
.info = "monitoring of bindings and internals",
- .verbs = _afb_verbs_v2_monitor,
+ .verbs = _afb_verbs_monitor,
.preinit = NULL,
.init = NULL,
.onevent = NULL,
+ .userdata = NULL,
.noconcurrency = 0
};