aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/network/room_member.h
diff options
context:
space:
mode:
authorB3n30 <[email protected]>2017-07-09 12:26:03 +0200
committerB3n30 <[email protected]>2017-07-16 21:29:49 +0200
commit42e57c121896818f9fbde5ddd9b7dbb5b2a267b1 (patch)
treeb3f27a02bc2cda201297c48fb52dfbc0efba326b /src/network/room_member.h
parent35a0b32553a3bb3a7d66694511350fdc2ef698d9 (diff)
downloadyuzu-mainline-42e57c121896818f9fbde5ddd9b7dbb5b2a267b1.tar.gz
yuzu-mainline-42e57c121896818f9fbde5ddd9b7dbb5b2a267b1.zip
Network: Enable sending and receiving chat messages
Diffstat (limited to 'src/network/room_member.h')
-rw-r--r--src/network/room_member.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/room_member.h b/src/network/room_member.h
index d23f5d4b6..693aa4e7f 100644
--- a/src/network/room_member.h
+++ b/src/network/room_member.h
@@ -24,6 +24,12 @@ struct WifiPacket {
uint8_t channel; ///< WiFi channel where this frame was transmitted.
};
+/// Represents a chat message.
+struct ChatEntry {
+ std::string nickname; ///< Nickname of the client who sent this message.
+ std::string message; ///< Body of the message.
+};
+
/**
* This is what a client [person joining a server] would use.
* It also has to be used if you host a game yourself (You'd create both, a Room and a
@@ -88,6 +94,12 @@ public:
void SendWifiPacket(const WifiPacket& packet);
/**
+ * Sends a chat message to the room.
+ * @param message The contents of the message.
+ */
+ void SendChatMessage(const std::string& message);
+
+ /**
* Leaves the current room.
*/
void Leave();