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 | |||
@@ -25,3 +25,5 @@ | |||
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 |
@@ -42,11 +44,5 @@ using namespace Opie; | |||
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; |
@@ -118,3 +114,3 @@ void WellenreiterConfigWindow::performAutodetection() | |||
118 | 114 | ||
119 | qDebug( "WellenreiterConfigWindow::performAutodetection()" ); | 115 | odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; |
120 | 116 | ||
@@ -139,3 +135,3 @@ void WellenreiterConfigWindow::performAutodetection() | |||
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 | } |
@@ -243,3 +239,3 @@ void WellenreiterConfigWindow::getCaptureFileNameClicked() | |||
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() ) |
@@ -318,3 +314,3 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
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; |
@@ -322,3 +318,3 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
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 | ||
@@ -347,5 +343,5 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
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; |
@@ -363,3 +359,3 @@ void WellenreiterConfigWindow::load() | |||
363 | #else | 359 | #else |
364 | qDebug( "loading configuration settings..." ); | 360 | odebug << "loading configuration settings..." << oendl; |
365 | 361 | ||
@@ -441,3 +437,3 @@ void WellenreiterConfigWindow::save() | |||
441 | #else | 437 | #else |
442 | qDebug( "saving configuration settings..." ); | 438 | odebug << "saving configuration settings..." << oendl; |
443 | 439 | ||
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 | |||
@@ -17,2 +17,6 @@ | |||
17 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
20 | using namespace Opie::Core; | ||
21 | |||
18 | /* QT */ | 22 | /* QT */ |
@@ -27,3 +31,3 @@ GPS::GPS( QObject* parent, const char * 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" ); |
@@ -34,3 +38,3 @@ GPS::~GPS() | |||
34 | { | 38 | { |
35 | qDebug( "GPS::~GPS()" ); | 39 | odebug << "GPS::~GPS()" << oendl; |
36 | } | 40 | } |
@@ -55,3 +59,3 @@ GpsLocation GPS::position() const | |||
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 ) |
@@ -63,3 +67,3 @@ GpsLocation GPS::position() const | |||
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 ); |
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 | |||
@@ -16,2 +16,8 @@ | |||
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> |
@@ -40,3 +46,3 @@ void MLogWindow::log( QString text ) | |||
40 | ledit->insertAt( line, col, row ); | 46 | ledit->insertAt( line, col, row ); |
41 | qDebug( line ); | 47 | odebug << line << oendl; |
42 | } | 48 | } |
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 | |||
@@ -16,3 +16,5 @@ | |||
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> |
@@ -23,2 +25,3 @@ | |||
23 | 25 | ||
26 | /* QT */ | ||
24 | #include <qmessagebox.h> | 27 | #include <qmessagebox.h> |
@@ -26,2 +29,3 @@ | |||
26 | 29 | ||
30 | /* STD */ | ||
27 | #include <errno.h> | 31 | #include <errno.h> |
@@ -32,4 +36,3 @@ | |||
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 ) |
@@ -57,6 +60,6 @@ int main( int argc, char **argv ) | |||
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; |
@@ -71,3 +74,3 @@ int main( int argc, char **argv ) | |||
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" |
@@ -88,3 +91,3 @@ int main( int argc, char **argv ) | |||
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 |
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 | |||
@@ -23,2 +23,17 @@ | |||
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> |
@@ -41,19 +56,5 @@ | |||
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 ) |
@@ -190,3 +191,3 @@ void WellenreiterMainWindow::showConfigure() | |||
190 | { | 191 | { |
191 | qDebug( "show configure..." ); | 192 | odebug << "show configure..." << oendl; |
192 | cw->setCaption( tr( "Configure" ) ); | 193 | cw->setCaption( tr( "Configure" ) ); |
@@ -233,3 +234,3 @@ WellenreiterMainWindow::~WellenreiterMainWindow() | |||
233 | { | 234 | { |
234 | qDebug( "Wellenreiter: bye." ); | 235 | odebug << "Wellenreiter: bye." << oendl; |
235 | }; | 236 | }; |
@@ -253,3 +254,3 @@ void WellenreiterMainWindow::demoReadFromGps() | |||
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() ); |
@@ -307,3 +308,3 @@ void WellenreiterMainWindow::fileSaveLog() | |||
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 | } |
@@ -311,3 +312,3 @@ void WellenreiterMainWindow::fileSaveLog() | |||
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 | } |
@@ -328,3 +329,3 @@ void WellenreiterMainWindow::fileSaveSession() | |||
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 | } |
@@ -332,3 +333,3 @@ void WellenreiterMainWindow::fileSaveSession() | |||
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 | } |
@@ -350,3 +351,3 @@ void WellenreiterMainWindow::fileSaveHex() | |||
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 | } |
@@ -354,3 +355,3 @@ void WellenreiterMainWindow::fileSaveHex() | |||
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 | } |
@@ -371,3 +372,3 @@ void WellenreiterMainWindow::fileLoadSession() | |||
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 | } |
@@ -375,3 +376,3 @@ void WellenreiterMainWindow::fileLoadSession() | |||
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 | } |
@@ -440,3 +441,3 @@ void WellenreiterMainWindow::uploadSession() | |||
440 | { | 441 | { |
441 | qDebug( "Session upload cancelled :(" ); | 442 | odebug << "Session upload cancelled :(" << oendl; |
442 | return; | 443 | return; |
@@ -444,3 +445,3 @@ void WellenreiterMainWindow::uploadSession() | |||
444 | 445 | ||
445 | qDebug( "Starting upload..." ); | 446 | odebug << "Starting upload..." << oendl; |
446 | 447 | ||
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 | |||
@@ -86,3 +86,3 @@ void PacketView::showPacket( int number ) | |||
86 | { | 86 | { |
87 | qDebug( "D'oh! No packet!" ); | 87 | odebug << "D'oh! No packet!" << oendl; |
88 | } | 88 | } |
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 | |||
@@ -31,3 +31,3 @@ QPixmap loadPixmap( const QString& pix ) | |||
31 | { | 31 | { |
32 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 32 | odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; |
33 | } | 33 | } |
@@ -43,3 +43,3 @@ QIconSet loadIconSet( const QString& pix ) | |||
43 | { | 43 | { |
44 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 44 | odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; |
45 | } | 45 | } |
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 | |||
@@ -19,13 +19,6 @@ | |||
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> |
@@ -34,2 +27,14 @@ | |||
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 | ||
@@ -48,8 +53,2 @@ 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 ) |
@@ -108,3 +107,3 @@ 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 ); |
@@ -115,3 +114,3 @@ void MScanListView::serializeFrom( QDataStream& s) | |||
115 | { | 114 | { |
116 | qDebug( "serializing MScanListView" ); | 115 | odebug << "serializing MScanListView" << oendl; |
117 | OListView::serializeFrom( s ); | 116 | OListView::serializeFrom( s ); |
@@ -145,3 +144,3 @@ void MScanListView::addNewItem( const QString& type, | |||
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 |
@@ -161,3 +160,3 @@ void MScanListView::addNewItem( const QString& type, | |||
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 |
@@ -170,3 +169,3 @@ void MScanListView::addNewItem( const QString& type, | |||
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 |
@@ -188,3 +187,3 @@ void MScanListView::addNewItem( const QString& type, | |||
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 |
@@ -214,3 +213,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& | |||
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 |
@@ -223,3 +222,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& | |||
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 |
@@ -248,3 +247,3 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, | |||
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; |
@@ -266,3 +265,3 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, | |||
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!" ); |
@@ -288,3 +287,3 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, | |||
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!" ); |
@@ -311,3 +310,3 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t | |||
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!" ); |
@@ -319,3 +318,3 @@ void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, | |||
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!" ); |
@@ -326,3 +325,3 @@ 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 | ||
@@ -337,3 +336,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) | |||
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!", |
@@ -345,3 +344,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
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 | ||
@@ -362,3 +361,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
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 |
@@ -371,3 +370,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
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 |
@@ -385,3 +384,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, | |||
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!", |
@@ -423,3 +422,3 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr | |||
423 | #ifdef DEBUG | 422 | #ifdef DEBUG |
424 | qDebug( "creating scanlist item" ); | 423 | odebug << "creating scanlist item" << oendl; |
425 | #endif | 424 | #endif |
@@ -437,3 +436,3 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const | |||
437 | #ifdef DEBUG | 436 | #ifdef DEBUG |
438 | qDebug( "creating scanlist item" ); | 437 | odebug << "creating scanlist item" << oendl; |
439 | #endif | 438 | #endif |
@@ -461,3 +460,3 @@ void MScanListItem::serializeTo( QDataStream& s ) const | |||
461 | #ifdef DEBUG | 460 | #ifdef DEBUG |
462 | qDebug( "serializing MScanListItem" ); | 461 | odebug << "serializing MScanListItem" << oendl; |
463 | #endif | 462 | #endif |
@@ -472,3 +471,3 @@ void MScanListItem::serializeFrom( QDataStream& s ) | |||
472 | #ifdef DEBUG | 471 | #ifdef DEBUG |
473 | qDebug( "serializing MScanListItem" ); | 472 | odebug << "serializing MScanListItem" << oendl; |
474 | #endif | 473 | #endif |
@@ -558,3 +557,3 @@ void MScanListItem::receivedBeacon() | |||
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 |
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 | |||
@@ -13,4 +13,2 @@ | |||
13 | 13 | ||
14 | // Local | ||
15 | |||
16 | #include "gps.h" | 14 | #include "gps.h" |
@@ -25,6 +23,6 @@ | |||
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> |
@@ -37,6 +35,7 @@ | |||
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> |
@@ -54,4 +53,3 @@ using namespace Opie; | |||
54 | 53 | ||
55 | // Standard | 54 | /* STD */ |
56 | |||
57 | #include <assert.h> | 55 | #include <assert.h> |
@@ -63,8 +61,2 @@ using namespace Opie; | |||
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 ) |
@@ -108,3 +100,3 @@ void Wellenreiter::initialTimer() | |||
108 | { | 100 | { |
109 | qDebug( "Wellenreiter::preloading manufacturer database..." ); | 101 | odebug << "Wellenreiter::preloading manufacturer database..." << oendl; |
110 | OManufacturerDB::instance(); | 102 | OManufacturerDB::instance(); |
@@ -151,3 +143,3 @@ void Wellenreiter::handleNotification( OPacket* p ) | |||
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 ); |
@@ -156,3 +148,3 @@ void Wellenreiter::handleNotification( OPacket* p ) | |||
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 | } |
@@ -168,3 +160,3 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* | |||
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 | } |
@@ -184,5 +176,5 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage | |||
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 | } |
@@ -191,3 +183,3 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage | |||
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 | } |
@@ -213,3 +205,3 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa | |||
213 | { | 205 | { |
214 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); | 206 | owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; |
215 | return; | 207 | return; |
@@ -228,5 +220,5 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa | |||
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 | } |
@@ -257,3 +249,3 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro | |||
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 | } |
@@ -306,3 +298,3 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, | |||
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" ) |
@@ -327,6 +319,6 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
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() ); |
@@ -336,3 +328,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
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() ); |
@@ -370,3 +362,3 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) | |||
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" ) |
@@ -379,3 +371,3 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) | |||
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 | } |
@@ -553,3 +545,3 @@ void Wellenreiter::startClicked() | |||
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 |
@@ -574,3 +566,3 @@ void Wellenreiter::startClicked() | |||
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() ); |
@@ -598,3 +590,3 @@ void Wellenreiter::startClicked() | |||
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 ); |
@@ -654,3 +646,3 @@ 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(); |
@@ -717,11 +709,11 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch | |||
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; |