accountclient.hpp

Go to the documentation of this file.
00001 /*
00002  *  The Mana World Server
00003  *  Copyright 2004 The Mana World Development Team
00004  *
00005  *  This file is part of The Mana World.
00006  *
00007  *  The Mana World is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  any later version.
00011  *
00012  *  The Mana World is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with The Mana World; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  *  $Id: accountclient.hpp 3207 2007-03-19 17:33:57Z crush_tmw $
00022  */
00023 
00024 #ifndef _TMWSERV_ACCOUNTCLIENT_H_
00025 #define _TMWSERV_ACCOUNTCLIENT_H_
00026 
00027 #include <enet/enet.h>
00028 
00029 #include "account-server/account.hpp"
00030 #include "account-server/characterdata.hpp"
00031 #include "net/netcomputer.hpp"
00032 
00033 class AccountHandler;
00034 
00035 enum
00036 {
00037     CLIENT_LOGIN = 0,
00038     CLIENT_CONNECTED,
00039     CLIENT_QUEUED
00040 };
00041 
00046 class AccountClient : public NetComputer
00047 {
00048     public:
00052         AccountClient(ENetPeer *peer);
00053 
00057         ~AccountClient();
00058 
00062         void
00063         setAccount(AccountPtr acc);
00064 
00068         void
00069         unsetAccount();
00070 
00074         AccountPtr
00075         getAccount() const { return mAccountPtr; }
00076 
00080         void
00081         setCharacter(CharacterPtr ch);
00082 
00086         void
00087         unsetCharacter();
00088 
00092         CharacterPtr
00093         getCharacter() const { return mCharacterPtr; }
00094 
00095         int status;
00096 
00097     private:
00099         AccountPtr mAccountPtr;
00100 
00102         CharacterPtr mCharacterPtr;
00103 };
00104 
00105 #endif

Generated on Fri Mar 30 15:39:16 2007 for TMW Server by  doxygen 1.3.9.1