summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-api.cpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-12-18 11:55:58 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2018-12-20 18:13:14 +0100
commit86a65245de04317a0d8b420f8bcdb08639976082 (patch)
tree5784fc1e34ff3dbb9d25a9899331ec23683f6e62 /ahl-binding/ahl-api.cpp
parentd0fc54659d0f6d5e6110e607f4ee49b52b0387d5 (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-api.cpp')
-rw-r--r--ahl-binding/ahl-api.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ahl-binding/ahl-api.cpp b/ahl-binding/ahl-api.cpp
index c5ade37..7ab3add 100644
--- a/ahl-binding/ahl-api.cpp
+++ b/ahl-binding/ahl-api.cpp
@@ -88,6 +88,15 @@ void ahl_api_get_roles(afb_req_t req)
}
/**
+ * @brief Callback invoked when clients call the verb 'activerole'.
+ * @param[in] req Request to handle.
+ */
+void ahl_api_activerole(afb_req_t req)
+{
+ ahl_binding_t::instance().activerole(req);
+}
+
+/**
* @brief Callback invoked when clients call the verb 'subscribe'.
* @param[in] req Request to handle.
*/