diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-14 02:27:23 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-14 02:27:23 -0500 |
commit | 409af292af53cce77615011667d506bc2b40692a (patch) | |
tree | 0ca3e2d168a157fa2c69c9e89d9cc8e2edff1927 /state.hpp | |
parent | 2257ff979854867a9aff32aa7d07769bce5edff8 (diff) | |
parent | 108002248c0739078302e00d5ca224a44b93ea56 (diff) | |
download | abaddon-portaudio-409af292af53cce77615011667d506bc2b40692a.tar.gz abaddon-portaudio-409af292af53cce77615011667d506bc2b40692a.zip |
Merge branch 'master' into store
Diffstat (limited to 'state.hpp')
-rw-r--r-- | state.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/state.hpp b/state.hpp new file mode 100644 index 0000000..230808f --- /dev/null +++ b/state.hpp @@ -0,0 +1,27 @@ +#include <vector> +#include <nlohmann/json.hpp> +#include "discord/snowflake.hpp" + +struct ExpansionState; +struct ExpansionStateRoot { + std::map<Snowflake, ExpansionState> 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); +}; |