diff options
author | B3n30 <bene_thomas@web.de> | 2017-08-19 19:14:33 +0200 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2017-08-19 19:14:33 +0200 |
commit | 5d0a1e7efddf234234d54fe97395f6975f8d1a28 (patch) | |
tree | cef0c9114f39af64c2971509fb2d0197c73cc155 /src/network/room.h | |
parent | Merge pull request #2881 from MerryMage/dsp-firm-check (diff) | |
download | yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.gz yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.bz2 yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.lz yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.xz yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.zst yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.zip |
Diffstat (limited to '')
-rw-r--r-- | src/network/room.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/network/room.h b/src/network/room.h index 65b0d008a..8285a4d0c 100644 --- a/src/network/room.h +++ b/src/network/room.h @@ -7,6 +7,7 @@ #include <array> #include <memory> #include <string> +#include <vector> #include "common/common_types.h" namespace Network { @@ -21,6 +22,11 @@ struct RoomInformation { u32 member_slots; ///< Maximum number of members in this room }; +struct GameInfo { + std::string name{""}; + u64 id{0}; +}; + using MacAddress = std::array<u8, 6>; /// A special MAC address that tells the room we're joining to assign us a MAC address /// automatically. @@ -34,7 +40,7 @@ enum RoomMessageTypes : u8 { IdJoinRequest = 1, IdJoinSuccess, IdRoomInformation, - IdSetGameName, + IdSetGameInfo, IdWifiPacket, IdChatMessage, IdNameCollision, @@ -51,6 +57,12 @@ public: Closed, ///< The room is not opened and can not accept connections. }; + struct Member { + std::string nickname; ///< The nickname of the member. + GameInfo game_info; ///< The current game of the member + MacAddress mac_address; ///< The assigned mac address of the member. + }; + Room(); ~Room(); @@ -65,6 +77,11 @@ public: const RoomInformation& GetRoomInformation() const; /** + * Gets a list of the mbmers connected to the room. + */ + std::vector<Member> GetRoomMemberList() const; + + /** * Creates the socket for this room. Will bind to default address if * server is empty string. */ |