From 1221231dc656368bf1595b7827ad3a48f38b33b7 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 25 Aug 2006 19:47:33 +0000 Subject: Applied patch by Rogier, addressing TODOs in MessageOut and NetComputer. --- src/accountclient.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/accountclient.h') diff --git a/src/accountclient.h b/src/accountclient.h index 5c36f020..c3ab8a44 100644 --- a/src/accountclient.h +++ b/src/accountclient.h @@ -25,6 +25,7 @@ #define _TMWSERV_ACCOUNTCLIENT_H_ #include "netcomputer.h" +#include "account.h" #include @@ -34,13 +35,13 @@ class AccountHandler; * A connected computer that can have an account and character associated with * it. */ -class AccountClient: public NetComputer +class AccountClient : public NetComputer { public: /** * Constructor. */ - AccountClient(AccountHandler *accountHandler, ENetPeer *peer); + AccountClient(ENetPeer *peer); /** * Destructor. @@ -50,32 +51,38 @@ class AccountClient: public NetComputer /** * Set the account associated with the connection */ - void setAccount(AccountPtr acc); + void + setAccount(AccountPtr acc); /** * Unset the account associated with the connection */ - void unsetAccount(); + void + unsetAccount(); /** * Get account associated with the connection. */ - AccountPtr getAccount() { return mAccountPtr; } + AccountPtr + getAccount() const { return mAccountPtr; } /** * Set the selected character associated with connection. */ - void setCharacter(PlayerPtr ch); + void + setCharacter(PlayerPtr ch); /** * Deselect the character associated with connection. */ - void unsetCharacter(); + void + unsetCharacter(); /** * Get character associated with the connection */ - PlayerPtr getCharacter() { return mCharacterPtr; } + PlayerPtr + getCharacter() const { return mCharacterPtr; } private: /** Account associated with connection */ -- cgit v1.2.3-60-g2f50