summaryrefslogtreecommitdiffstats
path: root/src/api.c
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2017-10-23 10:51:37 +0200
committerLoïc Collignon <loic.collignon@iot.bzh>2017-10-23 10:51:37 +0200
commit44096523e0c45c6b02840f2fe2aca337510fac28 (patch)
treedc9c7b2be0750c011fd7c581df65f7b2e0a9ec16 /src/api.c
parent5441251cae0eea3786c327b3b3386eae5bf687db (diff)
add nfc binding
Change-Id: I1ebf8e803436430490201db533c2a5a04c04295e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'src/api.c')
-rw-r--r--src/api.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/api.c b/src/api.c
new file mode 100644
index 0000000..e508e86
--- /dev/null
+++ b/src/api.c
@@ -0,0 +1,63 @@
+#include "nfc-binding.h"
+
+/*
+static const struct afb_auth nfc_auths[] = {
+};
+*/
+
+static const struct afb_verb_v2 nfc_verbs[] = {
+ {
+ .verb = "subscribe",
+ .callback = verb_subscribe,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ {
+ .verb = "unsubscribe",
+ .callback = verb_unsubscribe,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ {
+ .verb = "list-devices",
+ .callback = verb_list_devices,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ {
+ .verb = "list-devices-capabilities",
+ .callback = verb_list_devices_capabilities,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ {
+ .verb = "start-polling",
+ .callback = verb_start_polling,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ {
+ .verb = "stop-polling",
+ .callback = verb_stop_polling,
+ .auth = NULL,
+ .info = NULL,
+ .session = AFB_SESSION_NONE_V2
+ },
+ { .verb = NULL }
+};
+
+const struct afb_binding afbBindingV2 = {
+ .api = "nfc",
+ .specification = NULL,
+ .info = NULL,
+ .verbs = nfc_verbs,
+ .preinit = NULL,
+ .init = init,
+ .onevent = NULL,
+ .noconcurrency = 0
+};