diff options
author | 2018-12-13 09:30:54 +0100 | |
---|---|---|
committer | 2018-12-20 18:08:01 +0100 | |
commit | df83729280b6540b9a5eb796b404cc70dc1566c4 (patch) | |
tree | b119bbda760f0fb2bdbc85542f4e26eb0aef55b1 /ahl-binding/ahl-binding.hpp | |
parent | 883466bbe9658b597524ef8267081f45bbed4e0b (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.hpp | 6 |
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; |