diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-06 23:40:55 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-06 23:43:40 +0200 |
commit | 64a37da4cb8d74a29f369e96e8c3669275516394 (patch) | |
tree | caa0eb0d05ab5674b6b6ac822d151aa2585721e8 /src/net/loginhandler.h | |
parent | 610dc30ceecdfe538f71826689630e0f28c278cc (diff) | |
download | mana-64a37da4cb8d74a29f369e96e8c3669275516394.tar.gz mana-64a37da4cb8d74a29f369e96e8c3669275516394.tar.bz2 mana-64a37da4cb8d74a29f369e96e8c3669275516394.tar.xz mana-64a37da4cb8d74a29f369e96e8c3669275516394.zip |
Some cleanup regarding keeping track of gender for eAthena
LoginHandler now owns the world list and the token, instead of having
them as global variables with pointers to the 'sex' member of the token
from the GUI.
Diffstat (limited to 'src/net/loginhandler.h')
-rw-r--r-- | src/net/loginhandler.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index e5a34382..12a0c26f 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -35,16 +35,22 @@ namespace Net { class LoginHandler { public: + /** + * This enum describes options specific to either eAthena or tmwserv. + * By querying for these flags, the GUI can adapt to the current + * server type dynamically. + */ enum OptionalAction { - Unregister = 0x1, - ChangeEmail = 0x2, - SetEmailOnRegister = 0x4 + Unregister = 0x1, + ChangeEmail = 0x2, + SetEmailOnRegister = 0x4, + SetGenderOnRegister = 0x8 }; - virtual void setServer(const ServerInfo &server) + void setServer(const ServerInfo &server) { mServer = server; } - virtual ServerInfo getServer() + ServerInfo getServer() const { return mServer; } virtual void connect() = 0; @@ -53,6 +59,9 @@ class LoginHandler virtual void disconnect() = 0; + /** + * @see OptionalAction + */ virtual int supportedOptionalActions() const = 0; virtual void loginAccount(LoginData *loginData) = 0; @@ -72,7 +81,7 @@ class LoginHandler virtual void unregisterAccount(const std::string &username, const std::string &password) = 0; - virtual Worlds getWorlds() = 0; + virtual Worlds getWorlds() const = 0; protected: ServerInfo mServer; |