AccountHandler Class Reference

#include <accounthandler.hpp>

Inheritance diagram for AccountHandler:

ConnectionHandler List of all members.

Detailed Description

Manages the data stored in user accounts and provides a reliable interface for working with an account.

The account handler class can be used as a link to a working account handle, and can be assigned to a user persistently as an interface between the computer and account. (Messages from the user can be traced to this account through the NetComputer structure, then processed here with the persistent stored data).

Definition at line 40 of file accounthandler.hpp.

Public Member Functions

 AccountHandler ()
 Constructor.
bool startListen (enet_uint16 port)
 Start the handler.
void tokenMatched (AccountClient *computer, int accountID)
 Combines a client with it's account.
void deletePendingClient (AccountClient *computer)
 Deletes a pending client's data.
void deletePendingConnect (int accountID)
 Deletes a pending connection's data.

Public Attributes

TokenCollector< AccountHandler,
AccountClient *, int > 
mTokenCollector
 TokenCollector, used to login a client without the client having to send username and password a second time.

Protected Member Functions

void processMessage (NetComputer *computer, MessageIn &message)
 Process account related messages.
NetComputercomputerConnected (ENetPeer *peer)
 Called when a computer connects to the server.
void computerDisconnected (NetComputer *comp)
 Called when a computer disconnects from the server.
void handleLoginMessage (AccountClient &computer, MessageIn &msg)
void handleLogoutMessage (AccountClient &computer)
void handleReconnectMessage (AccountClient &computer, MessageIn &msg)
void handleRegisterMessage (AccountClient &computer, MessageIn &msg)
void handleUnregisterMessage (AccountClient &computer, MessageIn &msg)
void handleEmailChangeMessage (AccountClient &computer, MessageIn &msg)
void handleEmailGetMessage (AccountClient &computer)
void handlePasswordChangeMessage (AccountClient &computer, MessageIn &msg)
void handleCharacterCreateMessage (AccountClient &computer, MessageIn &msg)
void handleCharacterSelectMessage (AccountClient &computer, MessageIn &msg)
void handleCharacterDeleteMessage (AccountClient &computer, MessageIn &msg)


Constructor & Destructor Documentation

AccountHandler::AccountHandler  ) 
 

Constructor.

Definition at line 44 of file accounthandler.cpp.


Member Function Documentation

NetComputer * AccountHandler::computerConnected ENetPeer *  peer  )  [protected, virtual]
 

Called when a computer connects to the server.

Initialize an object derived of NetComputer.

Implements ConnectionHandler.

Definition at line 57 of file accounthandler.cpp.

void AccountHandler::computerDisconnected NetComputer comp  )  [protected, virtual]
 

Called when a computer disconnects from the server.

Note: After returning from this method the NetComputer reference is no longer guaranteed to be valid.

Implements ConnectionHandler.

Definition at line 63 of file accounthandler.cpp.

void AccountHandler::deletePendingClient AccountClient computer  ) 
 

Deletes a pending client's data.

(Needed for TokenCollector)

Definition at line 775 of file accounthandler.cpp.

void AccountHandler::deletePendingConnect int  accountID  ) 
 

Deletes a pending connection's data.

(Needed for TokenCollector)

Definition at line 786 of file accounthandler.cpp.

void AccountHandler::handleCharacterCreateMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 500 of file accounthandler.cpp.

void AccountHandler::handleCharacterDeleteMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 692 of file accounthandler.cpp.

void AccountHandler::handleCharacterSelectMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 633 of file accounthandler.cpp.

void AccountHandler::handleEmailChangeMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 408 of file accounthandler.cpp.

void AccountHandler::handleEmailGetMessage AccountClient computer  )  [protected]
 

Definition at line 445 of file accounthandler.cpp.

void AccountHandler::handleLoginMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 162 of file accounthandler.cpp.

void AccountHandler::handleLogoutMessage AccountClient computer  )  [protected]
 

Definition at line 241 of file accounthandler.cpp.

void AccountHandler::handlePasswordChangeMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 464 of file accounthandler.cpp.

void AccountHandler::handleReconnectMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 266 of file accounthandler.cpp.

void AccountHandler::handleRegisterMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 281 of file accounthandler.cpp.

void AccountHandler::handleUnregisterMessage AccountClient computer,
MessageIn msg
[protected]
 

Definition at line 356 of file accounthandler.cpp.

void AccountHandler::processMessage NetComputer comp,
MessageIn message
[protected, virtual]
 

Process account related messages.

Account handler takes care of determining the current step in the account process, be it creation, setup, or login.

Implements ConnectionHandler.

Definition at line 80 of file accounthandler.cpp.

bool AccountHandler::startListen enet_uint16  port  ) 
 

Start the handler.

Reimplemented from ConnectionHandler.

Definition at line 50 of file accounthandler.cpp.

void AccountHandler::tokenMatched AccountClient computer,
int  accountID
 

Combines a client with it's account.

(Needed for TokenCollector)

Definition at line 736 of file accounthandler.cpp.


Member Data Documentation

TokenCollector<AccountHandler, AccountClient*, int> AccountHandler::mTokenCollector
 

TokenCollector, used to login a client without the client having to send username and password a second time.

Definition at line 80 of file accounthandler.hpp.


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 15:39:18 2007 for TMW Server by  doxygen 1.3.9.1