summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index e6e366b7..62275e6a 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -65,10 +65,26 @@ class ServersListModel : public gcn::ListModel
void addElement(ServerInfo server);
/**
+ * Add an Element at the end of the server list if it
+ * doesn't exist yet. Otherwise overwrite its properties
+ * in the list.
+ *
+ * @param server ServerInfo to merge into the list.
+ */
+ void mergeElement(ServerInfo server);
+
+ /**
* Add an Element at the beginning of the server list
*/
void addFirstElement(ServerInfo server);
+ /**
+ * Returns wheter the given server is already in the list.
+ * @param server Server to search in the list.
+ * @return True, if the server is in the list, false otherwise.
+ */
+ bool contains(ServerInfo server);
+
private:
std::vector<ServerInfo> servers;
};
@@ -106,6 +122,9 @@ class ServerDialog : public Window,
void valueChanged(const gcn::SelectionEvent &event);
private:
+ /**
+ * Called to load a list of available server from an online xml file.
+ */
void loadServerlist();
gcn::TextField *mServerNameField;