From: Fulup Ar Foll Date: Mon, 23 Oct 2017 16:05:33 +0000 (+0200) Subject: Prepare for future API-V3 X-Git-Tag: 6.99.3~51 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=cabfef0ff81395a2286e11b416ae07f22e335730;p=src%2Flibafb-helpers.git Prepare for future API-V3 --- diff --git a/filescan-utils.c b/filescan-utils.c index 819efb2..7e45133 100644 --- a/filescan-utils.c +++ b/filescan-utils.c @@ -121,6 +121,7 @@ PUBLIC const char *GetBinderName() { return binderName; } +#ifndef USE_API_DYN PUBLIC char *GetBindingDirPath() { // A file description should not be greater than 999.999.999 @@ -142,3 +143,4 @@ PUBLIC char *GetBindingDirPath() return strndup(retdir, sizeof(retdir)); } +#endif diff --git a/filescan-utils.h b/filescan-utils.h index e17867e..940eafd 100644 --- a/filescan-utils.h +++ b/filescan-utils.h @@ -26,8 +26,17 @@ extern "C" { #endif -#define AFB_BINDING_VERSION 2 -#include +// hack waiting for official V3 API +#ifdef USE_API_DYN + #define AFB_BINDING_VERSION dyn + #include + extern afb_dynapi *AFB_default; + #define AFB_DEBUG(...) AFB_DYNAPI_DEBUG(AFB_default, __VA_ARGS__) +#else + #define AFB_BINDING_VERSION 2 + #include +#endif + #include #ifndef PUBLIC