aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-05-17 14:51:32 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-05-17 17:58:26 +0200
commitc3a60d631a6168b6f0d69daa6659c566eeb2b643 (patch)
treeeea7479addec2dd6930d3d61714add86e8e73a3c
parent5d25d9ea3a06f38ffa964ca94165d81fbc6194e1 (diff)
Add AFB macros
This adds a macro to be able to retrieve the rootdir fd from the binding using V2 or DynAPI version the same way. Change-Id: I4e9e805b729118944f07ccedae6cccc6b950058b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--ctl-lib/ctl-plugin.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ctl-lib/ctl-plugin.h b/ctl-lib/ctl-plugin.h
index 87261c5..ce310e4 100644
--- a/ctl-lib/ctl-plugin.h
+++ b/ctl-lib/ctl-plugin.h
@@ -74,11 +74,14 @@ extern "C" {
#define AFB_RequireApi(api, ...) afb_dynapi_require_api(api, __VA_ARGS__)
+
#define AFB_GetEventLoop(api) afb_dynapi_get_event_loop(api)
+ #define AFB_RootDirGetFD(api) afb_dynapi_rootdir_get_fd(api)
#define AFB_ClientCtxSet(request, replace, createCB, freeCB, handle) afb_request_context(request, replace, createCB, freeCB, handle)
#define AFB_ClientCtxClear(request) afb_request_context_clear(request)
+ #define AFB_ReqSetLOA(request, level) afb_request_session_set_LOA(request, level)
typedef struct {
const char *verb; /* name of the verb, NULL only at end of the array */
@@ -130,6 +133,9 @@ extern "C" {
#define AFB_RequireApi(api, ...) afb_daemon_require_api(__VA_ARGS__)
#define AFB_GetEventLoop(api) afb_daemon_get_event_loop()
+ #define AFB_RootDirGetFD(api) afb_daemon_rootdir_get_fd()
+
+ #define AFB_ReqSetLOA(request, level) afb_req_session_set_LOA(request, level)
static inline void* AFB_ClientCtxSet(afb_req request, int replace, void *(*create_context)(void *closure), void (*free_context)(void*), void *closure)
{