summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
commitd4f32a38fd498c180d562ced38a9129e0abf2252 (patch)
treee655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/gui/serverdialog.h
parent6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff)
downloadmana-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/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index 93903c08..f1cd26d4 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -26,7 +26,7 @@
#include "guichanfwd.h"
-#include "net/tmwserv/network.h"
+#include "net/serverinfo.h"
#include <guichan/actionlistener.hpp>
#include <guichan/listmodel.hpp>
@@ -35,20 +35,6 @@
#include <vector>
class DropDown;
-class LoginData;
-
-/**
- * A server structure to keep pairs of servers and ports.
- */
-struct Server
-{
- Server():
- port(0)
- {}
-
- std::string serverName;
- short port;
-};
/**
* Server and Port List Model
@@ -69,21 +55,21 @@ class ServersListModel : public gcn::ListModel
/**
* Used to get the corresponding Server struct
*/
- Server getServer(int elementIndex) const
+ ServerInfo getServer(int elementIndex) const
{ return servers[elementIndex]; }
/**
* Add an Element at the end of the server list
*/
- void addElement(Server server);
+ void addElement(ServerInfo server);
/**
* Add an Element at the beginning of the server list
*/
- void addFirstElement(Server server);
+ void addFirstElement(ServerInfo server);
private:
- std::vector<Server> servers;
+ std::vector<ServerInfo> servers;
};
/**
@@ -99,7 +85,7 @@ class ServerDialog : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- ServerDialog(LoginData *loginData);
+ ServerDialog(ServerInfo *serverInfo);
/**
* Destructor
@@ -120,7 +106,7 @@ class ServerDialog : public Window, public gcn::ActionListener
DropDown *mMostUsedServersDropDown;
ServersListModel *mMostUsedServersListModel;
- LoginData *mLoginData;
+ ServerInfo *mServerInfo;
};
#endif