[Gcblue-commits] gcb_wx/include/network tcMultiplayerInterface.h,1.14,1.15
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-05-09 20:41:01
|
Update of /cvsroot/gcblue/gcb_wx/include/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1643/include/network Modified Files: tcMultiplayerInterface.h Log Message: Index: tcMultiplayerInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMultiplayerInterface.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcMultiplayerInterface.h 8 May 2004 21:25:25 -0000 1.14 --- tcMultiplayerInterface.h 9 May 2004 20:40:21 -0000 1.15 *************** *** 38,41 **** --- 38,42 ---- class wxEvtHandler; class tcStream; + class tcConsoleBox; BEGIN_NAMESPACE(network) *************** *** 78,84 **** static tcMultiplayerInterface* Get(); void AddMessageHandler(int messageId, tcMessageHandler* handler); void BroadcastControlMessage(int messageCode); ! std::string GetChatText(); int GetConnectionId(unsigned connectionIdx); std::string GetConnectionStatus(unsigned connectionIdx); --- 79,86 ---- static tcMultiplayerInterface* Get(); + void AddChatSubscriber(tcConsoleBox* subscriber); void AddMessageHandler(int messageId, tcMessageHandler* handler); void BroadcastControlMessage(int messageCode); ! //std::string GetChatText(); int GetConnectionId(unsigned connectionIdx); std::string GetConnectionStatus(unsigned connectionIdx); *************** *** 96,99 **** --- 98,102 ---- void ProcessCommandClient(int connectionId, std::string text); void ProcessCommandServer(std::string text); + void RemoveChatSubscriber(tcConsoleBox* subscriber); void SendChatText(int destination, std::string message); void SendControlMessage(int destination, int messageCode, int param = 0); *************** *** 108,111 **** --- 111,115 ---- tcNetworkInterface *networkInterface; std::queue<std::string> chatText; ///< chat text to display + std::vector<tcConsoleBox*> chatSubscribers; std::string myName; ///< name to identify player std::map<int, tcPlayerStatus> playerInfo; ///< map of (connection id, tcPlayerStatus) pairs *************** *** 116,121 **** void ClearMessageMap(); bool IsNewPlayer(int id); - void ProcessChatMessage(int connectionId, unsigned messageSize, const unsigned char *data); void ProcessMessage(int messageId, int connectionId, unsigned messageSize, const unsigned char *data); --- 120,125 ---- void ClearMessageMap(); + void DistributeChatText(); bool IsNewPlayer(int id); void ProcessMessage(int messageId, int connectionId, unsigned messageSize, const unsigned char *data); |