summaryrefslogtreecommitdiffstats
path: root/ahl-binding/interrupt.hpp
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-06-07 15:05:53 +0200
committerStephane Desneux <stephane.desneux@iot.bzh>2018-06-12 16:23:44 +0200
commit9a631c30c9c8792865ce2aa0ec06a1bb5fd16751 (patch)
treee1bd8c4ce3cc408144aedcf0f26fd873d8db8634 /ahl-binding/interrupt.hpp
parent322f8932476eda944c7d3ac65eafde12c69b2ae9 (diff)
Add some policy emulation
Add a very simplistic policy emulation just for demo. The real policy engine will be brought back soon. Change-Id: I6f77c8dc58ba335eabd1a1d858354a84559d9e7f Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/interrupt.hpp')
-rw-r--r--ahl-binding/interrupt.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/ahl-binding/interrupt.hpp b/ahl-binding/interrupt.hpp
new file mode 100644
index 0000000..caf5cda
--- /dev/null
+++ b/ahl-binding/interrupt.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "jsonc_utils.hpp"
+
+class interrupt_t
+{
+private:
+ std::string type_;
+ json_object* args_;
+
+public:
+ explicit interrupt_t() = default;
+ explicit interrupt_t(const interrupt_t&) = default;
+ explicit interrupt_t(interrupt_t&&) = default;
+ ~interrupt_t() = default;
+
+ interrupt_t& operator=(const interrupt_t&) = default;
+ interrupt_t& operator=(interrupt_t&&) = default;
+
+ explicit interrupt_t(json_object* o);
+ interrupt_t& operator<<(json_object* o);
+
+ std::string type() const;
+ json_object* args() const;
+
+ void type(std::string v);
+ void args(json_object* v);
+};