1 | #pragma once |
2 | |
3 | /// @file |
4 | /// @brief The room name state event. |
5 | |
6 | #if __has_include(<nlohmann/json_fwd.hpp>) |
7 | #include <nlohmann/json_fwd.hpp> |
8 | #else |
9 | #include <nlohmann/json.hpp> |
10 | #endif |
11 | |
12 | #include <string> |
13 | |
14 | namespace mtx { |
15 | //! Namespace for all events. |
16 | namespace events { |
17 | //! Events, that can be used as a state event. |
18 | namespace state { |
19 | |
20 | //! Content of the `m.room.name` event. |
21 | struct Name |
22 | { |
23 | //! The name of the room. |
24 | std::string name; |
25 | |
26 | friend void from_json(const nlohmann::json &obj, Name &event); |
27 | friend void to_json(nlohmann::json &obj, const Name &event); |
28 | }; |
29 | |
30 | } // namespace state |
31 | } // namespace events |
32 | } // namespace mtx |
33 | |