Reordering of sample and tutorial bindings
[src/app-framework-binder.git] / bindings / tutorials / tuto-1.c
diff --git a/bindings/tutorials/tuto-1.c b/bindings/tutorials/tuto-1.c
new file mode 100644 (file)
index 0000000..1f58be6
--- /dev/null
@@ -0,0 +1,19 @@
+#define AFB_BINDING_VERSION 3
+#include <afb/afb-binding.h>
+
+void hello(afb_req_t req)
+{
+       AFB_REQ_DEBUG(req, "hello world");
+       afb_req_reply(req, NULL, NULL, "hello world");
+}
+
+const afb_verb_t verbs[] = {
+       { .verb="hello", .callback=hello },
+       { .verb=NULL }
+};
+
+const afb_binding_t afbBindingExport = {
+       .api = "tuto-1",
+       .verbs = verbs
+};
+