diff options
author | german77 <juangerman-13@hotmail.com> | 2022-07-18 05:53:44 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-07-25 21:59:31 +0200 |
commit | 899c8bb33094f43fbd8df9afb4ca84718ebac87e (patch) | |
tree | 392a54ac863f67b37bdfb006f739e8e840a9ab16 /src/common | |
parent | Address second part of review comments (diff) | |
download | yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.gz yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.bz2 yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.lz yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.xz yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.zst yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.zip |
Diffstat (limited to 'src/common')
-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 { using MacAddress = std::array<u8, 6>; +struct GameInfo { + std::string name{""}; + u64 id{0}; +}; + struct Member { std::string username; std::string nickname; std::string display_name; std::string avatar_url; MacAddress mac_address; - std::string game_name; - u64 game_id; + GameInfo game; }; struct RoomInformation { - std::string name; ///< Name of the server - std::string description; ///< Server description - u32 member_slots; ///< Maximum number of members in this room - u16 port; ///< The port of this room - std::string preferred_game; ///< Game to advertise that you want to play - u64 preferred_game_id; ///< Title ID for the advertised game - std::string host_username; ///< Forum username of the host - bool enable_yuzu_mods; ///< Allow yuzu Moderators to moderate on this room -}; - -struct GameInfo { - std::string name{""}; - u64 id{0}; + std::string name; ///< Name of the server + std::string description; ///< Server description + u32 member_slots; ///< Maximum number of members in this room + u16 port; ///< The port of this room + GameInfo preferred_game; ///< Game to advertise that you want to play + std::string host_username; ///< Forum username of the host + bool enable_yuzu_mods; ///< Allow yuzu Moderators to moderate on this room }; struct Room { @@ -75,8 +73,7 @@ public: */ virtual void SetRoomInformation(const std::string& name, const std::string& description, const u16 port, const u32 max_player, const u32 net_version, - const bool has_password, const std::string& preferred_game, - const u64 preferred_game_id) = 0; + const bool has_password, const GameInfo& preferred_game) = 0; /** * Adds a player information to the data that gets announced * @param nickname The nickname of the player @@ -125,8 +122,8 @@ public: ~NullBackend() = default; void SetRoomInformation(const std::string& /*name*/, const std::string& /*description*/, const u16 /*port*/, const u32 /*max_player*/, const u32 /*net_version*/, - const bool /*has_password*/, const std::string& /*preferred_game*/, - const u64 /*preferred_game_id*/) override {} + const bool /*has_password*/, + const GameInfo& /*preferred_game*/) override {} void AddPlayer(const Member& /*member*/) override {} WebService::WebResult Update() override { return WebService::WebResult{WebService::WebResult::Code::NoWebservice, |