From 859be35d54fda177a237e0c24bc1eaca76f1936d Mon Sep 17 00:00:00 2001 From: B3n30 Date: Sun, 9 Jul 2017 15:06:02 +0200 Subject: Network: Send the game title --- src/network/room_member.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/network/room_member.h') diff --git a/src/network/room_member.h b/src/network/room_member.h index 693aa4e7f..d874cc5e4 100644 --- a/src/network/room_member.h +++ b/src/network/room_member.h @@ -15,13 +15,13 @@ namespace Network { /// Information about the received WiFi packets. /// Acts as our own 802.11 header. struct WifiPacket { - enum class PacketType { Beacon, Data, Management }; - PacketType type; ///< The type of 802.11 frame, Beacon / Data. - std::vector data; ///< Raw 802.11 frame data, starting at the management frame header - /// for management frames. + enum class PacketType { Beacon, Data, Authentication, AssociationResponse }; + PacketType type; ///< The type of 802.11 frame. + std::vector data; ///< Raw 802.11 frame data, starting at the management frame header + /// for management frames. MacAddress transmitter_address; ///< Mac address of the transmitter. MacAddress destination_address; ///< Mac address of the receiver. - uint8_t channel; ///< WiFi channel where this frame was transmitted. + u8 channel; ///< WiFi channel where this frame was transmitted. }; /// Represents a chat message. @@ -70,6 +70,17 @@ public: * Returns information about the members in the room we're currently connected to. */ const MemberList& GetMemberInformation() const; + + /** + * Returns the nickname of the RoomMember. + */ + const std::string& GetNickname() const; + + /** + * Returns the MAC address of the RoomMember. + */ + const MacAddress& GetMacAddress() const; + /** * Returns information about the room we're currently connected to. */ @@ -99,6 +110,12 @@ public: */ void SendChatMessage(const std::string& message); + /** + * Sends the current game name to the room. + * @param game_name The game name. + */ + void SendGameName(const std::string& game_name); + /** * Leaves the current room. */ -- cgit v1.2.3