diff options
author | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
commit | 1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9 (patch) | |
tree | 596305e9bfd4ad8448efd477a43f86490b1974c5 /src/net/serverinfo.h | |
parent | 8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (diff) | |
parent | f5f7a7d5990d1133f714b6cd431aecf6a332fbd5 (diff) | |
download | mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.gz mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.bz2 mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.xz mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.zip |
Merge branch 'master' of gitorious.org:mana/mana
Diffstat (limited to 'src/net/serverinfo.h')
-rw-r--r-- | src/net/serverinfo.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index ae06984b..63d50ce4 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -41,10 +41,13 @@ public: std::string hostname; unsigned short port; + bool save; + ServerInfo() { type = UNKNOWN; port = 0; + save = false; } ServerInfo(const ServerInfo &info) @@ -53,6 +56,12 @@ public: name = info.name; hostname = info.hostname; port = info.port; + save = info.save; + } + + bool isValid() const + { + return !(hostname.empty() || port == 0 || type == UNKNOWN); } void clear() @@ -63,13 +72,13 @@ public: port = 0; } - bool operator==(const ServerInfo &other) + bool operator==(const ServerInfo &other) const { return (type == other.type && hostname == other.hostname && port == other.port); } - bool operator!=(const ServerInfo &other) + bool operator!=(const ServerInfo &other) const { return (type != other.type || hostname != other.hostname || port != other.port); |