summaryrefslogtreecommitdiffstats
path: root/filescan-utils.h
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-10 10:29:11 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-10 09:01:29 +0000
commitfc1c62a3a68bc95404c2d2a3ae72318ed6873b98 (patch)
tree4c979429eed64d46fc99bc1b95f4fd3d192a8d5e /filescan-utils.h
parent5811a53c29db2ee703b9eb5b6b303287a65f3f04 (diff)
Use binding version to handle dynapi
Use binding version to define dynamic api debug messages function. It is also cleaner to define binding version directly into repository cmake than into a header like before this commit. Change-Id: Ia14f635a7a2cec05c29f27ee4ce645711a8574a4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'filescan-utils.h')
-rw-r--r--filescan-utils.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/filescan-utils.h b/filescan-utils.h
index 906d92c..3e1dba6 100644
--- a/filescan-utils.h
+++ b/filescan-utils.h
@@ -26,16 +26,11 @@
extern "C" {
#endif
-// hack waiting for official V3 API
-#ifdef USE_API_DYN
- #define AFB_BINDING_VERSION 0
- #define AFB_BINDING_WANT_DYNAPI
- #include <afb/afb-binding.h>
+#include <afb/afb-binding.h>
+
+#if((AFB_BINDING_VERSION == 0 || AFB_BINDING_VERSION == 3) && defined(AFB_BINDING_WANT_DYNAPI))
extern afb_dynapi *AFB_default;
#define AFB_DEBUG(...) AFB_DYNAPI_DEBUG(AFB_default, __VA_ARGS__)
-#else
- #define AFB_BINDING_VERSION 2
- #include <afb/afb-binding.h>
#endif
#include <json-c/json.h>