camino-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Camino-devel] camino/src/common MsgCoder.h MsgCoder.cpp MsgDe...


From: Philippe Fremy
Subject: [Camino-devel] camino/src/common MsgCoder.h MsgCoder.cpp MsgDe...
Date: Thu, 27 Feb 2003 05:23:31 -0500

CVSROOT:        /cvsroot/camino
Module name:    camino
Changes by:     Philippe Fremy <address@hidden> 03/02/27 05:23:31

Modified files:
        src/common     : MsgCoder.h MsgCoder.cpp MsgDecoder.h 
                         MsgDecoder.cpp 

Log message:
        change message name

Patches:
Index: camino/src/common/MsgCoder.cpp
diff -u camino/src/common/MsgCoder.cpp:1.10 camino/src/common/MsgCoder.cpp:1.11
--- camino/src/common/MsgCoder.cpp:1.10 Tue Feb 18 18:13:21 2003
+++ camino/src/common/MsgCoder.cpp      Thu Feb 27 05:23:30 2003
@@ -2,7 +2,7 @@
 **
 ** Camino
 **
-** Version : $Id: MsgCoder.cpp,v 1.10 2003/02/18 23:13:21 pfremy Exp $
+** Version : $Id: MsgCoder.cpp,v 1.11 2003/02/27 10:23:30 pfremy Exp $
 **
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 14/01/2003
@@ -37,12 +37,12 @@
 }
 
 
-void MsgCoder::connectServer( QString playerName )
+void MsgCoder::sendPlayerInfo( QString playerName )
 {
        // Don't forget the spaces between each value
 
 //     *this << ConnectServer << " " << 0 << " " << playerName;
-       *this << ConnectServer << 0 << playerName;
+       *this << PlayerInfo << 0 << playerName;
        
        device()->flush();
 }
Index: camino/src/common/MsgCoder.h
diff -u camino/src/common/MsgCoder.h:1.10 camino/src/common/MsgCoder.h:1.11
--- camino/src/common/MsgCoder.h:1.10   Tue Feb 18 18:13:21 2003
+++ camino/src/common/MsgCoder.h        Thu Feb 27 05:23:30 2003
@@ -3,7 +3,7 @@
 ** Camino
 **
 **
-** Version : $Id: MsgCoder.h,v 1.10 2003/02/18 23:13:21 pfremy Exp $
+** Version : $Id: MsgCoder.h,v 1.11 2003/02/27 10:23:30 pfremy Exp $
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 14/01/2003
 ** Copyright: Pascal Audoux, Philippe Fremy 2003
@@ -53,7 +53,7 @@
 enum NetMsgType {
        FirstMsg = 0,
 
-       ConnectServer,          //! Client connects to server
+       PlayerInfo,                     //! Client connects to server
        ServerInformation,      //! Server returns the information about the 
waiting party (nb of players, version, type of party)
        PlayerConnected,    //! Server informs clients that a new player has 
connected
        TeamIsBeingChosen,      //! 4 players game, servers is currentely 
choosing the team composition
@@ -106,7 +106,7 @@
 
        //! from QTextStream: void setDevice( QIODevice * );
 
-       void connectServer( QString playerName );
+       void sendPlayerInfo( QString playerName );
        void sendMsg( NetMsgSubtype msgLevel, const QString & source, const 
QString & msg );
        void sendTile( Tile::TileType tile );
        void sendTilesForYou( Tile::TileType tile );
Index: camino/src/common/MsgDecoder.cpp
diff -u camino/src/common/MsgDecoder.cpp:1.8 
camino/src/common/MsgDecoder.cpp:1.9
--- camino/src/common/MsgDecoder.cpp:1.8        Tue Feb 18 13:43:20 2003
+++ camino/src/common/MsgDecoder.cpp    Thu Feb 27 05:23:31 2003
@@ -2,7 +2,7 @@
 **
 ** Camino
 **
-** Version : $Id: MsgDecoder.cpp,v 1.8 2003/02/18 18:43:20 pfremy Exp $
+** Version : $Id: MsgDecoder.cpp,v 1.9 2003/02/27 10:23:31 pfremy Exp $
 **
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 15/01/2003
@@ -60,8 +60,8 @@
 //     qDebug("type = %ld subtype = %ld", type, subtype );
 
        switch( _type ) {
-               case ConnectServer:
-                               decodeServerConnect();
+               case PlayerInfo:
+                               decodePlayerInfo();
                                break;
 
                case Msg:
@@ -101,12 +101,12 @@
        };
 }
 
-void MsgDecoder::decodeServerConnect()
+void MsgDecoder::decodePlayerInfo()
 {
  //   qDebug( "MsgDecoder::decodeServerConnect()");
     QString playerName;
     _ts >> playerName;
-    recvServerConnect( playerName );
+    recvPlayerInfo( playerName );
 }
 
 void MsgDecoder::decodeUndoRequest()
Index: camino/src/common/MsgDecoder.h
diff -u camino/src/common/MsgDecoder.h:1.10 camino/src/common/MsgDecoder.h:1.11
--- camino/src/common/MsgDecoder.h:1.10 Tue Feb 18 13:43:20 2003
+++ camino/src/common/MsgDecoder.h      Thu Feb 27 05:23:30 2003
@@ -5,7 +5,7 @@
 ** MsgDecoder.h
 ** Decoder for socket msg
 **
-** Version : $Id: MsgDecoder.h,v 1.10 2003/02/18 18:43:20 pfremy Exp $
+** Version : $Id: MsgDecoder.h,v 1.11 2003/02/27 10:23:30 pfremy Exp $
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 14/01/2003
 ** Copyright: Pascal Audoux, Philippe Fremy 2003
@@ -45,10 +45,8 @@
 
 
 /** comment for the class */
-class MsgDecoder : public QObject
+class MsgDecoder
 {
-       Q_OBJECT
-
 public:
        /** Constructor */
        MsgDecoder( QIODevice * socket = 0L );
@@ -56,7 +54,7 @@
 
        void setDevice( QIODevice * socket );
        
-       virtual void recvServerConnect( QString /* playerName */ ) {}
+       virtual void recvPlayerInfo( QString /* playerName */ ) {}
        virtual void recvMsg( QString /* source */ , QString /* msg */ ) {}
 
        virtual void recvServerInformation();
@@ -87,7 +85,7 @@
        virtual void recvAnotherGameRequest();
        virtual void recvAnotherGameAccept();
 
-public slots:
+public:
        /** call this to tell the Decoder that there is some data to decode
        Typically, you would do:
 
@@ -104,7 +102,7 @@
 
 protected:
        //QString decodeString( int minimumLen );
-       void decodeServerConnect();
+       void decodePlayerInfo();
        void decodeMsg();
        void decodeUndo();
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]