+ << " codecForServer = " << i.codecForServer << " codecForEncoding = " << i.codecForEncoding << " codecForDecoding = " << i.codecForDecoding
+ << " serverList = " << i.serverList << " useRandomServer = " << i.useRandomServer << " perform = " << i.perform
+ << " useAutoIdentify = " << i.useAutoIdentify << " autoIdentifyService = " << i.autoIdentifyService << " autoIdentifyPassword = " << i.autoIdentifyPassword
+ << " useAutoReconnect = " << i.useAutoReconnect << " autoReconnectInterval = " << i.autoReconnectInterval
+ << " autoReconnectRetries = " << i.autoReconnectRetries << " unlimitedReconnectRetries = " << i.unlimitedReconnectRetries
+ << " rejoinChannels = " << i.rejoinChannels << ")";
+ return dbg.space();
+}
+
+QDataStream &operator<<(QDataStream &out, const Network::Server &server) {
+ QVariantMap serverMap;
+ serverMap["Host"] = server.host;
+ serverMap["Port"] = server.port;
+ serverMap["Password"] = server.password;
+ serverMap["UseSSL"] = server.useSsl;
+ serverMap["sslVersion"] = server.sslVersion;
+ serverMap["UseProxy"] = server.useProxy;
+ serverMap["ProxyType"] = server.proxyType;
+ serverMap["ProxyHost"] = server.proxyHost;
+ serverMap["ProxyPort"] = server.proxyPort;
+ serverMap["ProxyUser"] = server.proxyUser;
+ serverMap["ProxyPass"] = server.proxyPass;
+ out << serverMap;
+ return out;
+}
+
+QDataStream &operator>>(QDataStream &in, Network::Server &server) {
+ QVariantMap serverMap;
+ in >> serverMap;
+ server.host = serverMap["Host"].toString();
+ server.port = serverMap["Port"].toUInt();
+ server.password = serverMap["Password"].toString();
+ server.useSsl = serverMap["UseSSL"].toBool();
+ server.sslVersion = serverMap["sslVersion"].toInt();
+ server.useProxy = serverMap["UseProxy"].toBool();
+ server.proxyType = serverMap["ProxyType"].toInt();
+ server.proxyHost = serverMap["ProxyHost"].toString();
+ server.proxyPort = serverMap["ProxyPort"].toUInt();
+ server.proxyUser = serverMap["ProxyUser"].toString();
+ server.proxyPass = serverMap["ProxyPass"].toString();
+ return in;
+}
+
+
+bool Network::Server::operator==(const Server &other) const {
+ if(host != other.host) return false;
+ if(port != other.port) return false;
+ if(password != other.password) return false;
+ if(useSsl != other.useSsl) return false;
+ if(sslVersion != other.sslVersion) return false;
+ if(useProxy != other.useProxy) return false;
+ if(proxyType != other.proxyType) return false;
+ if(proxyHost != other.proxyHost) return false;
+ if(proxyPort != other.proxyPort) return false;
+ if(proxyUser != other.proxyUser) return false;
+ if(proxyPass != other.proxyPass) return false;
+ return true;
+}
+
+bool Network::Server::operator!=(const Server &other) const {
+ return !(*this == other);
+}
+
+QDebug operator<<(QDebug dbg, const Network::Server &server) {
+ dbg.nospace() << "Server(host = " << server.host << ":" << server.port << ", useSsl = " << server.useSsl << ")";