summaryrefslogtreecommitdiffstats
path: root/ahl-binding/role.hpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-10-19 13:50:35 +0200
committerLoïc Collignon <loic.collignon@iot.bzh>2018-10-22 10:04:42 +0200
commit29f1daa03ca6a664b64ba600e50e4ec949b6cc11 (patch)
tree74da011abe57deb322aa6d07f3d86f23a789217b /ahl-binding/role.hpp
parent9b62cff70a07bebe28e8cd5fb496c7bf5fef04f8 (diff)
Migration to Afb API v3
Migrate the API to get rid of dynapi by using API v3 instead. Also fix possible bugs and memory leaks when startup fails. Bug: SPEC-1546 Change-Id: I7cf8e9454d6910b1258dfe671dedde3b84855fc4 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/role.hpp')
-rw-r--r--ahl-binding/role.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/ahl-binding/role.hpp b/ahl-binding/role.hpp
index 5e64e11..143a717 100644
--- a/ahl-binding/role.hpp
+++ b/ahl-binding/role.hpp
@@ -35,9 +35,9 @@ private:
std::string device_uri_;
bool opened_;
- int apply_policy(afb_request* req);
+ int apply_policy(afb_req_t req);
- void do_mute(afb_request*, bool);
+ void do_mute(afb_req_t, bool);
public:
explicit role_t() = default;
@@ -71,12 +71,12 @@ public:
void device_uri(std::string v);
void priority(int v);
- void invoke(afb_request* r);
+ void invoke(afb_req_t r);
- void open(afb_request* r, json_object* o);
- void close(afb_request* r, json_object* o);
- void volume(afb_request* r, json_object* o);
- void interrupt(afb_request* r, json_object* o);
- void mute(afb_request* r, json_object* o);
- void unmute(afb_request* r, json_object* o);
+ void open(afb_req_t r, json_object* o);
+ void close(afb_req_t r, json_object* o);
+ void volume(afb_req_t r, json_object* o);
+ void interrupt(afb_req_t r, json_object* o);
+ void mute(afb_req_t r, json_object* o);
+ void unmute(afb_req_t r, json_object* o);
};