Index: sources/wifi/Network.h =================================================================== diff -u -r2085962f7bd0a2239ee5c857928a11d5e38fe0a2 -r3403122944ec8f31dfd33b387e21204783579f60 --- sources/wifi/Network.h (.../Network.h) (revision 2085962f7bd0a2239ee5c857928a11d5e38fe0a2) +++ sources/wifi/Network.h (.../Network.h) (revision 3403122944ec8f31dfd33b387e21204783579f60) @@ -48,9 +48,11 @@ QString mGateway; QString mSubnetMask; QString mBroadcast; - QString mDns; + QString mDNS; }; + IPSettings mIPSettings; + bool operator==(const Network &d1) { if (ssid() == d1.ssid()) return true; @@ -117,14 +119,6 @@ return NO_SIGNAL; } - IPSettings ipSettings() const { - return _ipSettings; - } - - void ipSettings(const IPSettings &vIPSettings) { - _ipSettings = vIPSettings; - } - explicit Network() {} explicit Network(const QString &vMacAddress) {_macAddress = vMacAddress; } explicit Network(const QString &vMacAddress, const QString &vSSID, const SECURITY_LEVEL &vSecurityLevel, const STATUS &vStatus, const int &vSignalLevel) { @@ -135,12 +129,23 @@ _signalLevel = convertSignalLevel(vSignalLevel); } + void clearSettings() { + mIPSettings.mIPAddress = ""; + mIPSettings.mDNS = ""; + mIPSettings.mGateway = ""; + mIPSettings.mSubnetMask = ""; + + _macAddress = ""; + _ssid = ""; + _security = UNSUPPORTED; + _status = NOT_CONNECTED; + _signalLevel = NO_SIGNAL; + } + private: QString _macAddress; QString _ssid; SECURITY_LEVEL _security = UNSUPPORTED; SIGNAL_LEVEL _signalLevel = NO_SIGNAL; STATUS _status = NOT_CONNECTED; - IPSettings _ipSettings; - };