| 1 | #pragma once |
| 2 | |
| 3 | /// @file |
| 4 | /// @brief Empty responses returned by different endpoints. |
| 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 "mtx/identifiers.hpp" |
| 13 | |
| 14 | namespace mtx { |
| 15 | namespace responses { |
| 16 | |
| 17 | //! Used to represent empty responses |
| 18 | struct Empty |
| 19 | { |
| 20 | friend void from_json(const nlohmann::json &, Empty &); |
| 21 | }; |
| 22 | |
| 23 | //! The response for a logout. |
| 24 | using Logout = Empty; |
| 25 | //! The response after changing your display name. |
| 26 | using DisplayName = Empty; |
| 27 | //! The response after inviting a user to a room. |
| 28 | using RoomInvite = Empty; |
| 29 | } |
| 30 | } |
| 31 | |