summaryrefslogtreecommitdiff
path: root/src/network/room_member.h
diff options
context:
space:
mode:
authorGravatar B3n302017-07-08 18:31:35 +0200
committerGravatar B3n302017-07-16 21:29:11 +0200
commit77677e205ebf1a6c47114ac1d449fc78be250c6d (patch)
tree07bce36123f7f2a93560bb9590cc0bcd719cc173 /src/network/room_member.h
parentNetwork: Handle join request in Room (diff)
downloadyuzu-77677e205ebf1a6c47114ac1d449fc78be250c6d.tar.gz
yuzu-77677e205ebf1a6c47114ac1d449fc78be250c6d.tar.xz
yuzu-77677e205ebf1a6c47114ac1d449fc78be250c6d.zip
Network: Send JoinRequest and handle the answer in RoomMember
Diffstat (limited to 'src/network/room_member.h')
-rw-r--r--src/network/room_member.h18
1 files changed, 18 insertions, 0 deletions
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 @@
6 6
7#include <memory> 7#include <memory>
8#include <string> 8#include <string>
9#include <vector>
9#include "common/common_types.h" 10#include "common/common_types.h"
10#include "network/room.h" 11#include "network/room.h"
11 12
@@ -31,6 +32,14 @@ public:
31 CouldNotConnect ///< The room is not responding to a connection attempt 32 CouldNotConnect ///< The room is not responding to a connection attempt
32 }; 33 };
33 34
35 struct MemberInformation {
36 std::string nickname; ///< Nickname of the member.
37 std::string game_name; ///< Name of the game they're currently playing, or empty if they're
38 /// not playing anything.
39 MacAddress mac_address; ///< MAC address associated with this member.
40 };
41 using MemberList = std::vector<MemberInformation>;
42
34 RoomMember(); 43 RoomMember();
35 ~RoomMember(); 44 ~RoomMember();
36 45
@@ -40,6 +49,15 @@ public:
40 State GetState() const; 49 State GetState() const;
41 50
42 /** 51 /**
52 * Returns information about the members in the room we're currently connected to.
53 */
54 const MemberList& GetMemberInformation() const;
55 /**
56 * Returns information about the room we're currently connected to.
57 */
58 RoomInformation GetRoomInformation() const;
59
60 /**
43 * Returns whether we're connected to a server or not. 61 * Returns whether we're connected to a server or not.
44 */ 62 */
45 bool IsConnected() const; 63 bool IsConnected() const;