Página principal | Lista alfabética | Lista de componentes | Lista de archivos | Miembros de las clases | Archivos de los miembros | Páginas relacionadas

Mensajero.hpp

Ir a la documentación de este archivo.
00001 
00006 /*
00007    MUnDoCAAD MUD Engine
00008    Copyright (C) 2002-2005 José Manuel Ferrer Ortiz
00009 
00010    *****************************************************************************
00011    *                                                                           *
00012    *  This program is free software; you can redistribute it and/or modify it  *
00013    *  under the terms of the GNU General Public License version 2, as          *
00014    *  published by the Free Software Foundation.                               *
00015    *                                                                           *
00016    *  This program is distributed in the hope that it will be useful, but      *
00017    *  WITHOUT ANY WARRANTY; without even the implied warranty of               *
00018    *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU         *
00019    *  General Public License version 2 for more details.                       *
00020    *                                                                           *
00021    *  You should have received a copy of the GNU General Public License        *
00022    *  version 2 along with this program; if not, write to the Free Software    *
00023    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  *
00024    *                                                                           *
00025    *****************************************************************************
00026 */
00027 
00028 
00029 #ifndef _MENSAJERO_HPP
00030 #define _MENSAJERO_HPP
00031 
00032 
00033 #include <QHash>
00034 
00035 
00036 // Estados de un canal:
00038 #define ESTADO_USUARIO   0
00039 
00040 #define ESTADO_CLAVE     1
00041 
00042 #define ESTADO_PERSONAJE 2
00043 
00044 #define ESTADO_DENTRO    3
00045 
00046 
00048 class Mensajero
00049 {
00050   public:
00051     Mensajero  ();  // Constructor
00052     ~Mensajero ();  // Destructor
00053 
00054     void EliminaCanal (const int desc);
00055     void EnviaMensaje (const QString &receptor, const QString &mensaje);
00056     void NuevoCanal   (const int desc);
00057     void NuevaLinea   (const int desc, const QString &linea);
00058 
00059   private:
00066     struct Canal
00067     {
00069       int descriptor;
00070 
00072       QString nom_usuario;
00074       QString nom_personaje;
00075 
00077       unsigned char num_fallos;
00078 
00080       char estado;
00081     };
00082 
00084     QHash<int, Canal> canales;
00085 };
00086 
00087 
00088 #endif  // _MENSAJERO_HPP

Generado el Tue Nov 29 01:04:33 2005 para MUnDoCAAD MUD Engine por  doxygen 1.4.4