diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-11-15 15:45:30 +0100 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2018-12-13 12:03:13 +0100 |
commit | 22c3fc2ae2ba2125bc3af55ab8e6de4bc4102ac6 (patch) | |
tree | f64b581582c900e3bb5f7ec05285e712dae21292 /ahl-binding/interrupt.hpp | |
parent | 204b92c360102c767f43e1a758e985adb6704512 (diff) |
Fix issues with session and policies
When a policy does a 'ramp-down' on an audio role, it never does the
'ramp-up' when closing the role that triggered the policy.
Also, session handling was very buggy and had to be reworked to allow
the policy to do its job.
Bug: SPEC-1949
Bug: SPEC-1950
Change-Id: I668044201c9addbc185ea953c6e3239abfda91c5
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/interrupt.hpp')
-rw-r--r-- | ahl-binding/interrupt.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ahl-binding/interrupt.hpp b/ahl-binding/interrupt.hpp index caf5cda..c123699 100644 --- a/ahl-binding/interrupt.hpp +++ b/ahl-binding/interrupt.hpp @@ -1,12 +1,19 @@ #pragma once - +#include <vector> +#include <string> +#include <tuple> +#include "afb-binding-common.h" #include "jsonc_utils.hpp" +// Forward declaration +class role_t; + class interrupt_t { private: std::string type_; json_object* args_; + std::vector<std::tuple<std::string, uint32_t>> applied_on_; public: explicit interrupt_t() = default; @@ -25,4 +32,6 @@ public: void type(std::string v); void args(json_object* v); + int apply(afb_req_t req, const role_t& role); + void clear(); }; |