author | mickeyl <mickeyl> | 2002-08-31 10:43:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-08-31 10:43:26 (UTC) |
commit | cd33eed8d5eccebdc37dcd0e30d7917b91765222 (patch) (unidiff) | |
tree | cec3d088b58501bcc660686f468c4a968dc2d729 /noncore/applets/wirelessapplet/networkinfo.cpp | |
parent | 3b720187b21a3b9b3d17fc2b26489723febdaec2 (diff) | |
download | opie-cd33eed8d5eccebdc37dcd0e30d7917b91765222.zip opie-cd33eed8d5eccebdc37dcd0e30d7917b91765222.tar.gz opie-cd33eed8d5eccebdc37dcd0e30d7917b91765222.tar.bz2 |
- debug output is now #ifdef'd
- wireless applet icon shows on demand (like cardmon
- applet has an advanced configuration dialog
- applet features experimental dhcp renew on change of essid/freq/ap/mode
Diffstat (limited to 'noncore/applets/wirelessapplet/networkinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/wirelessapplet/networkinfo.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/noncore/applets/wirelessapplet/networkinfo.cpp b/noncore/applets/wirelessapplet/networkinfo.cpp index 22d7d83..8531fd5 100644 --- a/noncore/applets/wirelessapplet/networkinfo.cpp +++ b/noncore/applets/wirelessapplet/networkinfo.cpp | |||
@@ -53,2 +53,4 @@ | |||
53 | 53 | ||
54 | #define MDEBUG 0 | ||
55 | |||
54 | //--------------------------------------------------------------------------- | 56 | //--------------------------------------------------------------------------- |
@@ -71,4 +73,5 @@ MNetworkInterface::~MNetworkInterface() | |||
71 | 73 | ||
72 | void MNetworkInterface::updateStatistics() | 74 | bool MNetworkInterface::updateStatistics() |
73 | { | 75 | { |
76 | return true; | ||
74 | } | 77 | } |
@@ -106,5 +109,7 @@ int MWirelessNetworkInterface::noisePercent() | |||
106 | 109 | ||
107 | void MWirelessNetworkInterface::updateStatistics() | 110 | bool MWirelessNetworkInterface::updateStatistics() |
108 | { | 111 | { |
109 | MNetworkInterface::updateStatistics(); | 112 | bool base = MNetworkInterface::updateStatistics(); |
113 | if ( !base ) | ||
114 | return false; | ||
110 | 115 | ||
@@ -183,3 +188,5 @@ void MWirelessNetworkInterface::updateStatistics() | |||
183 | { | 188 | { |
189 | #ifdef MDEBUG | ||
184 | qDebug( "WIFIAPPLET: D'oh! Someone removed the card..." ); | 190 | qDebug( "WIFIAPPLET: D'oh! Someone removed the card..." ); |
191 | #endif | ||
185 | quality = -1; | 192 | quality = -1; |
@@ -187,3 +194,3 @@ void MWirelessNetworkInterface::updateStatistics() | |||
187 | noise = IW_LOWER; | 194 | noise = IW_LOWER; |
188 | return; | 195 | return false; |
189 | } | 196 | } |
@@ -193,7 +200,16 @@ void MWirelessNetworkInterface::updateStatistics() | |||
193 | if ( quality > 92 ) | 200 | if ( quality > 92 ) |
201 | #ifdef MDEBUG | ||
194 | qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); | 202 | qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); |
203 | #endif | ||
195 | if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) | 204 | if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) |
205 | #ifdef MDEBUG | ||
196 | qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); | 206 | qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); |
207 | #endif | ||
197 | if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) | 208 | if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) |
209 | #ifdef MDEBUG | ||
198 | qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); | 210 | qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); |
211 | #endif | ||
212 | |||
213 | return true; | ||
214 | |||
199 | } | 215 | } |
@@ -206,3 +222,2 @@ MNetwork::MNetwork() | |||
206 | { | 222 | { |
207 | //qDebug( "MNetwork::MNetwork()" ); | ||
208 | procfile = PROCNETDEV; | 223 | procfile = PROCNETDEV; |
@@ -212,3 +227,2 @@ MNetwork::~MNetwork() | |||
212 | { | 227 | { |
213 | //qDebug( "MNetwork::~MNetwork()" ); | ||
214 | } | 228 | } |
@@ -221,3 +235,2 @@ MWirelessNetwork::MWirelessNetwork() | |||
221 | { | 235 | { |
222 | //qDebug( "MWirelessNetwork::MWirelessNetwork()" ); | ||
223 | procfile = PROCNETWIRELESS; | 236 | procfile = PROCNETWIRELESS; |
@@ -227,3 +240,2 @@ MWirelessNetwork::~MWirelessNetwork() | |||
227 | { | 240 | { |
228 | //qDebug( "MWirelessNetwork::~MWirelessNetwork()" ); | ||
229 | } | 241 | } |
@@ -261,3 +273,5 @@ void MNetwork::enumerateInterfaces() | |||
261 | str.truncate( str.find( ':' ) ); | 273 | str.truncate( str.find( ':' ) ); |
274 | #ifdef MDEBUG | ||
262 | qDebug( "WIFIAPPLET: found interface '%s'", (const char*) str ); | 275 | qDebug( "WIFIAPPLET: found interface '%s'", (const char*) str ); |
276 | #endif | ||
263 | interfaces.insert( str, createInterface( str ) ); | 277 | interfaces.insert( str, createInterface( str ) ); |