Change-Id: Ic39d2c025af257703340d1c8f56746b2e27d3818
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+static void onevent(const char *event, struct json_object *object)
+{
+ NOTICE("received event %s(%s)", event, json_object_to_json_string(object));
+}
+
// NOTE: this sample does not use session to keep test a basic as possible
// in real application most APIs should be protected with AFB_SESSION_CHECK
static const struct afb_verb_v2 verbs[]= {
// NOTE: this sample does not use session to keep test a basic as possible
// in real application most APIs should be protected with AFB_SESSION_CHECK
static const struct afb_verb_v2 verbs[]= {
.specification = NULL,
.verbs = verbs,
.preinit = preinit,
.specification = NULL,
.verbs = verbs,
.preinit = preinit,
+ .init = init,
+ .onevent = onevent