summaryrefslogtreecommitdiffstats
path: root/ahl-binding/interrupt.hpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-11-15 15:45:30 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2018-11-19 10:24:01 +0100
commit04f89b1c4f49372aea2f9d1c7e0adad5fb8bd99b (patch)
treed8746fd5f74ba9bb285f5655593456b8e13a7fe1 /ahl-binding/interrupt.hpp
parent14cc9c639e9837f81901297c8163c1c151840300 (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 it's 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.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/ahl-binding/interrupt.hpp b/ahl-binding/interrupt.hpp
index caf5cda..b540d22 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_request* req, const role_t& role);
+ void clear();
};