summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-binding.hpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-12-18 11:55:58 +0100
committerLoïc Collignon [ IoT.bzh ] <loic.collignon@iot.bzh>2018-12-18 18:17:44 +0000
commit735112ef9923306539023c158d9ff9930f000b6b (patch)
tree8d344a645a220612141132b7b0159f09add241c5 /ahl-binding/ahl-binding.hpp
parent9bbaea899215448ab1985ddb59f326218e75db77 (diff)
Added an 'activerole' verb
Control the currently opened role with the higher priority. Volume changed event nows specify if the corresponding role was the active one when the event was emitted. Bug: SPEC-1313 Change-Id: I87ae89ef03357a3537ada86f1dd3f319d13cbe85 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.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ahl-binding/ahl-binding.hpp b/ahl-binding/ahl-binding.hpp
index 881d906..47c343a 100644
--- a/ahl-binding/ahl-binding.hpp
+++ b/ahl-binding/ahl-binding.hpp
@@ -51,6 +51,7 @@ private:
int update_streams();
void update_stream(std::string hal, std::string stream, std::string deviceuri);
int create_api_verb(role_t* r);
+ role_t* get_active_role();
public:
static ahl_binding_t& instance();
@@ -60,10 +61,11 @@ public:
int preinit(afb_api_t handle);
int init();
void event(std::string name, json_object* arg);
- int emit_volume_changed(const std::string& role, int volume) const;
+ int emit_volume_changed(const std::string& role, int volume);
int parse_roles_config(json_object* o);
void get_roles(afb_req_t req) const;
+ void activerole(afb_req_t req);
void subscribe(afb_req_t req) const;
void unsubscribe(afb_req_t req) const;
};