From a51a54bc5979a2491f152abc47ad54e6b63f27c8 Mon Sep 17 00:00:00 2001 From: Dylam De La Torre Date: Tue, 23 Nov 2021 05:21:56 +0100 Subject: Restructure source and resource files (#46) importantly, res is now res/res and css is now res/css --- src/state.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/state.hpp (limited to 'src/state.hpp') diff --git a/src/state.hpp b/src/state.hpp new file mode 100644 index 0000000..230808f --- /dev/null +++ b/src/state.hpp @@ -0,0 +1,27 @@ +#include +#include +#include "discord/snowflake.hpp" + +struct ExpansionState; +struct ExpansionStateRoot { + std::map Children; + + friend void to_json(nlohmann::json &j, const ExpansionStateRoot &m); + friend void from_json(const nlohmann::json &j, ExpansionStateRoot &m); +}; + +struct ExpansionState { + bool IsExpanded; + ExpansionStateRoot Children; + + friend void to_json(nlohmann::json &j, const ExpansionState &m); + friend void from_json(const nlohmann::json &j, ExpansionState &m); +}; + +struct AbaddonApplicationState { + Snowflake ActiveChannel; + ExpansionStateRoot Expansion; + + friend void to_json(nlohmann::json &j, const AbaddonApplicationState &m); + friend void from_json(const nlohmann::json &j, AbaddonApplicationState &m); +}; -- cgit v1.2.3