aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-xreq.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-02-18 14:31:25 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-04-02 09:58:49 +0200
commitec0564bc90b3c63f7e82f09e81db8bd2cfac89a2 (patch)
treeb61f04cc61fb45af20dd594c4eab2f0ae623fc01 /src/afb-xreq.c
parent2ba7c200c6c4844b63f8f707a6f04017661f16ca (diff)
Add conditionnal support of bindings version 2
Bindings version 2 will become legacy soon. This patch allows their removal Change-Id: Iecad3abd0ddd714e5d55c0b935be756a29d1ca37 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-xreq.c')
-rw-r--r--src/afb-xreq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/afb-xreq.c b/src/afb-xreq.c
index f4756a9f..8cc22c3f 100644
--- a/src/afb-xreq.c
+++ b/src/afb-xreq.c
@@ -722,6 +722,7 @@ int afb_xreq_legacy_subcall_sync(struct afb_xreq *xreq, const char *api, const c
return afb_req_x2_subcall_sync_legacy(xreq_to_req_x2(xreq), api, verb, args, result);
}
+#if WITH_LEGACY_BINDING_V1
static int xreq_session_check_apply_v1(struct afb_xreq *xreq, int sessionflags)
{
int loa;
@@ -763,6 +764,7 @@ static int xreq_session_check_apply_v1(struct afb_xreq *xreq, int sessionflags)
return 0;
}
+#endif
static int xreq_session_check_apply_v2(struct afb_xreq *xreq, uint32_t sessionflags, const struct afb_auth *auth)
{
@@ -800,6 +802,7 @@ static int xreq_session_check_apply_v2(struct afb_xreq *xreq, uint32_t sessionfl
return 0;
}
+#if WITH_LEGACY_BINDING_V1
void afb_xreq_call_verb_v1(struct afb_xreq *xreq, const struct afb_verb_desc_v1 *verb)
{
if (!verb)
@@ -808,7 +811,9 @@ void afb_xreq_call_verb_v1(struct afb_xreq *xreq, const struct afb_verb_desc_v1
if (!xreq_session_check_apply_v1(xreq, verb->session))
verb->callback(xreq_to_req_x1(xreq));
}
+#endif
+#if WITH_LEGACY_BINDING_V2
void afb_xreq_call_verb_v2(struct afb_xreq *xreq, const struct afb_verb_v2 *verb)
{
if (!verb)
@@ -817,6 +822,7 @@ void afb_xreq_call_verb_v2(struct afb_xreq *xreq, const struct afb_verb_v2 *verb
if (!xreq_session_check_apply_v2(xreq, verb->session, verb->auth))
verb->callback(xreq_to_req_x1(xreq));
}
+#endif
void afb_xreq_call_verb_v3(struct afb_xreq *xreq, const struct afb_verb_v3 *verb)
{