[Gcblue-commits] gcb_wx/include/network tcAuthenticationMessageHandler.h,NONE,1.1 tcMultiplayerInter
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-05-06 23:57:25
|
Update of /cvsroot/gcblue/gcb_wx/include/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11073/include/network Modified Files: tcMultiplayerInterface.h tcNetworkInterface.h Added Files: tcAuthenticationMessageHandler.h Log Message: added player name to connection status, update rates are slower for non-controlled objects, non-controlled objects now display as green, added chat text popup Index: tcMultiplayerInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMultiplayerInterface.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** tcMultiplayerInterface.h 5 May 2005 02:14:19 -0000 1.23 --- tcMultiplayerInterface.h 6 May 2005 23:57:15 -0000 1.24 *************** *** 118,122 **** const std::list<int>& GetConnectionList() const; ! std::string GetConnectionStatus(int connectionId); wxEvtHandler* GetEvtHandler() const; const std::string& GetName() const; --- 118,122 ---- const std::list<int>& GetConnectionList() const; ! const std::string& GetConnectionStatus(int connectionId); wxEvtHandler* GetEvtHandler() const; const std::string& GetName() const; Index: tcNetworkInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcNetworkInterface.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcNetworkInterface.h 17 Apr 2005 22:34:59 -0000 1.11 --- tcNetworkInterface.h 6 May 2005 23:57:15 -0000 1.12 *************** *** 64,68 **** const std::map<int, tcConnectionData*>& GetConnectionMap(); ! std::string GetConnectionStatus(int id); tcMessage* GetMessage(int id); unsigned int GetNumConnections(); --- 64,68 ---- const std::map<int, tcConnectionData*>& GetConnectionMap(); ! const std::string& GetConnectionStatus(int id); tcMessage* GetMessage(int id); unsigned int GetNumConnections(); --- NEW FILE: tcAuthenticationMessageHandler.h --- /** ** @file tcAuthenticationMessageHandler.h */ /* Copyright (C) 2005 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _AUTHENTICATIONMESSAGEHANDLER_H_ #define _AUTHENTICATIONMESSAGEHANDLER_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include <queue> #include <string> #include "network/tcMessageHandler.h" #define BEGIN_NAMESPACE(x) namespace x { #define END_NAMESPACE } BEGIN_NAMESPACE(network) /** * Control message received handler. * Control messages are used to do things like start and pause the game */ class tcAuthenticationMessageHandler : public tcMessageHandler { public: enum { AM_REQUEST = 1, ///< request user name, password hash pair AM_RESPONSE = 2 }; static void CreateAuthenticationRequest(unsigned& messageSize, unsigned char *data); static void CreateAuthenticationResponse(const std::string& username, const std::string& hash, unsigned& messageSize, unsigned char *data); virtual void Handle(int connectionId, unsigned messageSize, const unsigned char *data); tcAuthenticationMessageHandler(); virtual ~tcAuthenticationMessageHandler(); }; END_NAMESPACE #endif |