diff options
author | Stephane Desneux <stephane.desneux@iot.bzh> | 2018-06-28 22:35:50 +0200 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2018-06-29 10:53:08 +0200 |
commit | 99c48b7bd407f061e22c6a14d94b0f880941e593 (patch) | |
tree | 5814726099b917c33685c1483378f9cc01db30da /ahl-binding/ahl-binding.hpp | |
parent | b20cef25a391b5d6bf46746b2e1156914aa22cba (diff) |
ahl-binding: enable AFB_BINDING_WANT_DYNAPI symbol to be compatible with legacy dynapi calls
Change-Id: I130408705f8052fec0bd6a6a49740922630ecb0c
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'ahl-binding/ahl-binding.hpp')
-rw-r--r-- | ahl-binding/ahl-binding.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ahl-binding/ahl-binding.hpp b/ahl-binding/ahl-binding.hpp index 66fce84..e76d7ef 100644 --- a/ahl-binding/ahl-binding.hpp +++ b/ahl-binding/ahl-binding.hpp @@ -35,6 +35,7 @@ extern "C" { #define AFB_BINDING_VERSION 0 + #define AFB_BINDING_WANT_DYNAPI #include <afb/afb-binding.h> #include <string.h> #include <ctl-config.h> @@ -43,13 +44,13 @@ extern "C" { class ahl_binding_t { using role_action = std::function<void(afb_request*, std::string, std::string, json_object*)>; - + private: afb_dynapi* handle_; std::vector<role_t> roles_; - + explicit ahl_binding_t(); - + void load_static_verbs(); @@ -58,9 +59,9 @@ private: int update_streams(); void update_stream(std::string hal, std::string stream, std::string deviceuri); int create_api_verb(role_t* r); - + void policy_open(afb_request* req, const role_t& role); - + public: static ahl_binding_t& instance(); int preinit(afb_dynapi* handle); |