diff options
author | Tametomo <irarice@gmail.com> | 2009-05-05 07:11:44 -0600 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-07 01:18:05 +0200 |
commit | 67f53660db85c2f325472701517e04c446ec8ed4 (patch) | |
tree | 1f04d3e4ed3b636cfc30a377fb55e7191ff72b08 /src/net | |
parent | 504222b812b41d37b5a1b28393f66fd292bf9f87 (diff) | |
download | mana-67f53660db85c2f325472701517e04c446ec8ed4.tar.gz mana-67f53660db85c2f325472701517e04c446ec8ed4.tar.bz2 mana-67f53660db85c2f325472701517e04c446ec8ed4.tar.xz mana-67f53660db85c2f325472701517e04c446ec8ed4.zip |
Moved two files which held net data into the net folder. Considering
their function, this is a much better place to put them.
Signed-off-by: Tametomo <irarice@gmail.com>
Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/logouthandler.cpp | 4 | ||||
-rw-r--r-- | src/net/logindata.h | 74 | ||||
-rw-r--r-- | src/net/serverinfo.h | 36 | ||||
-rw-r--r-- | src/net/tmwserv/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwserv/loginhandler.cpp | 2 |
7 files changed, 117 insertions, 7 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index c1d84265..b28961b6 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -24,12 +24,12 @@ #include "net/ea/network.h" #include "net/ea/protocol.h" +#include "net/logindata.h" #include "net/messagein.h" #include "net/messageout.h" #include "game.h" #include "log.h" -#include "logindata.h" #include "main.h" #include "gui/charcreatedialog.h" diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index b657bb1c..44eabe46 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -23,13 +23,13 @@ #include "net/ea/protocol.h" +#include "net/logindata.h" #include "net/messagein.h" #include "net/messageout.h" +#include "net/serverinfo.h" #include "log.h" -#include "logindata.h" #include "main.h" -#include "serverinfo.h" #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/net/ea/logouthandler.cpp b/src/net/ea/logouthandler.cpp index 4986fd4a..7de87c6a 100644 --- a/src/net/ea/logouthandler.cpp +++ b/src/net/ea/logouthandler.cpp @@ -23,13 +23,13 @@ #include "net/ea/protocol.h" +#include "net/logindata.h" #include "net/messagein.h" #include "net/messageout.h" +#include "net/serverinfo.h" #include "log.h" -#include "logindata.h" #include "main.h" -#include "serverinfo.h" #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/net/logindata.h b/src/net/logindata.h new file mode 100644 index 00000000..4cf989cb --- /dev/null +++ b/src/net/logindata.h @@ -0,0 +1,74 @@ +/* + * The Mana World + * Copyright (C) 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef LOGINDATA_H +#define LOGINDATA_H + +#include <string> + +#include "being.h" + +struct LoginData +{ + std::string username; + std::string password; + std::string newPassword; + std::string hostname; + std::string updateHost; +#ifdef TMWSERV_SUPPORT + std::string email; + std::string newEmail; +#endif + short port; + +#ifdef EATHENA_SUPPORT + int account_ID; + int session_ID1; + int session_ID2; + Gender sex; +#endif + + bool remember; /**< Whether to store the username and host. */ + bool registerLogin; /**< Whether an account is being registered. */ + + void clear() + { + username.clear(); + password.clear(); + newPassword.clear(); + hostname.clear(); + updateHost.clear(); +#ifdef TMWSERV_SUPPORT + email.clear(); + newEmail.clear(); +#endif + port = 0; + +#ifdef EATHENA_SUPPORT + account_ID = 0; + session_ID1 = 0; + session_ID2 = 0; + sex = GENDER_UNSPECIFIED; +#endif + } +}; + +#endif // LOGINDATA_H diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h new file mode 100644 index 00000000..c38d13c7 --- /dev/null +++ b/src/net/serverinfo.h @@ -0,0 +1,36 @@ +/* + * The Mana World + * Copyright (C) 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SERVERINFO_ +#define SERVERINFO_ + +#include <string> + +struct SERVER_INFO +{ + int address; + short port; + std::string name; + short online_users; + std::string updateHost; +}; + +#endif diff --git a/src/net/tmwserv/charserverhandler.cpp b/src/net/tmwserv/charserverhandler.cpp index 273c2d8f..7b74904f 100644 --- a/src/net/tmwserv/charserverhandler.cpp +++ b/src/net/tmwserv/charserverhandler.cpp @@ -27,12 +27,12 @@ #include "net/tmwserv/accountserver/accountserver.h" #include "net/tmwserv/accountserver/account.h" +#include "net/logindata.h" #include "net/messagein.h" #include "game.h" #include "localplayer.h" #include "log.h" -#include "logindata.h" #include "main.h" #include "gui/charcreatedialog.h" diff --git a/src/net/tmwserv/loginhandler.cpp b/src/net/tmwserv/loginhandler.cpp index 40842658..35739669 100644 --- a/src/net/tmwserv/loginhandler.cpp +++ b/src/net/tmwserv/loginhandler.cpp @@ -27,9 +27,9 @@ #include "net/tmwserv/accountserver/account.h" #include "net/tmwserv/accountserver/accountserver.h" +#include "net/logindata.h" #include "net/messagein.h" -#include "logindata.h" #include "main.h" #include "utils/gettext.h" |