From 77677e205ebf1a6c47114ac1d449fc78be250c6d Mon Sep 17 00:00:00 2001 From: B3n30 Date: Sat, 8 Jul 2017 18:31:35 +0200 Subject: Network: Send JoinRequest and handle the answer in RoomMember --- src/network/room_member.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/network/room_member.h') diff --git a/src/network/room_member.h b/src/network/room_member.h index 89ec6ae5a..f8bdbaea8 100644 --- a/src/network/room_member.h +++ b/src/network/room_member.h @@ -6,6 +6,7 @@ #include #include +#include #include "common/common_types.h" #include "network/room.h" @@ -31,6 +32,14 @@ public: CouldNotConnect ///< The room is not responding to a connection attempt }; + struct MemberInformation { + std::string nickname; ///< Nickname of the member. + std::string game_name; ///< Name of the game they're currently playing, or empty if they're + /// not playing anything. + MacAddress mac_address; ///< MAC address associated with this member. + }; + using MemberList = std::vector; + RoomMember(); ~RoomMember(); @@ -39,6 +48,15 @@ public: */ State GetState() const; + /** + * Returns information about the members in the room we're currently connected to. + */ + const MemberList& GetMemberInformation() const; + /** + * Returns information about the room we're currently connected to. + */ + RoomInformation GetRoomInformation() const; + /** * Returns whether we're connected to a server or not. */ -- cgit v1.2.3