ClientSJ.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Pierre Schmitt, Ludovic Giacomello, Nhi Ly      *
00003  *                                                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef CLIENTSJ_H
00022 #define CLIENTSJ_H
00023 
00024 #include <iostream>
00025 #include <cstdlib>
00026 #include <fstream>
00027 #include <sstream>
00028 #include <termios.h>
00029 
00030 #include "SocketTCP.h"
00031 #include "AffichageGrille.h"
00032 #include "Mutex.h"
00033 
00034 using namespace std;
00035 
00039 class ClientSJ{
00040 public:
00048         ClientSJ(string adresse, unsigned int port,string login);
00049         ~ClientSJ();
00050 private:
00055         void Traitement(string login);
00056 
00060         void SendHello();
00061 
00062         void SendLogin(string login);
00063         void SendRole();
00064         
00068         void TraitementDeplacement();
00069 
00070         unsigned int UintAleat(unsigned int min, unsigned int max);
00071         
00075         Socket *mSocket;
00076 
00080         AffichageGrille *mAG;
00081 
00085         Mutex *mVerrou;
00086 };
00087 
00088 #endif

Generated on Wed Jan 2 14:01:41 2008 for Pacman by  doxygen 1.5.1