X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetwork.cpp;h=e899969a217a0bce4ef19daa75dbfccb876a8914;hp=f1cff6cf41475b2e9f7c0e1d5b1039437c8709f3;hb=59912f14782c193a2394a2b0d044902a59c96870;hpb=c5cbe5eb77fce2ab954a98399a1450803108217b diff --git a/src/common/network.cpp b/src/common/network.cpp index f1cff6cf..e899969a 100644 --- a/src/common/network.cpp +++ b/src/common/network.cpp @@ -503,6 +503,12 @@ void Network::requestConnect() { else emit connectRequested(networkId()); // and this is for CoreSession :) } +void Network::requestDisconnect() { + if(!proxy()) return; + if(proxy()->proxyMode() == SignalProxy::Client) emit disconnectRequested(); // on the client this triggers calling this slot on the core + else emit disconnectRequested(networkId()); // and this is for CoreSession :) +} + // ==================== // Private: // ==================== @@ -540,3 +546,20 @@ void Network::determinePrefixes() { } } +/************************************************************************ + * NetworkInfo + ************************************************************************/ + +bool NetworkInfo::operator==(const NetworkInfo &other) const { + if(networkId != other.networkId) return false; + if(networkName != other.networkName) return false; + if(identity != other.identity) return false; + if(codecForEncoding != other.codecForEncoding) return false; + if(codecForDecoding != other.codecForDecoding) return false; + if(serverList != other.serverList) return false; + return true; +} + +bool NetworkInfo::operator!=(const NetworkInfo &other) const { + return !(*this == other); +}