summaryrefslogtreecommitdiff
path: root/src/net/tmwa/loginhandler.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-28 03:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-28 22:22:17 +0300
commit0cc6167c407c1cf18158ca0e154a3b1cab48853d (patch)
treef1e0fe4300113d3bb969bc72e5712ec84b4e2ab5 /src/net/tmwa/loginhandler.h
parent7b15124d28592ee7b9248c9ff3b19e710c1ce4ee (diff)
downloadplus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.gz
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.bz2
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.xz
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.zip
Extract shared logic from charserverhandler and loginhandler netcode to ea namespace.
Diffstat (limited to 'src/net/tmwa/loginhandler.h')
-rw-r--r--src/net/tmwa/loginhandler.h37
1 files changed, 7 insertions, 30 deletions
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index 8c6b48cc2..1e73d3c99 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -25,8 +25,11 @@
#include "net/loginhandler.h"
+#include "net/ea/loginhandler.h"
+
#include "net/tmwa/messagehandler.h"
-#include "net/tmwa/token.h"
+
+#include "net/ea/token.h"
#include <string>
@@ -41,7 +44,7 @@ class LoginData;
namespace TmwAthena
{
-class LoginHandler : public MessageHandler, public Net::LoginHandler
+class LoginHandler : public MessageHandler, public Ea::LoginHandler
{
public:
LoginHandler();
@@ -59,46 +62,20 @@ class LoginHandler : public MessageHandler, public Net::LoginHandler
int supportedOptionalActions() const
{ return SetGenderOnRegister; }
- bool isRegistrationEnabled();
-
- void getRegistrationDetails();
-
unsigned int getMaxPasswordLength() const
{ return 25; }
- void loginAccount(LoginData *loginData);
-
- void logout();
-
- void changeEmail(const std::string &email);
-
void changePassword(const std::string &username,
const std::string &oldPassword,
const std::string &newPassword);
- void chooseServer(unsigned int server);
+ ServerInfo *getCharServer();
- void registerAccount(LoginData *loginData);
-
- void unregisterAccount(const std::string &username,
- const std::string &password);
-
- Worlds getWorlds() const;
-
- void clearWorlds();
-
- const Token &getToken() const
- { return mToken; }
+ void processServerVersion(Net::MessageIn &msg);
private:
void sendLoginRegister(const std::string &username,
const std::string &password);
-
- bool mVersionResponse;
- bool mRegistrationEnabled;
- std::string mUpdateHost;
- Worlds mWorlds;
- Token mToken;
};
} // namespace TmwAthena