From f2487f0b481fae4aa1561e82e8e4aa5b8d0654a0 Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Wed, 15 Mar 2017 02:36:22 +0100 Subject: initial commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5e639061c99b7cc6da3da06ccf19bde683a69e9f Signed-off-by: Loïc Collignon --- src/openxc/command.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 src/openxc/command.hpp (limited to 'src/openxc/command.hpp') diff --git a/src/openxc/command.hpp b/src/openxc/command.hpp new file mode 100755 index 00000000..2c052266 --- /dev/null +++ b/src/openxc/command.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include +#include + +namespace openxc +{ + class command + { + private: + std::string name_; + bool enabled_; + std::string handler_; + public: + std::string name() const; + bool enabled() const; + std::string handler() const; + + void from_json(const nlohmann::json& j); + nlohmann::json to_json() const; + }; + + void to_json(nlohmann::json& j, const command& p); + void from_json(const nlohmann::json& j, command& p); +} -- cgit 1.2.3-korg