summaryrefslogtreecommitdiff
path: root/src/accountclient.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-25 19:47:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-25 19:47:33 +0000
commit1221231dc656368bf1595b7827ad3a48f38b33b7 (patch)
treed0b5691a3a027d46d57364f86727baaecce5f4e0 /src/accountclient.h
parent87eecbfc7c7ac72cb1a57ba83e967c655213d116 (diff)
downloadmanaserv-1221231dc656368bf1595b7827ad3a48f38b33b7.tar.gz
manaserv-1221231dc656368bf1595b7827ad3a48f38b33b7.tar.bz2
manaserv-1221231dc656368bf1595b7827ad3a48f38b33b7.tar.xz
manaserv-1221231dc656368bf1595b7827ad3a48f38b33b7.zip
Applied patch by Rogier, addressing TODOs in MessageOut and NetComputer.
Diffstat (limited to 'src/accountclient.h')
-rw-r--r--src/accountclient.h23
1 files changed, 15 insertions, 8 deletions
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 <enet/enet.h>
@@ -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 */