summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/graphwindow.cpp34
-rw-r--r--noncore/net/wellenreiter/gui/graphwindow.h26
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp9
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp61
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp68
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h5
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp2
-rw-r--r--noncore/net/wellenreiter/opie-wellenreiter.control2
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro1
14 files changed, 150 insertions, 114 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index ae149e2..1670f93 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -18,2 +18,3 @@
18#include "mainwindow.h" 18#include "mainwindow.h"
19#include "protolistview.h"
19 20
@@ -186,3 +187,6 @@ bool WellenreiterConfigWindow::isChannelChecked( int channel ) const
186 case 14: return channel14->isOn(); 187 case 14: return channel14->isOn();
188 default: return false;
187 } 189 }
190
191
188} 192}
@@ -219,3 +223,3 @@ void WellenreiterConfigWindow::synchronizeActionsAndScripts()
219 223
220void WellenreiterConfigWindow::changedNetworkAction(int t) 224void WellenreiterConfigWindow::changedNetworkAction(int )
221{ 225{
@@ -225,3 +229,3 @@ void WellenreiterConfigWindow::changedNetworkAction(int t)
225 229
226void WellenreiterConfigWindow::changedClientAction(int t) 230void WellenreiterConfigWindow::changedClientAction(int )
227{ 231{
@@ -231,3 +235,3 @@ void WellenreiterConfigWindow::changedClientAction(int t)
231 235
232void WellenreiterConfigWindow::changedStationAction(int t) 236void WellenreiterConfigWindow::changedStationAction(int )
233{ 237{
@@ -282,3 +286,2 @@ int WellenreiterConfigWindow::gpsPort() const
282{ 286{
283 bool ok;
284 return useGPS() ? gpsdPort->value() : -1; 287 return useGPS() ? gpsdPort->value() : -1;
@@ -292,3 +295,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
292 int channel, 295 int channel,
293 int signal 296 int /* signal */
294 /* , const GpsLocation& loc */ ) 297 /* , const GpsLocation& loc */ )
@@ -319,3 +322,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
319 322
320 odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; 323 odebug << "for event '" << type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl;
321 324
@@ -406,2 +409,3 @@ void WellenreiterConfigWindow::load()
406 getCaptureFileName->setEnabled( writeCaptureFile->isChecked() ); 409 getCaptureFileName->setEnabled( writeCaptureFile->isChecked() );
410 parsePackets->setEnabled( writeCaptureFile->isChecked() );
407 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); 411 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) );
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp
index b4174d3..d53421c 100644
--- a/noncore/net/wellenreiter/gui/graphwindow.cpp
+++ b/noncore/net/wellenreiter/gui/graphwindow.cpp
@@ -21,2 +21,29 @@
21 21
22/* XPM */
23static char * background[] = {
24"16 16 6 1",
25 " c None",
26 ".c #52676E",
27 "+c #3F545B",
28 "@c #394E56",
29 "#c #2F454C",
30 "$c #364B52",
31".+++++++++++++++",
32"@###############",
33"+$$$$$$$$$$$$$$$",
34"@###############",
35"+$$$$$$$$$$$$$$$",
36"@###############",
37"+$$$$$$$$$$$$$$$",
38"@###############",
39"+$$$$$$$$$$$$$$$",
40"@###############",
41"+$$$$$$$$$$$$$$$",
42"@###############",
43"+$$$$$$$$$$$$$$$",
44"@###############",
45"+$$$$$$$$$$$$$$$",
46"@###############"};
47
48
22MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) 49MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f)
@@ -87,3 +114,3 @@ void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int heig
87 114
88void MFrequencySpectrum::paintEvent( QPaintEvent* e ) 115void MFrequencySpectrum::paintEvent( QPaintEvent* )
89{ 116{
@@ -120,3 +147,2 @@ void MFrequencySpectrum::mousePressEvent( QMouseEvent* e )
120 int y = size().height() - 2 * ymargin; 147 int y = size().height() - 2 * ymargin;
121 int x = 0;
122 int width = ( size().width() - 2 * xmargin ) / _channels; 148 int width = ( size().width() - 2 * xmargin ) / _channels;
@@ -144,4 +170,2 @@ void Legende::drawContents( QPainter* p )
144 int xmargin = 5; 170 int xmargin = 5;
145 int ymargin = 2;
146 int x = 0;
147 int width = ( contentsRect().width() - 2 * xmargin ) / _channels; 171 int width = ( contentsRect().width() - 2 * xmargin ) / _channels;
@@ -172,3 +196,3 @@ void MGraphWindow::testGraph()
172 196
173void MGraphWindow::timerEvent( QTimerEvent* e ) 197void MGraphWindow::timerEvent( QTimerEvent* )
174{ 198{
diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h
index fafcab1..392d85b 100644
--- a/noncore/net/wellenreiter/gui/graphwindow.h
+++ b/noncore/net/wellenreiter/gui/graphwindow.h
@@ -92,28 +92,2 @@ class MGraphWindow : public QVBox
92 92
93/* XPM */
94static char * background[] = {
95"16 16 6 1",
96 " c None",
97 ".c #52676E",
98 "+c #3F545B",
99 "@c #394E56",
100 "#c #2F454C",
101 "$c #364B52",
102".+++++++++++++++",
103"@###############",
104"+$$$$$$$$$$$$$$$",
105"@###############",
106"+$$$$$$$$$$$$$$$",
107"@###############",
108"+$$$$$$$$$$$$$$$",
109"@###############",
110"+$$$$$$$$$$$$$$$",
111"@###############",
112"+$$$$$$$$$$$$$$$",
113"@###############",
114"+$$$$$$$$$$$$$$$",
115"@###############",
116"+$$$$$$$$$$$$$$$",
117"@###############"};
118
119 93
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 714a9a9..a83f700 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -32,2 +32,4 @@ MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
32 ledit->setReadOnly( true ); 32 ledit->setReadOnly( true );
33 ledit->setUndoEnabled( false );
34
33 35
@@ -40,8 +42,4 @@ void MLogWindow::log( QString text )
40 QTime time = QTime::currentTime(); 42 QTime time = QTime::currentTime();
41 QString line; 43 QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text );
42 line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text ); 44 ledit->insertLine( line );
43 int col;
44 int row;
45 ledit->getCursorPosition( &col, &row );
46 ledit->insertAt( line, col, row );
47 odebug << line << oendl; 45 odebug << line << oendl;
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index ef7ffcf..3e18531 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -33,5 +33,2 @@
33#endif 33#endif
34using namespace Opie::Core;
35using namespace Opie::Net;
36using namespace Opie::Ui;
37 34
@@ -59,2 +56,6 @@ using namespace Opie::Ui;
59 56
57using namespace Opie::Core;
58using namespace Opie::Net;
59using namespace Opie::Ui;
60
60WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) 61WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
@@ -470,3 +471,3 @@ void WellenreiterMainWindow::uploadSession()
470 471
471 int content_length = f.size(); 472// int content_length = f.size();
472 473
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp
index 69438fa..d71111f 100644
--- a/noncore/net/wellenreiter/gui/packetview.cpp
+++ b/noncore/net/wellenreiter/gui/packetview.cpp
@@ -73,2 +73,9 @@ void PacketView::add( const OPacket* p, int size )
73{ 73{
74 /*
75 * don't scroll away when somebody views packages
76 * while scanning
77 */
78 int value = _number->value();
79 bool last = (value == static_cast<int>( _packets.count() ) );
80
74 odebug << "PacketView::add() size = " << size << oendl; 81 odebug << "PacketView::add() size = " << size << oendl;
@@ -80,6 +87,10 @@ void PacketView::add( const OPacket* p, int size )
80 { // limited buffer, limit = size 87 { // limited buffer, limit = size
81 while ( _packets.count() >= size ) 88 while ( _packets.count() >= static_cast<uint>( size ) )
82 { 89 {
83 _packets.removeFirst(); 90 _packets.removeFirst();
91 --value;
84 } 92 }
93
94 /* check if we lost our packet */
95 last = ( value < 1 );
85 _packets.append( p ); 96 _packets.append( p );
@@ -89,3 +100,3 @@ void PacketView::add( const OPacket* p, int size )
89 _number->setMaxValue( _packets.count() ); 100 _number->setMaxValue( _packets.count() );
90 _number->setValue( _packets.count() ); 101 _number->setValue( last ? _packets.count() : value );
91} 102}
@@ -141,2 +152,3 @@ const QString PacketView::getLog() const
141{ 152{
153 return QString::null;
142} 154}
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index 635e174..1e3d195 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -74,3 +74,3 @@ void ProtocolListView::addProtocol( const QString& name )
74 QHBox* hbox = new QHBox( vbox ); 74 QHBox* hbox = new QHBox( vbox );
75 new QCheckBox( name, hbox, (const char*) name ); 75 new QCheckBox( name, hbox, name.local8Bit() );
76 76
@@ -78,3 +78,3 @@ void ProtocolListView::addProtocol( const QString& name )
78 { 78 {
79 QComboBox* combo = new QComboBox( hbox, (const char*) name ); 79 QComboBox* combo = new QComboBox( hbox, name.local8Bit() );
80 #ifdef QWS 80 #ifdef QWS
@@ -94,3 +94,3 @@ void ProtocolListView::addProtocol( const QString& name )
94 { 94 {
95 QComboBox* combo = new QComboBox( hbox, (const char*) name ); 95 QComboBox* combo = new QComboBox( hbox, name.local8Bit() );
96 #ifdef QWS 96 #ifdef QWS
@@ -106,3 +106,3 @@ bool ProtocolListView::isProtocolChecked( const QString& name )
106{ 106{
107 QCheckBox* box = (QCheckBox*) child( (const char*) name ); 107 QCheckBox* box = (QCheckBox*) child( name.local8Bit() );
108 return ( box && box->isOn() ); 108 return ( box && box->isOn() );
@@ -113,3 +113,3 @@ QString ProtocolListView::protocolAction( const QString& name )
113{ 113{
114 QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" ); 114 QComboBox* combo = (QComboBox*) child( name.local8Bit(), "QComboBox" );
115 if ( combo ) 115 if ( combo )
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index cb17f51..13096f2 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -27,3 +27,3 @@ QPixmap loadPixmap( const QString& pix )
27 QString filename; 27 QString filename;
28 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); 28 filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
29 QPixmap pixmap( filename ); 29 QPixmap pixmap( filename );
@@ -39,3 +39,3 @@ QIconSet loadIconSet( const QString& pix )
39 QString filename; 39 QString filename;
40 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); 40 filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
41 QPixmap pixmap( filename ); 41 QPixmap pixmap( filename );
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 9e907d8..fa1d724 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -27,5 +27,3 @@
27#endif 27#endif
28using namespace Opie::Core; 28
29using namespace Opie::Ui;
30using namespace Opie::Net;
31 29
@@ -40,2 +38,6 @@ using namespace Opie::Net;
40 38
39using namespace Opie::Core;
40using namespace Opie::Ui;
41using namespace Opie::Net;
42
41const int col_type = 0; 43const int col_type = 0;
@@ -53,2 +55,4 @@ const int col_location = 10;
53 55
56#define DEBUG
57
54MScanListView::MScanListView( QWidget* parent, const char* name ) 58MScanListView::MScanListView( QWidget* parent, const char* name )
@@ -178,3 +182,3 @@ void MScanListView::addNewItem( const QString& type,
178 { 182 {
179 s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); 183 s = QString( "(i) New network: ESSID '%1'" ).arg( essid );
180 MLogWindow::logwindow()->log( s ); 184 MLogWindow::logwindow()->log( s );
@@ -197,3 +201,3 @@ void MScanListView::addNewItem( const QString& type,
197 { 201 {
198 s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); 202 s = QString( "(i) New Access Point in '%1' [%2]" ).arg( essid ).arg( channel );
199 } 203 }
@@ -201,3 +205,3 @@ void MScanListView::addNewItem( const QString& type,
201 { 205 {
202 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); 206 s = QString( "(i) New AdHoc station in '%1' [%2]" ).arg( essid ).arg( channel );
203 } 207 }
@@ -236,3 +240,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
236 { 240 {
237 s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 241 s = QString( "(i) New Station in '%1' [xx]" ).arg( network->text( col_essid ) );
238 } 242 }
@@ -240,3 +244,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
240 { 244 {
241 s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 245 s = QString( "(i) New Wireless Station in '%1' [xx]" ).arg( network->text( col_essid ) );
242 } 246 }
@@ -248,5 +252,5 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
248{ 252{
249 odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl; 253 odebug << "WDSTraffic: " << viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
250 QString s; 254 QString s;
251 MScanListItem* network; 255// MScanListItem* network;
252 256
@@ -272,6 +276,6 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
272 276
273void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 277void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
274{ 278{
275 QString s; 279 QString s;
276 MScanListItem* network; 280// MScanListItem* network;
277 281
@@ -295,6 +299,6 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
295 299
296void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 300void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
297{ 301{
298 QString s; 302 QString s;
299 MScanListItem* network; 303// MScanListItem* network;
300 304
@@ -317,3 +321,3 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
317 321
318void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 322void MScanListView::IBSStraffic( const OMacAddress& /*from*/, const OMacAddress& /*to*/, const OMacAddress& /*via*/ )
319{ 323{
@@ -326,3 +330,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
326{ 330{
327 odebug << "identify " << (const char*) macaddr.toString() << " = " << ip << "" << oendl; 331 odebug << "identify " << macaddr.toString() << " = " << ip << "" << oendl;
328 332
@@ -338,4 +342,4 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
338 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 342 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!", 343 MLogWindow::logwindow()->log( QString( "WARNING: Unhandled identification %1 = %2!" )
340 (const char*) macaddr.toString(), (const char*) ip ) ); 344 .arg( macaddr.toString() ).arg( ip ) );
341} 345}
@@ -345,3 +349,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
345{ 349{
346 odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << ip << "" << oendl; 350 odebug << "addService '" << name << "', Server = " << macaddr.toString() << " = " << ip << "" << oendl;
347 351
@@ -386,4 +390,4 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
386 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 390 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!", 391 MLogWindow::logwindow()->log( QString("WARNING: Unhandled service addition %s = %s!")
388 (const char*) macaddr.toString(), (const char*) ip ) ); 392 .arg( macaddr.toString() ).arg( ip ) );
389} 393}
@@ -397,4 +401,4 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
397 401
398 odebug << "contextMenuRequested on item '" << (const char*) itm->text(0) << "' (" 402 odebug << "contextMenuRequested on item '" << itm->text(0) << "' ("
399 << (const char*) itm->type << ") in column: '" << col << "'" << oendl; 403 << itm->type << ") in column: '" << col << "'" << oendl;
400 404
@@ -402,3 +406,3 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
402 { 406 {
403 QString entry = QString().sprintf( "&Join %s Net '%s'...", (const char*) itm->type, (const char*) itm->essid() ); 407 QString entry = QString( "&Join %1 Net '%2'..." ).arg( itm->type ).arg( itm->essid() );
404 408
@@ -481,4 +485,3 @@ void MScanListItem::serializeFrom( QDataStream& s )
481 485
482 QString name; 486 QString name = QString( "wellenreiter/"+ _type );
483 name.sprintf( "wellenreiter/%s", (const char*) _type );
484 setPixmap( col_type, Resource::loadPixmap( name ) ); 487 setPixmap( col_type, Resource::loadPixmap( name ) );
@@ -492,4 +495,4 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
492 #ifdef DEBUG 495 #ifdef DEBUG
493 odebug << "decorating scanlist item " << (const char*) type << " / " 496 odebug << "decorating scanlist item " << type << " / "
494 << (const char*) essid << " / " << (const char*) macaddr 497 << essid << " / " << macaddr
495 << "[" << channel << "]" << oendl; 498 << "[" << channel << "]" << oendl;
@@ -499,3 +502,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
499 QString name; 502 QString name;
500 name.sprintf( "wellenreiter/%s", (const char*) type ); 503 name.sprintf( "wellenreiter/"+ type );
501 setPixmap( col_type, Resource::loadPixmap( name ) ); 504 setPixmap( col_type, Resource::loadPixmap( name ) );
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index e801ce7..df8e9c3 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -35,5 +35,2 @@
35#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
36using namespace Opie::Core;
37using namespace Opie::Net;
38using namespace Opie::Ui;
39 36
@@ -62,2 +59,7 @@ using namespace Opie::Ui;
62 59
60
61using namespace Opie::Core;
62using namespace Opie::Net;
63using namespace Opie::Ui;
64
63Wellenreiter* Wellenreiter::instance = 0; 65Wellenreiter* Wellenreiter::instance = 0;
@@ -76,4 +78,3 @@ Wellenreiter::Wellenreiter( QWidget* parent )
76 #ifdef QWS 78 #ifdef QWS
77 QString sys; 79 QString sys = QString( "(i) Running on '%1'.").arg( ODevice::inst()->systemString() );
78 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
79 _system = ODevice::inst()->system(); 80 _system = ODevice::inst()->system();
@@ -112,2 +113,3 @@ void Wellenreiter::signalHandler( int sig )
112{ 113{
114 Q_UNUSED( sig )
113 oerr << "Aye! Received SIGSEGV or SIGBUS! Trying to exit gracefully..." << oendl; 115 oerr << "Aye! Received SIGSEGV or SIGBUS! Trying to exit gracefully..." << oendl;
@@ -178,3 +180,3 @@ void Wellenreiter::handleNotification( OPacket* p )
178 QString action = configwindow->parsePackets->protocolAction( name ); 180 QString action = configwindow->parsePackets->protocolAction( name );
179 odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl; 181 odebug << "parsePacket-action for '" << name << "' seems to be '" << action << "'" << oendl;
180 doAction( action, name, p ); 182 doAction( action, name, p );
@@ -199,3 +201,3 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket*
199 201
200void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* request ) 202void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* /* request */ )
201{ 203{
@@ -203,4 +205,4 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
203 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>"); 205 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>");
204 OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); 206// OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
205 int channel = ds ? ds->channel() : -1; 207// int channel = ds ? ds->channel() : -1;
206 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 208 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
@@ -222,3 +224,3 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
222 224
223void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* response ) 225void Wellenreiter::handleManagementFrameProbeResponse( OPacket* /* p */, OWaveLanManagementPacket* /* response */ )
224{ 226{
@@ -289,3 +291,3 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
289 291
290void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to ) 292void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* /* data */ , OMacAddress& from, OMacAddress& to )
291{ 293{
@@ -319,3 +321,3 @@ void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAdd
319 321
320void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAddress& from, OMacAddress& to ) 322void Wellenreiter::handleEthernetData( OPacket* /* p */, OEthernetPacket* data, OMacAddress& from, OMacAddress& to )
321{ 323{
@@ -328,3 +330,3 @@ void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAd
328 330
329void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest ) 331void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& /* source */, OMacAddress& /* dest */ )
330{ 332{
@@ -347,3 +349,3 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source,
347 349
348void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest ) 350void Wellenreiter::handleIPData( OPacket* p, OIPPacket* /* ip */, OMacAddress& source, OMacAddress& /* dest */ )
349{ 351{
@@ -357,3 +359,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
357 { 359 {
358 odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; 360 odebug << "DHCP: '" << source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
359 netView()->identify( source, dhcp->serverAddress().toString() ); 361 netView()->identify( source, dhcp->serverAddress().toString() );
@@ -363,3 +365,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
363 { 365 {
364 odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; 366 odebug << "DHCP: '" << dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
365 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); 367 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
@@ -397,6 +399,6 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
397 QString action = configwindow->capturePackets->protocolAction( name ); 399 QString action = configwindow->capturePackets->protocolAction( name );
398 odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl; 400 odebug << "capturePackets-action for '" << name << "' seems to be '" << action << "'" << oendl;
399 if ( action == "Discard" ) 401 if ( action == "Discard" )
400 { 402 {
401 logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); 403 logwindow->log( QString("(i) dump-discarding of '%1' packet requested." ).arg( name ) );
402 return false; 404 return false;
@@ -522,5 +524,3 @@ void Wellenreiter::stopClicked()
522 524
523 // print out statistics 525 updateStatistics();
524 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
525 statwindow->updateCounter( it.key(), it.data() );
526} 526}
@@ -534,3 +534,3 @@ void Wellenreiter::startClicked()
534 const int cardtype = configwindow->driverType(); 534 const int cardtype = configwindow->driverType();
535 const int interval = configwindow->hoppingInterval(); 535// const int interval = configwindow->hoppingInterval();
536 536
@@ -706,3 +706,3 @@ void Wellenreiter::timerEvent( QTimerEvent* )
706 706
707void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) 707void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* /* p */ )
708{ 708{
@@ -720,6 +720,6 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa
720 else if ( action == "LogMessage" ) 720 else if ( action == "LogMessage" )
721 logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 721 logwindow->log( QString(tr("Got packet with protocol '%1'","Protocol Name" ) ).arg( protocol ) );
722 else if ( action == "MessageBox" ) 722 else if ( action == "MessageBox" )
723 QMessageBox::information( this, "Notification!", 723 QMessageBox::information( this, "Notification!",
724 QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 724 QString(tr( "Got packet with protocol '%1'", "Protocol Name" ) ).arg( protocol ) );
725 #else 725 #else
@@ -744,5 +744,5 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
744 744
745 odebug << "joinNetwork() with Interface " << (const char*) iface->name() 745 odebug << "joinNetwork() with Interface " << iface->name()
746 << ": " << (const char*) type << ", " << (const char*) essid 746 << ": " << type << ", " << essid
747 << ", " << channel << ", " << (const char*) macaddr << oendl; 747 << ", " << channel << ", " << macaddr << oendl;
748 748
@@ -766 +766,13 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
766 766
767void Wellenreiter::updateStatistics()
768{
769 // print out statistics
770 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
771 statwindow->updateCounter( it.key(), it.data() );
772}
773
774void Wellenreiter::slotTabChanged( QWidget* wid )
775{
776 if ( wid == statwindow )
777 updateStatistics();
778}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index f582a5f..5ac389e 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -95,3 +95,8 @@ class Wellenreiter : public WellenreiterBase {
95 95
96 private slots:
97 void slotTabChanged( QWidget* );
98
96 private: 99 private:
100 void updateStatistics();
101
97 #ifdef QWS 102 #ifdef QWS
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index a29d520..0ca0bd7 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -160,2 +160,4 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f
160 160
161 connect(TabWidget, SIGNAL(currentChanged(QWidget*)),
162 this, SLOT(slotTabChanged(QWidget*)));
161} 163}
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control
index cbc287a..e7bc25d 100644
--- a/noncore/net/wellenreiter/opie-wellenreiter.control
+++ b/noncore/net/wellenreiter/opie-wellenreiter.control
@@ -6,3 +6,3 @@ Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: 1.0.3 7Version: 1.0.3-cvs
8Depends: libqpe1, libpcap0 (>=0.7.2), libopiecore2, libopienet2, libopieui2 8Depends: libqpe1, libpcap0 (>=0.7.2), libopiecore2, libopienet2, libopieui2
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index eb60c4a..53b762a 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,2 +1,3 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2VERSION = 1.0.3-cvs
2 3