diff options
Diffstat (limited to 'src/common/announce_multiplayer_room.h')
| -rw-r--r-- | src/common/announce_multiplayer_room.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/common/announce_multiplayer_room.h b/src/common/announce_multiplayer_room.h index 2ff38b6cf..a9e2f89b7 100644 --- a/src/common/announce_multiplayer_room.h +++ b/src/common/announce_multiplayer_room.h | |||
| @@ -15,30 +15,28 @@ namespace AnnounceMultiplayerRoom { | |||
| 15 | 15 | ||
| 16 | using MacAddress = std::array<u8, 6>; | 16 | using MacAddress = std::array<u8, 6>; |
| 17 | 17 | ||
| 18 | struct GameInfo { | ||
| 19 | std::string name{""}; | ||
| 20 | u64 id{0}; | ||
| 21 | }; | ||
| 22 | |||
| 18 | struct Member { | 23 | struct Member { |
| 19 | std::string username; | 24 | std::string username; |
| 20 | std::string nickname; | 25 | std::string nickname; |
| 21 | std::string display_name; | 26 | std::string display_name; |
| 22 | std::string avatar_url; | 27 | std::string avatar_url; |
| 23 | MacAddress mac_address; | 28 | MacAddress mac_address; |
| 24 | std::string game_name; | 29 | GameInfo game; |
| 25 | u64 game_id; | ||
| 26 | }; | 30 | }; |
| 27 | 31 | ||
| 28 | struct RoomInformation { | 32 | struct RoomInformation { |
| 29 | std::string name; ///< Name of the server | 33 | std::string name; ///< Name of the server |
| 30 | std::string description; ///< Server description | 34 | std::string description; ///< Server description |
| 31 | u32 member_slots; ///< Maximum number of members in this room | 35 | u32 member_slots; ///< Maximum number of members in this room |
| 32 | u16 port; ///< The port of this room | 36 | u16 port; ///< The port of this room |
| 33 | std::string preferred_game; ///< Game to advertise that you want to play | 37 | GameInfo preferred_game; ///< Game to advertise that you want to play |
| 34 | u64 preferred_game_id; ///< Title ID for the advertised game | 38 | std::string host_username; ///< Forum username of the host |
| 35 | std::string host_username; ///< Forum username of the host | 39 | bool enable_yuzu_mods; ///< Allow yuzu Moderators to moderate on this room |
| 36 | bool enable_yuzu_mods; ///< Allow yuzu Moderators to moderate on this room | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct GameInfo { | ||
| 40 | std::string name{""}; | ||
| 41 | u64 id{0}; | ||
| 42 | }; | 40 | }; |
| 43 | 41 | ||
| 44 | struct Room { | 42 | struct Room { |
| @@ -75,8 +73,7 @@ public: | |||
| 75 | */ | 73 | */ |
| 76 | virtual void SetRoomInformation(const std::string& name, const std::string& description, | 74 | virtual void SetRoomInformation(const std::string& name, const std::string& description, |
| 77 | const u16 port, const u32 max_player, const u32 net_version, | 75 | const u16 port, const u32 max_player, const u32 net_version, |
| 78 | const bool has_password, const std::string& preferred_game, | 76 | const bool has_password, const GameInfo& preferred_game) = 0; |
| 79 | const u64 preferred_game_id) = 0; | ||
| 80 | /** | 77 | /** |
| 81 | * Adds a player information to the data that gets announced | 78 | * Adds a player information to the data that gets announced |
| 82 | * @param nickname The nickname of the player | 79 | * @param nickname The nickname of the player |
| @@ -125,8 +122,8 @@ public: | |||
| 125 | ~NullBackend() = default; | 122 | ~NullBackend() = default; |
| 126 | void SetRoomInformation(const std::string& /*name*/, const std::string& /*description*/, | 123 | void SetRoomInformation(const std::string& /*name*/, const std::string& /*description*/, |
| 127 | const u16 /*port*/, const u32 /*max_player*/, const u32 /*net_version*/, | 124 | const u16 /*port*/, const u32 /*max_player*/, const u32 /*net_version*/, |
| 128 | const bool /*has_password*/, const std::string& /*preferred_game*/, | 125 | const bool /*has_password*/, |
| 129 | const u64 /*preferred_game_id*/) override {} | 126 | const GameInfo& /*preferred_game*/) override {} |
| 130 | void AddPlayer(const Member& /*member*/) override {} | 127 | void AddPlayer(const Member& /*member*/) override {} |
| 131 | WebService::WebResult Update() override { | 128 | WebService::WebResult Update() override { |
| 132 | return WebService::WebResult{WebService::WebResult::Code::NoWebservice, | 129 | return WebService::WebResult{WebService::WebResult::Code::NoWebservice, |