summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-02-07 20:20:24 (UTC)
committer mickeyl <mickeyl>2004-02-07 20:20:24 (UTC)
commit9212a1715e5092ce143043770c5f2ff86db907ee (patch) (unidiff)
treebb1058f0ea85d0bc4556ac0efebdf00ffa113975
parentb2ddc28220478b9f60201c06629db744db461d68 (diff)
downloadopie-9212a1715e5092ce143043770c5f2ff86db907ee.zip
opie-9212a1715e5092ce143043770c5f2ff86db907ee.tar.gz
opie-9212a1715e5092ce143043770c5f2ff86db907ee.tar.bz2
no longer link against libopie1 since libopie2 provides everything
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro2
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp13
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h6
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.h3
8 files changed, 15 insertions, 18 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 9358866..ca53471 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -1,73 +1,73 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16/* LOCAL */ 16/* LOCAL */
17#include "configwindow.h" 17#include "configwindow.h"
18#include "mainwindow.h" 18#include "mainwindow.h"
19 19
20/* OPIE */ 20/* OPIE */
21#include <opie2/onetwork.h> 21#include <opie2/onetwork.h>
22#ifdef QWS 22#ifdef QWS
23#include <opie2/oapplication.h> 23#include <opie2/oapplication.h>
24#include <opie2/oconfig.h> 24#include <opie2/oconfig.h>
25#include <opie/odevice.h> 25#include <opie2/odevice.h>
26using namespace Opie; 26using namespace Opie;
27#endif 27#endif
28 28
29/* QT */ 29/* QT */
30#include <qapplication.h> 30#include <qapplication.h>
31#include <qcheckbox.h> 31#include <qcheckbox.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qlineedit.h> 34#include <qlineedit.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qmap.h> 36#include <qmap.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qtabwidget.h> 38#include <qtabwidget.h>
39#include <qtoolbutton.h> 39#include <qtoolbutton.h>
40#include <qspinbox.h> 40#include <qspinbox.h>
41#include <qtextstream.h> 41#include <qtextstream.h>
42 42
43/* POSIX */ 43/* POSIX */
44#include <assert.h> 44#include <assert.h>
45 45
46WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; 46WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0;
47 47
48WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) 48WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
49 :WellenreiterConfigBase( parent, name, true, f ) 49 :WellenreiterConfigBase( parent, name, true, f )
50{ 50{
51 _devicetype[ "cisco" ] = DEVTYPE_CISCO; 51 _devicetype[ "cisco" ] = DEVTYPE_CISCO;
52 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; 52 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG;
53 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; 53 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP;
54 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; 54 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO;
55 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; 55 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL;
56 _devicetype[ "<file>" ] = DEVTYPE_FILE; 56 _devicetype[ "<file>" ] = DEVTYPE_FILE;
57 57
58 // gather possible interface names from ONetwork 58 // gather possible interface names from ONetwork
59 ONetwork* net = ONetwork::instance(); 59 ONetwork* net = ONetwork::instance();
60 ONetwork::InterfaceIterator it = net->iterator(); 60 ONetwork::InterfaceIterator it = net->iterator();
61 while ( it.current() ) 61 while ( it.current() )
62 { 62 {
63 if ( it.current()->isWireless() ) 63 if ( it.current()->isWireless() )
64 interfaceName->insertItem( it.current()->name() ); 64 interfaceName->insertItem( it.current()->name() );
65 ++it; 65 ++it;
66 } 66 }
67 67
68 load(); 68 load();
69 69
70 #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here 70 #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here
71 QPushButton* okButton = new QPushButton( "ok", this ); 71 QPushButton* okButton = new QPushButton( "ok", this );
72 okButton->show(); 72 okButton->show();
73 WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui 73 WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 188d96a..7957d4c 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -1,47 +1,47 @@
1DESTDIR = $(OPIEDIR)/bin 1DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app 2TEMPLATE = app
3CONFIG = qt warn_on debug 3CONFIG = qt warn_on debug
4 4
5HEADERS = wellenreiterbase.h \ 5HEADERS = wellenreiterbase.h \
6 mainwindow.h \ 6 mainwindow.h \
7 wellenreiter.h \ 7 wellenreiter.h \
8 scanlist.h \ 8 scanlist.h \
9 logwindow.h \ 9 logwindow.h \
10 hexwindow.h \ 10 hexwindow.h \
11 statwindow.h \ 11 statwindow.h \
12 configwindow.h \ 12 configwindow.h \
13 graphwindow.h \ 13 graphwindow.h \
14 protolistview.h \ 14 protolistview.h \
15 gps.h 15 gps.h
16 16
17SOURCES = main.cpp \ 17SOURCES = main.cpp \
18 mainwindow.cpp \ 18 mainwindow.cpp \
19 wellenreiterbase.cpp \ 19 wellenreiterbase.cpp \
20 wellenreiter.cpp \ 20 wellenreiter.cpp \
21 scanlist.cpp \ 21 scanlist.cpp \
22 logwindow.cpp \ 22 logwindow.cpp \
23 hexwindow.cpp \ 23 hexwindow.cpp \
24 statwindow.cpp \ 24 statwindow.cpp \
25 configwindow.cpp \ 25 configwindow.cpp \
26 graphwindow.cpp \ 26 graphwindow.cpp \
27 protolistview.cpp \ 27 protolistview.cpp \
28 gps.cpp 28 gps.cpp
29 29
30INCLUDEPATH += $(OPIEDIR)/include 30INCLUDEPATH += $(OPIEDIR)/include
31DEPENDPATH += $(OPIEDIR)/include 31DEPENDPATH += $(OPIEDIR)/include
32INTERFACES = configbase.ui 32INTERFACES = configbase.ui
33TARGET = wellenreiter 33TARGET = wellenreiter
34 34
35!contains( platform, x11 ) { 35!contains( platform, x11 ) {
36 message( qws ) 36 message( qws )
37 include ( $(OPIEDIR)/include.pro ) 37 include ( $(OPIEDIR)/include.pro )
38 LIBS += -lqpe -lopie -lopiecore2 -lopieui2 -lopienet2 38 LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2
39} 39}
40 40
41contains( platform, x11 ) { 41contains( platform, x11 ) {
42 LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter 42 LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter
43 SOURCES += resource.cpp 43 SOURCES += resource.cpp
44 HEADERS += resource.h 44 HEADERS += resource.h
45 DESTDIR = $(OPIEDIR)/output/bin 45 DESTDIR = $(OPIEDIR)/output/bin
46} 46}
47 47
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index d4e3279..05a8913 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -1,90 +1,91 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "configwindow.h" 16#include "configwindow.h"
17#include "gps.h" 17#include "gps.h"
18#include "logwindow.h" 18#include "logwindow.h"
19#include "hexwindow.h" 19#include "hexwindow.h"
20#include "mainwindow.h" 20#include "mainwindow.h"
21#include "wellenreiter.h" 21#include "wellenreiter.h"
22#include "scanlist.h" 22#include "scanlist.h"
23 23
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qdatastream.h> 25#include <qdatastream.h>
26#include <qfile.h> 26#include <qfile.h>
27#include <qfileinfo.h> 27#include <qfileinfo.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qiconset.h> 31#include <qiconset.h>
32#include <qmenubar.h> 32#include <qmenubar.h>
33#include <qmessagebox.h> 33#include <qmessagebox.h>
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35#include <qpushbutton.h> 35#include <qpushbutton.h>
36#include <qstatusbar.h> 36#include <qstatusbar.h>
37#include <qtextstream.h> 37#include <qtextstream.h>
38#include <qtoolbutton.h> 38#include <qtoolbutton.h>
39 39
40#ifdef QWS 40#ifdef QWS
41#include <qpe/resource.h> 41#include <qpe/resource.h>
42#include <opie/ofiledialog.h> 42#include <opie2/ofiledialog.h>
43using namespace Opie;
43#else 44#else
44#include "resource.h" 45#include "resource.h"
45#include <qapplication.h> 46#include <qapplication.h>
46#include <qfiledialog.h> 47#include <qfiledialog.h>
47#endif 48#endif
48 49
49WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) 50WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
50 :QMainWindow( parent, name, f ) 51 :QMainWindow( parent, name, f )
51{ 52{
52 cw = new WellenreiterConfigWindow( this ); 53 cw = new WellenreiterConfigWindow( this );
53 mw = new Wellenreiter( this ); 54 mw = new Wellenreiter( this );
54 mw->setConfigWindow( cw ); 55 mw->setConfigWindow( cw );
55 setCentralWidget( mw ); 56 setCentralWidget( mw );
56 57
57 // setup application icon 58 // setup application icon
58 59
59 #ifndef QWS 60 #ifndef QWS
60 setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); 61 setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) );
61 setIconText( "Wellenreiter/X11" ); 62 setIconText( "Wellenreiter/X11" );
62 #endif 63 #endif
63 64
64 // setup tool buttons 65 // setup tool buttons
65 66
66 startButton = new QToolButton( 0 ); 67 startButton = new QToolButton( 0 );
67 #ifdef QWS 68 #ifdef QWS
68 startButton->setAutoRaise( true ); 69 startButton->setAutoRaise( true );
69 #endif 70 #endif
70 startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); 71 startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) );
71 startButton->setEnabled( false ); 72 startButton->setEnabled( false );
72 connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); 73 connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) );
73 74
74 stopButton = new QToolButton( 0 ); 75 stopButton = new QToolButton( 0 );
75 #ifdef QWS 76 #ifdef QWS
76 stopButton->setAutoRaise( true ); 77 stopButton->setAutoRaise( true );
77 #endif 78 #endif
78 stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); 79 stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) );
79 stopButton->setEnabled( false ); 80 stopButton->setEnabled( false );
80 connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); 81 connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) );
81 82
82 QToolButton* d = new QToolButton( 0 ); 83 QToolButton* d = new QToolButton( 0 );
83 #ifdef QWS 84 #ifdef QWS
84 d->setAutoRaise( true ); 85 d->setAutoRaise( true );
85 #endif 86 #endif
86 d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); 87 d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) );
87 connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); 88 connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) );
88 89
89 uploadButton = new QToolButton( 0 ); 90 uploadButton = new QToolButton( 0 );
90 #ifdef QWS 91 #ifdef QWS
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 10ead53..b42f1df 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -197,96 +197,97 @@ void MScanListView::addNewItem( const QString& type,
197 { 197 {
198 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); 198 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel );
199 } 199 }
200 MLogWindow::logwindow()->log( s ); 200 MLogWindow::logwindow()->log( s );
201} 201}
202 202
203 203
204void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type ) 204void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type )
205{ 205{
206 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); 206 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() );
207 207
208 while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) 208 while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) )
209 { 209 {
210 #ifdef DEBUG 210 #ifdef DEBUG
211 qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); 211 qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) );
212 #endif 212 #endif
213 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); 213 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() );
214 } 214 }
215 215
216 if ( subitem ) 216 if ( subitem )
217 { 217 {
218 // we have already seen this item, it's a dupe 218 // we have already seen this item, it's a dupe
219 #ifdef DEBUG 219 #ifdef DEBUG
220 qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); 220 qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) );
221 #endif 221 #endif
222 subitem->receivedBeacon(); //FIXME: sent data bit 222 subitem->receivedBeacon(); //FIXME: sent data bit
223 return; 223 return;
224 } 224 }
225 225
226 // Hey, it seems to be a new item :-D 226 // Hey, it seems to be a new item :-D
227 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 ); 227 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 );
228 station->setManufacturer( addr.manufacturer() ); 228 station->setManufacturer( addr.manufacturer() );
229 229
230 QString s; 230 QString s;
231 if ( type == "station" ) 231 if ( type == "station" )
232 { 232 {
233 s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 233 s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) );
234 } 234 }
235 else 235 else
236 { 236 {
237 s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 237 s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) );
238 } 238 }
239 MLogWindow::logwindow()->log( s ); 239 MLogWindow::logwindow()->log( s );
240} 240}
241 241
242 242
243void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) 243void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo )
244{ 244{
245 qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() );
245 QString s; 246 QString s;
246 MScanListItem* network; 247 MScanListItem* network;
247 248
248 QListViewItemIterator it( this ); 249 QListViewItemIterator it( this );
249 while ( it.current() && 250 while ( it.current() &&
250 it.current()->text( col_ap ) != viaFrom.toString(true) && 251 it.current()->text( col_ap ) != viaFrom.toString(true) &&
251 it.current()->text( col_ap ) != viaTo.toString(true) ) ++it; 252 it.current()->text( col_ap ) != viaTo.toString(true) ) ++it;
252 253
253 MScanListItem* item = static_cast<MScanListItem*>( it.current() ); 254 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
254 255
255 if ( item ) // Either viaFrom or viaTo AP has shown up yet, so just add our two new stations 256 if ( item ) // Either viaFrom or viaTo AP has shown up yet, so just add our two new stations
256 { 257 {
257 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); 258 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from );
258 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to ); 259 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to );
259 } 260 }
260 else 261 else
261 { 262 {
262 qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); 263 qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" );
263 MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); 264 MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" );
264 } 265 }
265} 266}
266 267
267 268
268void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 269void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
269{ 270{
270 QString s; 271 QString s;
271 MScanListItem* network; 272 MScanListItem* network;
272 273
273 QListViewItemIterator it( this ); 274 QListViewItemIterator it( this );
274 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it; 275 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it;
275 276
276 MScanListItem* item = static_cast<MScanListItem*>( it.current() ); 277 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
277 278
278 if ( item ) // AP has shown up yet, so just add our new "from" - station 279 if ( item ) // AP has shown up yet, so just add our new "from" - station
279 { 280 {
280 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" ); 281 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
281 } 282 }
282 else 283 else
283 { 284 {
284 qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); 285 qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
285 MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); 286 MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" );
286 287
287 } 288 }
288} 289}
289 290
290 291
291void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 292void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
292{ 293{
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index cd74bed..43a04e3 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -1,91 +1,86 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5** 3**
6** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 6** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 7** packaging of this file.
10** 8**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 11**
14***********************************************************************/ 12***********************************************************************/
15 13
16// Local 14// Local
17 15
18#include "gps.h" 16#include "gps.h"
19#include "wellenreiter.h" 17#include "wellenreiter.h"
20#include "scanlist.h" 18#include "scanlist.h"
21#include "logwindow.h" 19#include "logwindow.h"
22#include "hexwindow.h" 20#include "hexwindow.h"
23#include "configwindow.h" 21#include "configwindow.h"
24#include "statwindow.h" 22#include "statwindow.h"
25#include "graphwindow.h" 23#include "graphwindow.h"
26#include "protolistview.h" 24#include "protolistview.h"
27 25
28// Opie 26// Opie
29 27
30#ifdef QWS 28#ifdef QWS
31#include <opie/odevice.h>
32#include <qpe/qcopenvelope_qws.h>
33using namespace Opie;
34#endif
35
36#ifdef QWS
37#include <opie2/oapplication.h> 29#include <opie2/oapplication.h>
30#include <opie2/odevice.h>
38#else 31#else
39#include <qapplication.h> 32#include <qapplication.h>
40#endif 33#endif
41#include <opie2/omanufacturerdb.h> 34#include <opie2/omanufacturerdb.h>
42#include <opie2/onetwork.h> 35#include <opie2/onetwork.h>
43#include <opie2/opcap.h> 36#include <opie2/opcap.h>
37#include <qpe/qcopenvelope_qws.h>
38using namespace Opie;
44 39
45// Qt 40// Qt
46 41
47#include <qcheckbox.h> 42#include <qcheckbox.h>
48#include <qcombobox.h> 43#include <qcombobox.h>
49#include <qdatetime.h> 44#include <qdatetime.h>
50#include <qpushbutton.h> 45#include <qpushbutton.h>
51#include <qlineedit.h> 46#include <qlineedit.h>
52#include <qmessagebox.h> 47#include <qmessagebox.h>
53#include <qobjectlist.h> 48#include <qobjectlist.h>
54#include <qregexp.h> 49#include <qregexp.h>
55#include <qspinbox.h> 50#include <qspinbox.h>
56#include <qtimer.h> 51#include <qtimer.h>
57#include <qtoolbutton.h> 52#include <qtoolbutton.h>
58#include <qmainwindow.h> 53#include <qmainwindow.h>
59 54
60// Standard 55// Standard
61 56
62#include <assert.h> 57#include <assert.h>
63#include <errno.h> 58#include <errno.h>
64#include <unistd.h> 59#include <unistd.h>
65#include <string.h> 60#include <string.h>
66#include <sys/types.h> 61#include <sys/types.h>
67#include <stdlib.h> 62#include <stdlib.h>
68 63
69Wellenreiter::Wellenreiter( QWidget* parent ) 64Wellenreiter::Wellenreiter( QWidget* parent )
70 : WellenreiterBase( parent, 0, 0 ), 65 : WellenreiterBase( parent, 0, 0 ),
71 sniffing( false ), iface( 0 ), configwindow( 0 ) 66 sniffing( false ), iface( 0 ), configwindow( 0 )
72{ 67{
73 68
74 logwindow->log( "(i) Wellenreiter has been started." ); 69 logwindow->log( "(i) Wellenreiter has been started." );
75 70
76 // 71 //
77 // detect operating system 72 // detect operating system
78 // 73 //
79 74
80 #ifdef QWS 75 #ifdef QWS
81 QString sys; 76 QString sys;
82 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); 77 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
83 _system = ODevice::inst()->system(); 78 _system = ODevice::inst()->system();
84 logwindow->log( sys ); 79 logwindow->log( sys );
85 #endif 80 #endif
86 81
87 netview->setColumnWidthMode( 1, QListView::Manual ); 82 netview->setColumnWidthMode( 1, QListView::Manual );
88 connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ), 83 connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ),
89 this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) ); 84 this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) );
90 pcap = new OPacketCapturer(); 85 pcap = new OPacketCapturer();
91 86
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index a28740b..745486f 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -1,70 +1,68 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5** 3**
6** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 6** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 7** packaging of this file.
10** 8**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 11**
14**********************************************************************/ 12**********************************************************************/
15 13
16#ifndef WELLENREITER_H 14#ifndef WELLENREITER_H
17#define WELLENREITER_H 15#define WELLENREITER_H
18 16
19#include "wellenreiterbase.h" 17#include "wellenreiterbase.h"
20 18
21#ifdef QWS 19#ifdef QWS
22#include <opie/odevice.h> 20#include <opie2/odevice.h>
23using namespace Opie; 21using namespace Opie;
24#endif 22#endif
25 23
26class QTimerEvent; 24class QTimerEvent;
27class QPixmap; 25class QPixmap;
28class OPacket; 26class OPacket;
29class OWaveLanManagementPacket; 27class OWaveLanManagementPacket;
30class OWaveLanControlPacket; 28class OWaveLanControlPacket;
31class OWaveLanDataPacket; 29class OWaveLanDataPacket;
32class OEthernetPacket; 30class OEthernetPacket;
33class OARPPacket; 31class OARPPacket;
34class OMacAddress; 32class OMacAddress;
35class OIPPacket; 33class OIPPacket;
36class OPacketCapturer; 34class OPacketCapturer;
37class OWirelessNetworkInterface; 35class OWirelessNetworkInterface;
38class WellenreiterConfigWindow; 36class WellenreiterConfigWindow;
39class MLogWindow; 37class MLogWindow;
40class MHexWindow; 38class MHexWindow;
41class GPS; 39class GPS;
42 40
43class Wellenreiter : public WellenreiterBase { 41class Wellenreiter : public WellenreiterBase {
44 Q_OBJECT 42 Q_OBJECT
45 43
46 public: 44 public:
47 Wellenreiter( QWidget* parent = 0 ); 45 Wellenreiter( QWidget* parent = 0 );
48 ~Wellenreiter(); 46 ~Wellenreiter();
49 47
50 void setConfigWindow( WellenreiterConfigWindow* cw ); 48 void setConfigWindow( WellenreiterConfigWindow* cw );
51 MScanListView* netView() const { return netview; }; 49 MScanListView* netView() const { return netview; };
52 MLogWindow* logWindow() const { return logwindow; }; 50 MLogWindow* logWindow() const { return logwindow; };
53 MHexWindow* hexWindow() const { return hexwindow; }; 51 MHexWindow* hexWindow() const { return hexwindow; };
54 bool isDaemonRunning() const { return sniffing; }; 52 bool isDaemonRunning() const { return sniffing; };
55 QString captureFileName() const { return dumpname; }; 53 QString captureFileName() const { return dumpname; };
56 54
57 public: 55 public:
58 bool sniffing; 56 bool sniffing;
59 57
60 protected: 58 protected:
61 virtual void timerEvent( QTimerEvent* ); 59 virtual void timerEvent( QTimerEvent* );
62 60
63 public slots: 61 public slots:
64 void initialTimer(); 62 void initialTimer();
65 63
66 void channelHopped(int); 64 void channelHopped(int);
67 void receivePacket(OPacket*); 65 void receivePacket(OPacket*);
68 void startClicked(); 66 void startClicked();
69 void stopClicked(); 67 void stopClicked();
70 68
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index eac5d89..c2413dc 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -1,86 +1,87 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14***********************************************************************/ 14***********************************************************************/
15 15
16#include "wellenreiterbase.h" 16#include "wellenreiterbase.h"
17 17
18#include <qheader.h> 18#include <qheader.h>
19#include <qlabel.h> 19#include <qlabel.h>
20#include <qlistview.h> 20#include <qlistview.h>
21#include <qmultilineedit.h> 21#include <qmultilineedit.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qvariant.h> 24#include <qvariant.h>
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qwhatsthis.h> 26#include <qwhatsthis.h>
27#include <qimage.h> 27#include <qimage.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29 29
30#include "logwindow.h" 30#include "logwindow.h"
31#include "hexwindow.h" 31#include "hexwindow.h"
32#include "scanlist.h" 32#include "scanlist.h"
33#include "statwindow.h" 33#include "statwindow.h"
34#include "graphwindow.h" 34#include "graphwindow.h"
35 35
36#ifdef QWS 36#ifdef QWS
37#include <qpe/resource.h> 37#include <qpe/resource.h>
38#include <opie/otabwidget.h> 38#include <opie2/otabwidget.h>
39using namespace Opie;
39#else 40#else
40#include "resource.h" 41#include "resource.h"
41#include <qtabwidget.h> 42#include <qtabwidget.h>
42#endif 43#endif
43 44
44 45
45/* 46/*
46 * Constructs a WellenreiterBase which is a child of 'parent', with the 47 * Constructs a WellenreiterBase which is a child of 'parent', with the
47 * name 'name' and widget flags set to 'f' 48 * name 'name' and widget flags set to 'f'
48 */ 49 */
49WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) 50WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl )
50 : QWidget( parent, name, fl ) 51 : QWidget( parent, name, fl )
51{ 52{
52 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); 53 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) );
53 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); 54 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) );
54 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); 55 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) );
55 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); 56 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) );
56 57
57 if ( !name ) 58 if ( !name )
58 setName( "WellenreiterBase" ); 59 setName( "WellenreiterBase" );
59 resize( 191, 294 ); 60 resize( 191, 294 );
60#ifdef QWS 61#ifdef QWS
61 setCaption( tr( "Wellenreiter/Opie" ) ); 62 setCaption( tr( "Wellenreiter/Opie" ) );
62#else 63#else
63 setCaption( tr( "Wellenreiter/X11" ) ); 64 setCaption( tr( "Wellenreiter/X11" ) );
64#endif 65#endif
65 WellenreiterBaseLayout = new QVBoxLayout( this ); 66 WellenreiterBaseLayout = new QVBoxLayout( this );
66 WellenreiterBaseLayout->setSpacing( 2 ); 67 WellenreiterBaseLayout->setSpacing( 2 );
67 WellenreiterBaseLayout->setMargin( 0 ); 68 WellenreiterBaseLayout->setMargin( 0 );
68#ifdef QWS 69#ifdef QWS
69 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); 70 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global );
70#else 71#else
71 TabWidget = new QTabWidget( this, "TabWidget" ); 72 TabWidget = new QTabWidget( this, "TabWidget" );
72#endif 73#endif
73 ap = new QWidget( TabWidget, "ap" ); 74 ap = new QWidget( TabWidget, "ap" );
74 apLayout = new QVBoxLayout( ap ); 75 apLayout = new QVBoxLayout( ap );
75 apLayout->setSpacing( 2 ); 76 apLayout->setSpacing( 2 );
76 apLayout->setMargin( 2 ); 77 apLayout->setMargin( 2 );
77 78
78 //--------- NETVIEW TAB -------------- 79 //--------- NETVIEW TAB --------------
79 80
80 netview = new MScanListView( ap ); 81 netview = new MScanListView( ap );
81 apLayout->addWidget( netview ); 82 apLayout->addWidget( netview );
82 83
83 //--------- GRAPH TAB -------------- 84 //--------- GRAPH TAB --------------
84 85
85 graphwindow = new MGraphWindow( TabWidget, "Graph" ); 86 graphwindow = new MGraphWindow( TabWidget, "Graph" );
86 87
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h
index e8dc924..2cc273e 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.h
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h
@@ -1,76 +1,77 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef WELLENREITERBASE_H 16#ifndef WELLENREITERBASE_H
17#define WELLENREITERBASE_H 17#define WELLENREITERBASE_H
18 18
19#include <qvariant.h> 19#include <qvariant.h>
20#include <qwidget.h> 20#include <qwidget.h>
21class QVBoxLayout; 21class QVBoxLayout;
22class QHBoxLayout; 22class QHBoxLayout;
23class QGridLayout; 23class QGridLayout;
24class QLabel; 24class QLabel;
25class MScanListView; 25class MScanListView;
26class MScanListItem; 26class MScanListItem;
27class QPushButton; 27class QPushButton;
28class MLogWindow; 28class MLogWindow;
29class MHexWindow; 29class MHexWindow;
30class MStatWindow; 30class MStatWindow;
31class MGraphWindow; 31class MGraphWindow;
32 32
33#ifdef QWS 33#ifdef QWS
34class OTabWidget; 34#include <opie2/otabwidget.h>
35using namespace Opie;
35#else 36#else
36class QTabWidget; 37class QTabWidget;
37#endif 38#endif
38 39
39class WellenreiterBase : public QWidget 40class WellenreiterBase : public QWidget
40{ 41{
41 Q_OBJECT 42 Q_OBJECT
42 43
43public: 44public:
44 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 45 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
45 ~WellenreiterBase(); 46 ~WellenreiterBase();
46 47
47#ifdef QWS 48#ifdef QWS
48 OTabWidget* TabWidget; 49 OTabWidget* TabWidget;
49#else 50#else
50 QTabWidget* TabWidget; 51 QTabWidget* TabWidget;
51#endif 52#endif
52 QWidget* ap; 53 QWidget* ap;
53 MScanListView* netview; 54 MScanListView* netview;
54 MLogWindow* logwindow; 55 MLogWindow* logwindow;
55 MHexWindow* hexwindow; 56 MHexWindow* hexwindow;
56 MStatWindow* statwindow; 57 MStatWindow* statwindow;
57 MGraphWindow* graphwindow; 58 MGraphWindow* graphwindow;
58 QWidget* about; 59 QWidget* about;
59 QLabel* PixmapLabel1_3_2; 60 QLabel* PixmapLabel1_3_2;
60 QLabel* TextLabel1_4_2; 61 QLabel* TextLabel1_4_2;
61 62
62protected: 63protected:
63 QVBoxLayout* WellenreiterBaseLayout; 64 QVBoxLayout* WellenreiterBaseLayout;
64 QVBoxLayout* apLayout; 65 QVBoxLayout* apLayout;
65 QGridLayout* aboutLayout; 66 QGridLayout* aboutLayout;
66 bool event( QEvent* ); 67 bool event( QEvent* );
67 68
68 QPixmap* ani1; 69 QPixmap* ani1;
69 QPixmap* ani2; 70 QPixmap* ani2;
70 QPixmap* ani3; 71 QPixmap* ani3;
71 QPixmap* ani4; 72 QPixmap* ani4;
72 73
73 74
74}; 75};
75 76
76#endif // WELLENREITERBASE_H 77#endif // WELLENREITERBASE_H