summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-binding.hpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-12-13 09:30:54 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2018-12-13 11:45:30 +0100
commit204b92c360102c767f43e1a758e985adb6704512 (patch)
tree7e1d3a9dd391ede9746c4c9295726986006e4cdf /ahl-binding/ahl-binding.hpp
parent7f7005e271702093fe4420013d4cb650dd21ebc3 (diff)
Added volume_changed event plus verbs
New subscribe and unsubscribe verbs to get the volume_changed event. Bug: SPEC-2053 Change-Id: Iedeb542c7c3d880f0d6294b0310d2662e0ac11f1 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/ahl-binding.hpp')
-rw-r--r--ahl-binding/ahl-binding.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ahl-binding/ahl-binding.hpp b/ahl-binding/ahl-binding.hpp
index 0e7bd63..24f4acb 100644
--- a/ahl-binding/ahl-binding.hpp
+++ b/ahl-binding/ahl-binding.hpp
@@ -40,6 +40,7 @@ class ahl_binding_t
private:
afb_api_t handle_;
+ afb_event_t volume_changed_;
std::vector<role_t> roles_;
explicit ahl_binding_t();
@@ -60,7 +61,10 @@ public:
int preinit(afb_api_t handle);
int init();
void event(std::string name, json_object* arg);
- void get_roles(afb_req_t req);
+ void get_roles(afb_req_t req) const;
+ void subscribe(afb_req_t req) const;
+ void unsubscribe(afb_req_t req) const;
+ int emit_volume_changed(const std::string& role, int volume) const;
const std::vector<role_t> roles() const;
afb_api_t handle() const;