diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
commit | d4f32a38fd498c180d562ced38a9129e0abf2252 (patch) | |
tree | e655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/net/loginhandler.h | |
parent | 6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff) | |
download | mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.gz mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.bz2 mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.xz mana-d4f32a38fd498c180d562ced38a9129e0abf2252.zip |
Merge login state machines for both clients
Also do some cleanup and refactoring of related code.
Diffstat (limited to 'src/net/loginhandler.h')
-rw-r--r-- | src/net/loginhandler.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index fdd57689..26dfb53b 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -24,13 +24,29 @@ #include "logindata.h" +#include "net/serverinfo.h" +#include "net/worldinfo.h" + #include <iosfwd> +#include <vector> namespace Net { class LoginHandler { public: + virtual void setServer(const ServerInfo &server) + { mServer = server; } + + virtual ServerInfo getServer() + { return mServer; } + + virtual void connect() = 0; + + virtual bool isConnected() = 0; + + virtual void disconnect() = 0; + virtual void loginAccount(LoginData *loginData) = 0; virtual void changeEmail(const std::string &email) = 0; @@ -39,12 +55,17 @@ class LoginHandler const std::string &oldPassword, const std::string &newPassword) = 0; - virtual void chooseServer(int server) = 0; + virtual void chooseServer(unsigned int server) = 0; virtual void registerAccount(LoginData *loginData) = 0; virtual void unregisterAccount(const std::string &username, const std::string &password) = 0; + + virtual Worlds getWorlds() = 0; + + protected: + ServerInfo mServer; }; } // namespace Net |