author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/net/wellenreiter | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 30 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gps.cpp | 12 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/logwindow.cpp | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/main.cpp | 15 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 57 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/packetview.cpp | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/resource.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 77 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 74 |
9 files changed, 140 insertions, 139 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index da39113..bfdb20a 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -24,5 +24,7 @@ | |||
24 | #include <opie2/oconfig.h> | 24 | #include <opie2/oconfig.h> |
25 | #include <opie2/odevice.h> | 25 | #include <opie2/odevice.h> |
26 | using namespace Opie; | 26 | #include <opie2/odebug.h> |
27 | using namespace Opie::Core; | ||
28 | using namespace Opie::Net; | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
@@ -41,13 +43,7 @@ using namespace Opie; | |||
41 | #include <qtextstream.h> | 43 | #include <qtextstream.h> |
42 | 44 | ||
43 | /* POSIX */ | 45 | /* STD */ |
44 | #include <assert.h> | 46 | #include <assert.h> |
45 | 47 | ||
46 | using namespace Opie::Core; | ||
47 | using namespace Opie::Net; | ||
48 | using namespace Opie::Core; | ||
49 | using namespace Opie::Net; | ||
50 | using namespace Opie::Core; | ||
51 | using namespace Opie::Net; | ||
52 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; | 48 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; |
53 | 49 | ||
@@ -117,5 +113,5 @@ void WellenreiterConfigWindow::performAutodetection() | |||
117 | // like we're actually doing something fancy... ;-) | 113 | // like we're actually doing something fancy... ;-) |
118 | 114 | ||
119 | qDebug( "WellenreiterConfigWindow::performAutodetection()" ); | 115 | odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; |
120 | 116 | ||
121 | // try to guess device type | 117 | // try to guess device type |
@@ -138,5 +134,5 @@ void WellenreiterConfigWindow::performAutodetection() | |||
138 | deviceType->setCurrentItem( devicetype ); | 134 | deviceType->setCurrentItem( devicetype ); |
139 | _guess = devicetype; | 135 | _guess = devicetype; |
140 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); | 136 | odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; |
141 | } | 137 | } |
142 | } | 138 | } |
@@ -242,5 +238,5 @@ void WellenreiterConfigWindow::getCaptureFileNameClicked() | |||
242 | { | 238 | { |
243 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | 239 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); |
244 | qDebug( "name = %s", (const char*) name ); | 240 | odebug << "name = " << (const char*) name << "" << oendl; |
245 | if ( !name.isEmpty() ) | 241 | if ( !name.isEmpty() ) |
246 | { | 242 | { |
@@ -317,9 +313,9 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
317 | else | 313 | else |
318 | { | 314 | { |
319 | qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); | 315 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl; |
320 | return; | 316 | return; |
321 | } | 317 | } |
322 | 318 | ||
323 | qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); | 319 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl; |
324 | 320 | ||
325 | switch( action ) | 321 | switch( action ) |
@@ -346,7 +342,7 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
346 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); | 342 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); |
347 | 343 | ||
348 | qDebug( "going to call script '%s'", (const char*) script ); | 344 | odebug << "going to call script '" << (const char*) script << "'" << oendl; |
349 | ::system( script ); | 345 | ::system( script ); |
350 | qDebug( "script returned." ); | 346 | odebug << "script returned." << oendl; |
351 | return; | 347 | return; |
352 | } | 348 | } |
@@ -362,5 +358,5 @@ void WellenreiterConfigWindow::load() | |||
362 | performAutodetection(); | 358 | performAutodetection(); |
363 | #else | 359 | #else |
364 | qDebug( "loading configuration settings..." ); | 360 | odebug << "loading configuration settings..." << oendl; |
365 | 361 | ||
366 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 362 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
@@ -440,5 +436,5 @@ void WellenreiterConfigWindow::save() | |||
440 | #warning Persistent Configuration not yet implemented for standalone X11 build | 436 | #warning Persistent Configuration not yet implemented for standalone X11 build |
441 | #else | 437 | #else |
442 | qDebug( "saving configuration settings..." ); | 438 | odebug << "saving configuration settings..." << oendl; |
443 | 439 | ||
444 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 440 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index a47b4ec..bd91e35 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp | |||
@@ -16,4 +16,8 @@ | |||
16 | #include "gps.h" | 16 | #include "gps.h" |
17 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
20 | using namespace Opie::Core; | ||
21 | |||
18 | /* QT */ | 22 | /* QT */ |
19 | #include <qtextstream.h> | 23 | #include <qtextstream.h> |
@@ -26,5 +30,5 @@ GPS::GPS( QObject* parent, const char * name ) | |||
26 | :QObject( parent, name ) | 30 | :QObject( parent, name ) |
27 | { | 31 | { |
28 | qDebug( "GPS::GPS()" ); | 32 | odebug << "GPS::GPS()" << oendl; |
29 | _socket = new QSocket( this, "gpsd commsock" ); | 33 | _socket = new QSocket( this, "gpsd commsock" ); |
30 | } | 34 | } |
@@ -33,5 +37,5 @@ GPS::GPS( QObject* parent, const char * name ) | |||
33 | GPS::~GPS() | 37 | GPS::~GPS() |
34 | { | 38 | { |
35 | qDebug( "GPS::~GPS()" ); | 39 | odebug << "GPS::~GPS()" << oendl; |
36 | } | 40 | } |
37 | 41 | ||
@@ -54,5 +58,5 @@ GpsLocation GPS::position() const | |||
54 | { | 58 | { |
55 | int numAvail = _socket->bytesAvailable(); | 59 | int numAvail = _socket->bytesAvailable(); |
56 | qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); | 60 | odebug << "GPS write succeeded, " << numAvail << " bytes available for reading..." << oendl; |
57 | if ( numAvail ) | 61 | if ( numAvail ) |
58 | { | 62 | { |
@@ -62,5 +66,5 @@ GpsLocation GPS::position() const | |||
62 | if ( numRead < 7 || numScan != 2 ) | 66 | if ( numRead < 7 || numScan != 2 ) |
63 | { | 67 | { |
64 | qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); | 68 | odebug << "GPS read " << numRead << " bytes succeeded, invalid response: '" << &buf[0] << "'" << oendl; |
65 | return GpsLocation( -111, -111 ); | 69 | return GpsLocation( -111, -111 ); |
66 | } | 70 | } |
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index 1c72cf4..714a9a9 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp | |||
@@ -15,4 +15,10 @@ | |||
15 | 15 | ||
16 | #include "logwindow.h" | 16 | #include "logwindow.h" |
17 | |||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
20 | using namespace Opie::Core; | ||
21 | |||
22 | /* QT */ | ||
17 | #include <qmultilineedit.h> | 23 | #include <qmultilineedit.h> |
18 | #include <qdatetime.h> | 24 | #include <qdatetime.h> |
@@ -39,5 +45,5 @@ void MLogWindow::log( QString text ) | |||
39 | ledit->getCursorPosition( &col, &row ); | 45 | ledit->getCursorPosition( &col, &row ); |
40 | ledit->insertAt( line, col, row ); | 46 | ledit->insertAt( line, col, row ); |
41 | qDebug( line ); | 47 | odebug << line << oendl; |
42 | } | 48 | } |
43 | 49 | ||
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 6bbc39b..62db967 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp | |||
@@ -15,5 +15,7 @@ | |||
15 | 15 | ||
16 | #include "mainwindow.h" | 16 | #include "mainwindow.h" |
17 | |||
17 | #ifdef QWS | 18 | #ifdef QWS |
19 | #include <opie2/odebug.h> | ||
18 | #include <opie2/oapplication.h> | 20 | #include <opie2/oapplication.h> |
19 | #include <opie2/oprocess.h> | 21 | #include <opie2/oprocess.h> |
@@ -22,7 +24,9 @@ | |||
22 | #endif | 24 | #endif |
23 | 25 | ||
26 | /* QT */ | ||
24 | #include <qmessagebox.h> | 27 | #include <qmessagebox.h> |
25 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
26 | 29 | ||
30 | /* STD */ | ||
27 | #include <errno.h> | 31 | #include <errno.h> |
28 | #include <signal.h> | 32 | #include <signal.h> |
@@ -31,6 +35,5 @@ | |||
31 | 35 | ||
32 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
33 | using namespace Opie::Core; | 37 | |
34 | using namespace Opie::Core; | ||
35 | int main( int argc, char **argv ) | 38 | int main( int argc, char **argv ) |
36 | { | 39 | { |
@@ -56,8 +59,8 @@ int main( int argc, char **argv ) | |||
56 | for ( int i = 1; i < argc; ++i ) | 59 | for ( int i = 1; i < argc; ++i ) |
57 | { | 60 | { |
58 | qDebug( "Wellenreiter::main() parsing argument %d = '%s'", i, argv[i] ); | 61 | odebug << "Wellenreiter::main() parsing argument " << i << " = '" << argv[i] << "'" << oendl; |
59 | if ( !strcmp( "-nocheck", argv[i] ) ) | 62 | if ( !strcmp( "-nocheck", argv[i] ) ) |
60 | { | 63 | { |
61 | qDebug( "-nocheck found" ); | 64 | odebug << "-nocheck found" << oendl; |
62 | check = false; | 65 | check = false; |
63 | break; | 66 | break; |
@@ -70,5 +73,5 @@ int main( int argc, char **argv ) | |||
70 | if ( getuid() ) | 73 | if ( getuid() ) |
71 | { | 74 | { |
72 | qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); | 75 | owarn << QObject::tr( "Wellenreiter: trying to run as non-root!" ) << oendl; |
73 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" | 76 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" |
74 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), | 77 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), |
@@ -87,5 +90,5 @@ int main( int argc, char **argv ) | |||
87 | { | 90 | { |
88 | if ( -1 == ::kill( dhcpid, SIGTERM ) ) | 91 | if ( -1 == ::kill( dhcpid, SIGTERM ) ) |
89 | qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); | 92 | owarn << "Wellenreiter: can't kill process #" << result << " (" << strerror( errno ) << ")" << oendl; |
90 | else | 93 | else |
91 | killed = true; | 94 | killed = true; |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 7add6cd..a4b8839 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -22,4 +22,19 @@ | |||
22 | #include "scanlist.h" | 22 | #include "scanlist.h" |
23 | 23 | ||
24 | /* OPIE */ | ||
25 | #ifdef QWS | ||
26 | #include <qpe/resource.h> | ||
27 | #include <opie2/odebug.h> | ||
28 | #include <opie2/ofiledialog.h> | ||
29 | #else | ||
30 | #include "resource.h" | ||
31 | #include <qapplication.h> | ||
32 | #include <qfiledialog.h> | ||
33 | #endif | ||
34 | using namespace Opie::Core; | ||
35 | using namespace Opie::Net; | ||
36 | using namespace Opie::Ui; | ||
37 | |||
38 | /* QT */ | ||
24 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
25 | #include <qdatastream.h> | 40 | #include <qdatastream.h> |
@@ -40,21 +55,7 @@ | |||
40 | #include <qwhatsthis.h> | 55 | #include <qwhatsthis.h> |
41 | 56 | ||
42 | #ifdef QWS | 57 | /* STD */ |
43 | #include <qpe/resource.h> | ||
44 | #include <opie2/ofiledialog.h> | ||
45 | using namespace Opie; | ||
46 | #else | ||
47 | #include "resource.h" | ||
48 | #include <qapplication.h> | ||
49 | #include <qfiledialog.h> | ||
50 | #endif | ||
51 | |||
52 | #include <unistd.h> | 58 | #include <unistd.h> |
53 | 59 | ||
54 | using namespace Opie::Ui; | ||
55 | using namespace Opie::Net; | ||
56 | using namespace Opie::Ui; | ||
57 | using namespace Opie::Net; | ||
58 | using namespace Opie::Net; | ||
59 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) | 60 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) |
60 | :QMainWindow( parent, name, f ) | 61 | :QMainWindow( parent, name, f ) |
@@ -189,5 +190,5 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
189 | void WellenreiterMainWindow::showConfigure() | 190 | void WellenreiterMainWindow::showConfigure() |
190 | { | 191 | { |
191 | qDebug( "show configure..." ); | 192 | odebug << "show configure..." << oendl; |
192 | cw->setCaption( tr( "Configure" ) ); | 193 | cw->setCaption( tr( "Configure" ) ); |
193 | int result = QPEApplication::execDialog( cw ); | 194 | int result = QPEApplication::execDialog( cw ); |
@@ -232,5 +233,5 @@ void WellenreiterMainWindow::changedSniffingState() | |||
232 | WellenreiterMainWindow::~WellenreiterMainWindow() | 233 | WellenreiterMainWindow::~WellenreiterMainWindow() |
233 | { | 234 | { |
234 | qDebug( "Wellenreiter: bye." ); | 235 | odebug << "Wellenreiter: bye." << oendl; |
235 | }; | 236 | }; |
236 | 237 | ||
@@ -252,5 +253,5 @@ void WellenreiterMainWindow::demoReadFromGps() | |||
252 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); | 253 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); |
253 | GPS* gps = new GPS( this ); | 254 | GPS* gps = new GPS( this ); |
254 | qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 255 | odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl; |
255 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 256 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
256 | GpsLocation loc = gps->position(); | 257 | GpsLocation loc = gps->position(); |
@@ -306,9 +307,9 @@ void WellenreiterMainWindow::fileSaveLog() | |||
306 | t << mw->logWindow()->getLog(); | 307 | t << mw->logWindow()->getLog(); |
307 | f.close(); | 308 | f.close(); |
308 | qDebug( "Saved log to file '%s'", (const char*) fname ); | 309 | odebug << "Saved log to file '" << (const char*) fname << "'" << oendl; |
309 | } | 310 | } |
310 | else | 311 | else |
311 | { | 312 | { |
312 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); | 313 | odebug << "Problem saving log to file '" << (const char*) fname << "'" << oendl; |
313 | } | 314 | } |
314 | } | 315 | } |
@@ -327,9 +328,9 @@ void WellenreiterMainWindow::fileSaveSession() | |||
327 | t << *mw->netView(); | 328 | t << *mw->netView(); |
328 | f.close(); | 329 | f.close(); |
329 | qDebug( "Saved session to file '%s'", (const char*) fname ); | 330 | odebug << "Saved session to file '" << (const char*) fname << "'" << oendl; |
330 | } | 331 | } |
331 | else | 332 | else |
332 | { | 333 | { |
333 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); | 334 | odebug << "Problem saving session to file '" << (const char*) fname << "'" << oendl; |
334 | } | 335 | } |
335 | } | 336 | } |
@@ -349,9 +350,9 @@ void WellenreiterMainWindow::fileSaveHex() | |||
349 | t << mw->hexWindow()->getLog(); | 350 | t << mw->hexWindow()->getLog(); |
350 | f.close(); | 351 | f.close(); |
351 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); | 352 | odebug << "Saved hex log to file '" << (const char*) fname << "'" << oendl; |
352 | } | 353 | } |
353 | else | 354 | else |
354 | { | 355 | { |
355 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); | 356 | odebug << "Problem saving hex log to file '" << (const char*) fname << "'" << oendl; |
356 | } | 357 | } |
357 | } | 358 | } |
@@ -370,9 +371,9 @@ void WellenreiterMainWindow::fileLoadSession() | |||
370 | t >> *mw->netView(); | 371 | t >> *mw->netView(); |
371 | f.close(); | 372 | f.close(); |
372 | qDebug( "Loaded session from file '%s'", (const char*) fname ); | 373 | odebug << "Loaded session from file '" << (const char*) fname << "'" << oendl; |
373 | } | 374 | } |
374 | else | 375 | else |
375 | { | 376 | { |
376 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); | 377 | odebug << "Problem loading session from file '" << (const char*) fname << "'" << oendl; |
377 | } | 378 | } |
378 | } | 379 | } |
@@ -439,9 +440,9 @@ void WellenreiterMainWindow::uploadSession() | |||
439 | if ( !result ) | 440 | if ( !result ) |
440 | { | 441 | { |
441 | qDebug( "Session upload cancelled :(" ); | 442 | odebug << "Session upload cancelled :(" << oendl; |
442 | return; | 443 | return; |
443 | } | 444 | } |
444 | 445 | ||
445 | qDebug( "Starting upload..." ); | 446 | odebug << "Starting upload..." << oendl; |
446 | 447 | ||
447 | struct sockaddr_in raddr; | 448 | struct sockaddr_in raddr; |
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index 3d3aa18..4df01da 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp | |||
@@ -85,5 +85,5 @@ void PacketView::showPacket( int number ) | |||
85 | else | 85 | else |
86 | { | 86 | { |
87 | qDebug( "D'oh! No packet!" ); | 87 | odebug << "D'oh! No packet!" << oendl; |
88 | } | 88 | } |
89 | } | 89 | } |
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp index d98ef0b..cb17f51 100644 --- a/noncore/net/wellenreiter/gui/resource.cpp +++ b/noncore/net/wellenreiter/gui/resource.cpp | |||
@@ -30,5 +30,5 @@ QPixmap loadPixmap( const QString& pix ) | |||
30 | if ( pixmap.isNull() ) | 30 | if ( pixmap.isNull() ) |
31 | { | 31 | { |
32 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 32 | odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; |
33 | } | 33 | } |
34 | return pixmap; | 34 | return pixmap; |
@@ -42,5 +42,5 @@ QIconSet loadIconSet( const QString& pix ) | |||
42 | if ( pixmap.isNull() ) | 42 | if ( pixmap.isNull() ) |
43 | { | 43 | { |
44 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 44 | odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; |
45 | } | 45 | } |
46 | return QIconSet( pixmap ); | 46 | return QIconSet( pixmap ); |
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 3b7120a..a2be782 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -18,19 +18,24 @@ | |||
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | 19 | ||
20 | #include <assert.h> | 20 | /* OPIE */ |
21 | #include <qcursor.h> | ||
22 | #include <qdatetime.h> | ||
23 | #include <qpopupmenu.h> | ||
24 | #include <qcheckbox.h> | ||
25 | |||
26 | #ifdef QWS | 21 | #ifdef QWS |
22 | #include <opie2/odebug.h> | ||
27 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
28 | #endif | ||
29 | |||
30 | #ifdef QWS | ||
31 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
32 | #else | 25 | #else |
33 | #include "resource.h" | 26 | #include "resource.h" |
34 | #endif | 27 | #endif |
28 | using namespace Opie::Core; | ||
29 | using namespace Opie::Ui; | ||
30 | using namespace Opie::Net; | ||
31 | |||
32 | /* QT */ | ||
33 | #include <qcursor.h> | ||
34 | #include <qdatetime.h> | ||
35 | #include <qpopupmenu.h> | ||
36 | #include <qcheckbox.h> | ||
37 | |||
38 | /* STD */ | ||
39 | #include <assert.h> | ||
35 | 40 | ||
36 | const int col_type = 0; | 41 | const int col_type = 0; |
@@ -47,10 +52,4 @@ const int col_lastseen = 9; | |||
47 | const int col_location = 10; | 52 | const int col_location = 10; |
48 | 53 | ||
49 | using namespace Opie::Net; | ||
50 | using namespace Opie::Ui; | ||
51 | using namespace Opie::Net; | ||
52 | using namespace Opie::Ui; | ||
53 | using namespace Opie::Ui; | ||
54 | using namespace Opie::Net; | ||
55 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 54 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
56 | :OListView( parent, name ) | 55 | :OListView( parent, name ) |
@@ -107,5 +106,5 @@ OListViewItem* MScanListView::childFactory() | |||
107 | void MScanListView::serializeTo( QDataStream& s) const | 106 | void MScanListView::serializeTo( QDataStream& s) const |
108 | { | 107 | { |
109 | qDebug( "serializing MScanListView" ); | 108 | odebug << "serializing MScanListView" << oendl; |
110 | OListView::serializeTo( s ); | 109 | OListView::serializeTo( s ); |
111 | } | 110 | } |
@@ -114,5 +113,5 @@ void MScanListView::serializeTo( QDataStream& s) const | |||
114 | void MScanListView::serializeFrom( QDataStream& s) | 113 | void MScanListView::serializeFrom( QDataStream& s) |
115 | { | 114 | { |
116 | qDebug( "serializing MScanListView" ); | 115 | odebug << "serializing MScanListView" << oendl; |
117 | OListView::serializeFrom( s ); | 116 | OListView::serializeFrom( s ); |
118 | } | 117 | } |
@@ -144,5 +143,5 @@ void MScanListView::addNewItem( const QString& type, | |||
144 | { | 143 | { |
145 | #ifdef DEBUG | 144 | #ifdef DEBUG |
146 | qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); | 145 | odebug << "itemtext: " << (const char*) item->text( col_essid ) << "" << oendl; |
147 | #endif | 146 | #endif |
148 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 147 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
@@ -160,5 +159,5 @@ void MScanListView::addNewItem( const QString& type, | |||
160 | { | 159 | { |
161 | #ifdef DEBUG | 160 | #ifdef DEBUG |
162 | qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); | 161 | odebug << "subitemtext: " << (const char*) item->text( col_ap ) << "" << oendl; |
163 | #endif | 162 | #endif |
164 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 163 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
@@ -169,5 +168,5 @@ void MScanListView::addNewItem( const QString& type, | |||
169 | // we have already seen this item, it's a dupe | 168 | // we have already seen this item, it's a dupe |
170 | #ifdef DEBUG | 169 | #ifdef DEBUG |
171 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); | 170 | odebug << "" << (const char*) macaddr << " is a dupe - ignoring..." << oendl; |
172 | #endif | 171 | #endif |
173 | item->receivedBeacon(); | 172 | item->receivedBeacon(); |
@@ -187,5 +186,5 @@ void MScanListView::addNewItem( const QString& type, | |||
187 | 186 | ||
188 | #ifdef DEBUG | 187 | #ifdef DEBUG |
189 | qDebug( "inserting new station %s", (const char*) macaddr ); | 188 | odebug << "inserting new station " << (const char*) macaddr << "" << oendl; |
190 | #endif | 189 | #endif |
191 | 190 | ||
@@ -213,5 +212,5 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& | |||
213 | { | 212 | { |
214 | #ifdef DEBUG | 213 | #ifdef DEBUG |
215 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); | 214 | odebug << "subitemtext: " << (const char*) subitem->text( col_ap ) << "" << oendl; |
216 | #endif | 215 | #endif |
217 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); | 216 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); |
@@ -222,5 +221,5 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& | |||
222 | // we have already seen this item, it's a dupe | 221 | // we have already seen this item, it's a dupe |
223 | #ifdef DEBUG | 222 | #ifdef DEBUG |
224 | qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); | 223 | odebug << "" << (const char*) addr.toString(true) << " is a dupe - ignoring..." << oendl; |
225 | #endif | 224 | #endif |
226 | subitem->receivedBeacon(); //FIXME: sent data bit | 225 | subitem->receivedBeacon(); //FIXME: sent data bit |
@@ -247,5 +246,5 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& | |||
247 | void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) | 246 | void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) |
248 | { | 247 | { |
249 | qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() ); | 248 | odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << (const char*) viaTo.toString() << " seem to form a WDS" << oendl; |
250 | QString s; | 249 | QString s; |
251 | MScanListItem* network; | 250 | MScanListItem* network; |
@@ -265,5 +264,5 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, | |||
265 | else | 264 | else |
266 | { | 265 | { |
267 | qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); | 266 | odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl; |
268 | MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); | 267 | MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); |
269 | } | 268 | } |
@@ -287,5 +286,5 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, | |||
287 | else | 286 | else |
288 | { | 287 | { |
289 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); | 288 | odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; |
290 | MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); | 289 | MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); |
291 | 290 | ||
@@ -310,5 +309,5 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t | |||
310 | else | 309 | else |
311 | { | 310 | { |
312 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); | 311 | odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; |
313 | MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); | 312 | MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); |
314 | } | 313 | } |
@@ -318,5 +317,5 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t | |||
318 | void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) | 317 | void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) |
319 | { | 318 | { |
320 | qWarning( "D'oh! Not yet implemented..." ); | 319 | owarn << "D'oh! Not yet implemented..." << oendl; |
321 | MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); | 320 | MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); |
322 | } | 321 | } |
@@ -325,5 +324,5 @@ void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, | |||
325 | void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) | 324 | void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) |
326 | { | 325 | { |
327 | qDebug( "identify %s = %s", (const char*) macaddr.toString(), (const char*) ip ); | 326 | odebug << "identify " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; |
328 | 327 | ||
329 | QListViewItemIterator it( this ); | 328 | QListViewItemIterator it( this ); |
@@ -336,5 +335,5 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) | |||
336 | } | 335 | } |
337 | } | 336 | } |
338 | qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); | 337 | odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; |
339 | MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", | 338 | MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", |
340 | (const char*) macaddr.toString(), (const char*) ip ) ); | 339 | (const char*) macaddr.toString(), (const char*) ip ) ); |
@@ -344,5 +343,5 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) | |||
344 | void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip ) | 343 | void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip ) |
345 | { | 344 | { |
346 | qDebug( "addService '%s', Server = %s = %s", (const char*) name, (const char*) macaddr.toString(), (const char*) ip ); | 345 | odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; |
347 | 346 | ||
348 | //TODO: Refactor that out, we need it all over the place. | 347 | //TODO: Refactor that out, we need it all over the place. |
@@ -361,5 +360,5 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
361 | { | 360 | { |
362 | #ifdef DEBUG | 361 | #ifdef DEBUG |
363 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_essid ) ); | 362 | odebug << "subitemtext: " << (const char*) subitem->text( col_essid ) << "" << oendl; |
364 | #endif | 363 | #endif |
365 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); | 364 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); |
@@ -370,5 +369,5 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
370 | // we have already seen this item, it's a dupe | 369 | // we have already seen this item, it's a dupe |
371 | #ifdef DEBUG | 370 | #ifdef DEBUG |
372 | qDebug( "%s is a dupe - ignoring...", (const char*) name ); | 371 | odebug << "" << (const char*) name << " is a dupe - ignoring..." << oendl; |
373 | #endif | 372 | #endif |
374 | subitem->receivedBeacon(); //FIXME: sent data bit | 373 | subitem->receivedBeacon(); //FIXME: sent data bit |
@@ -384,5 +383,5 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
384 | } | 383 | } |
385 | } | 384 | } |
386 | qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); | 385 | odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; |
387 | MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", | 386 | MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", |
388 | (const char*) macaddr.toString(), (const char*) ip ) ); | 387 | (const char*) macaddr.toString(), (const char*) ip ) ); |
@@ -422,5 +421,5 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr | |||
422 | { | 421 | { |
423 | #ifdef DEBUG | 422 | #ifdef DEBUG |
424 | qDebug( "creating scanlist item" ); | 423 | odebug << "creating scanlist item" << oendl; |
425 | #endif | 424 | #endif |
426 | 425 | ||
@@ -436,5 +435,5 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const | |||
436 | { | 435 | { |
437 | #ifdef DEBUG | 436 | #ifdef DEBUG |
438 | qDebug( "creating scanlist item" ); | 437 | odebug << "creating scanlist item" << oendl; |
439 | #endif | 438 | #endif |
440 | if ( WellenreiterConfigWindow::instance() ) | 439 | if ( WellenreiterConfigWindow::instance() ) |
@@ -460,5 +459,5 @@ void MScanListItem::serializeTo( QDataStream& s ) const | |||
460 | { | 459 | { |
461 | #ifdef DEBUG | 460 | #ifdef DEBUG |
462 | qDebug( "serializing MScanListItem" ); | 461 | odebug << "serializing MScanListItem" << oendl; |
463 | #endif | 462 | #endif |
464 | OListViewItem::serializeTo( s ); | 463 | OListViewItem::serializeTo( s ); |
@@ -471,5 +470,5 @@ void MScanListItem::serializeFrom( QDataStream& s ) | |||
471 | { | 470 | { |
472 | #ifdef DEBUG | 471 | #ifdef DEBUG |
473 | qDebug( "serializing MScanListItem" ); | 472 | odebug << "serializing MScanListItem" << oendl; |
474 | #endif | 473 | #endif |
475 | OListViewItem::serializeFrom( s ); | 474 | OListViewItem::serializeFrom( s ); |
@@ -557,5 +556,5 @@ void MScanListItem::receivedBeacon() | |||
557 | _beacons++; | 556 | _beacons++; |
558 | #ifdef DEBUG | 557 | #ifdef DEBUG |
559 | qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); | 558 | odebug << "MScanListItem " << (const char*) _macaddr << ": received beacon #" << _beacons << "" << oendl; |
560 | #endif | 559 | #endif |
561 | setText( col_sig, QString::number( _beacons ) ); | 560 | setText( col_sig, QString::number( _beacons ) ); |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index fff7c35..fad6efd 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -12,6 +12,4 @@ | |||
12 | ***********************************************************************/ | 12 | ***********************************************************************/ |
13 | 13 | ||
14 | // Local | ||
15 | |||
16 | #include "gps.h" | 14 | #include "gps.h" |
17 | #include "wellenreiter.h" | 15 | #include "wellenreiter.h" |
@@ -24,8 +22,8 @@ | |||
24 | #include "protolistview.h" | 22 | #include "protolistview.h" |
25 | 23 | ||
26 | // Opie | 24 | /* OPIE */ |
27 | |||
28 | #ifdef QWS | 25 | #ifdef QWS |
29 | #include <opie2/oapplication.h> | 26 | #include <opie2/oapplication.h> |
27 | #include <opie2/odebug.h> | ||
30 | #include <opie2/odevice.h> | 28 | #include <opie2/odevice.h> |
31 | #else | 29 | #else |
@@ -36,8 +34,9 @@ | |||
36 | #include <opie2/opcap.h> | 34 | #include <opie2/opcap.h> |
37 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
38 | using namespace Opie; | 36 | using namespace Opie::Core; |
39 | 37 | using namespace Opie::Net; | |
40 | // Qt | 38 | using namespace Opie::Ui; |
41 | 39 | ||
40 | /* QT */ | ||
42 | #include <qcheckbox.h> | 41 | #include <qcheckbox.h> |
43 | #include <qcombobox.h> | 42 | #include <qcombobox.h> |
@@ -53,6 +52,5 @@ using namespace Opie; | |||
53 | #include <qmainwindow.h> | 52 | #include <qmainwindow.h> |
54 | 53 | ||
55 | // Standard | 54 | /* STD */ |
56 | |||
57 | #include <assert.h> | 55 | #include <assert.h> |
58 | #include <errno.h> | 56 | #include <errno.h> |
@@ -62,10 +60,4 @@ using namespace Opie; | |||
62 | #include <stdlib.h> | 60 | #include <stdlib.h> |
63 | 61 | ||
64 | using namespace Opie::Core; | ||
65 | using namespace Opie::Net; | ||
66 | using namespace Opie::Net; | ||
67 | using namespace Opie::Core; | ||
68 | using namespace Opie::Net; | ||
69 | using namespace Opie::Core; | ||
70 | Wellenreiter::Wellenreiter( QWidget* parent ) | 62 | Wellenreiter::Wellenreiter( QWidget* parent ) |
71 | : WellenreiterBase( parent, 0, 0 ), | 63 | : WellenreiterBase( parent, 0, 0 ), |
@@ -107,5 +99,5 @@ Wellenreiter::~Wellenreiter() | |||
107 | void Wellenreiter::initialTimer() | 99 | void Wellenreiter::initialTimer() |
108 | { | 100 | { |
109 | qDebug( "Wellenreiter::preloading manufacturer database..." ); | 101 | odebug << "Wellenreiter::preloading manufacturer database..." << oendl; |
110 | OManufacturerDB::instance(); | 102 | OManufacturerDB::instance(); |
111 | } | 103 | } |
@@ -150,10 +142,10 @@ void Wellenreiter::handleNotification( OPacket* p ) | |||
150 | { | 142 | { |
151 | QString action = configwindow->parsePackets->protocolAction( name ); | 143 | QString action = configwindow->parsePackets->protocolAction( name ); |
152 | qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | 144 | odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; |
153 | doAction( action, name, p ); | 145 | doAction( action, name, p ); |
154 | } | 146 | } |
155 | else | 147 | else |
156 | { | 148 | { |
157 | qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name ); | 149 | odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl; |
158 | } | 150 | } |
159 | ++it; | 151 | ++it; |
@@ -167,5 +159,5 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* | |||
167 | else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); | 159 | else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); |
168 | else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); | 160 | else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); |
169 | else qWarning( "Wellenreiter::handleManagementFrame(): '%s' - please handle me!", (const char*) manage->managementType() ); | 161 | else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl; |
170 | } | 162 | } |
171 | 163 | ||
@@ -183,12 +175,12 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage | |||
183 | { | 175 | { |
184 | // TODO: add check if GPS is working!? | 176 | // TODO: add check if GPS is working!? |
185 | qDebug( "Wellenreiter::gathering GPS data..." ); | 177 | odebug << "Wellenreiter::gathering GPS data..." << oendl; |
186 | loc = gps->position(); | 178 | loc = gps->position(); |
187 | qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); | 179 | odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; |
188 | } | 180 | } |
189 | 181 | ||
190 | if ( essid.length() ) | 182 | if ( essid.length() ) |
191 | netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); | 183 | netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); |
192 | qDebug( "Wellenreiter::invalid frame [possibly noise] detected!" ); | 184 | odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; |
193 | } | 185 | } |
194 | 186 | ||
@@ -212,5 +204,5 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa | |||
212 | else | 204 | else |
213 | { | 205 | { |
214 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); | 206 | owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; |
215 | return; | 207 | return; |
216 | } | 208 | } |
@@ -227,7 +219,7 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa | |||
227 | { | 219 | { |
228 | // TODO: add check if GPS is working!? | 220 | // TODO: add check if GPS is working!? |
229 | qDebug( "Wellenreiter::gathering GPS data..." ); | 221 | odebug << "Wellenreiter::gathering GPS data..." << oendl; |
230 | loc = gps->position(); | 222 | loc = gps->position(); |
231 | qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); | 223 | odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; |
232 | } | 224 | } |
233 | 225 | ||
@@ -256,5 +248,5 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro | |||
256 | else | 248 | else |
257 | { | 249 | { |
258 | qDebug( "Wellenreiter::handleControlFrame - please handle %s in a future version! :D", (const char*) control->controlType() ); | 250 | odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl; |
259 | } | 251 | } |
260 | } | 252 | } |
@@ -305,5 +297,5 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, | |||
305 | if ( arp ) | 297 | if ( arp ) |
306 | { | 298 | { |
307 | qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); | 299 | odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl; |
308 | if ( arp->type() == "REQUEST" ) | 300 | if ( arp->type() == "REQUEST" ) |
309 | { | 301 | { |
@@ -326,8 +318,8 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
326 | if ( dhcp ) | 318 | if ( dhcp ) |
327 | { | 319 | { |
328 | qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() ); | 320 | odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl; |
329 | if ( dhcp->type() == "OFFER" ) | 321 | if ( dhcp->type() == "OFFER" ) |
330 | { | 322 | { |
331 | qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); | 323 | odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; |
332 | netView()->identify( source, dhcp->serverAddress().toString() ); | 324 | netView()->identify( source, dhcp->serverAddress().toString() ); |
333 | netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); | 325 | netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); |
@@ -335,5 +327,5 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
335 | else if ( dhcp->type() == "ACK" ) | 327 | else if ( dhcp->type() == "ACK" ) |
336 | { | 328 | { |
337 | qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); | 329 | odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; |
338 | netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); | 330 | netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); |
339 | } | 331 | } |
@@ -369,5 +361,5 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) | |||
369 | { | 361 | { |
370 | QString action = configwindow->capturePackets->protocolAction( name ); | 362 | QString action = configwindow->capturePackets->protocolAction( name ); |
371 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | 363 | odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; |
372 | if ( action == "Discard" ) | 364 | if ( action == "Discard" ) |
373 | { | 365 | { |
@@ -378,5 +370,5 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) | |||
378 | else | 370 | else |
379 | { | 371 | { |
380 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); | 372 | odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl; |
381 | } | 373 | } |
382 | ++it; | 374 | ++it; |
@@ -552,5 +544,5 @@ void Wellenreiter::startClicked() | |||
552 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; | 544 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; |
553 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; | 545 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; |
554 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; | 546 | case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break; |
555 | default: assert( 0 ); // shouldn't reach this | 547 | default: assert( 0 ); // shouldn't reach this |
556 | } | 548 | } |
@@ -573,5 +565,5 @@ void Wellenreiter::startClicked() | |||
573 | if ( configwindow->enableGPS->isChecked() ) | 565 | if ( configwindow->enableGPS->isChecked() ) |
574 | { | 566 | { |
575 | qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 567 | odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; |
576 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 568 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
577 | } | 569 | } |
@@ -597,5 +589,5 @@ void Wellenreiter::startClicked() | |||
597 | pcap->open( QFile( interface ) ); | 589 | pcap->open( QFile( interface ) ); |
598 | 590 | ||
599 | qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); | 591 | odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl; |
600 | pcap->openDumpFile( dumpname ); | 592 | pcap->openDumpFile( dumpname ); |
601 | 593 | ||
@@ -653,5 +645,5 @@ void Wellenreiter::startClicked() | |||
653 | void Wellenreiter::timerEvent( QTimerEvent* ) | 645 | void Wellenreiter::timerEvent( QTimerEvent* ) |
654 | { | 646 | { |
655 | qDebug( "Wellenreiter::timerEvent()" ); | 647 | odebug << "Wellenreiter::timerEvent()" << oendl; |
656 | OPacket* p = pcap->next(); | 648 | OPacket* p = pcap->next(); |
657 | if ( !p ) // no more packets available | 649 | if ( !p ) // no more packets available |
@@ -716,13 +708,13 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch | |||
716 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | 708 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); |
717 | int count = 3; | 709 | int count = 3; |
718 | qDebug("sending %d messages",count); | 710 | odebug << "sending " << count << " messages" << oendl; |
719 | msg << QString("count") << QString::number(count); | 711 | msg << QString("count") << QString::number(count); |
720 | qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); | 712 | odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl; |
721 | msg << QString(iface->name()) << QString("Mode") << type; | 713 | msg << QString(iface->name()) << QString("Mode") << type; |
722 | qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); | 714 | odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl; |
723 | msg << QString(iface->name()) << QString("ESSID") << essid; | 715 | msg << QString(iface->name()) << QString("ESSID") << essid; |
724 | qDebug("msg >%s< channel >%d<", iface->name(),channel); | 716 | odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl; |
725 | msg << QString(iface->name()) << QString("Channel") << channel; | 717 | msg << QString(iface->name()) << QString("Channel") << channel; |
726 | // qDebug("msg >%s< mac >%s<", iface->name(),macaddr); | 718 | // odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl; |
727 | // msg << QString(iface->name()) << QString("MacAddr") << macaddr; | 719 | // msg << QString(iface->name()) << QString("MacAddr") << macaddr; |
728 | #else | 720 | #else |