summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-02 23:32:16 (UTC)
committer mickeyl <mickeyl>2003-05-02 23:32:16 (UTC)
commit4aaa8efd13ad014280a6f1f05391c1ec464790db (patch) (unidiff)
tree4c9612dcd9897d8b2af48a731305e304dd523dc9
parent5ca7f12dab929b21c133f785a3328c949df69401 (diff)
downloadopie-4aaa8efd13ad014280a6f1f05391c1ec464790db.zip
opie-4aaa8efd13ad014280a6f1f05391c1ec464790db.tar.gz
opie-4aaa8efd13ad014280a6f1f05391c1ec464790db.tar.bz2
add parsing and interpretating of fromDS frames and getting pretty close to the 1.0 release
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp23
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h2
2 files changed, 20 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index b8aa81c..1cf49e0 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -175,5 +175,5 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
175 175
176 176
177void MScanListView::addIfNotExisting( MScanListItem* network, QString addr ) 177void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type )
178{ 178{
179 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); 179 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() );
@@ -196,5 +196,5 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr )
196 196
197 // Hey, it seems to be a new item :-D 197 // Hey, it seems to be a new item :-D
198 MScanListItem* station = new MScanListItem( network, "station", /* network->text( col_essid ) */ "", addr, false, -1, -1 ); 198 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr, false, -1, -1 );
199 if ( _manufacturerdb ) 199 if ( _manufacturerdb )
200 station->setManufacturer( _manufacturerdb->lookup( addr ) ); 200 station->setManufacturer( _manufacturerdb->lookup( addr ) );
@@ -238,5 +238,5 @@ void MScanListView::toDStraffic( QString from, QString to, QString via )
238 if ( item ) // AP has shown up yet, so just add our new "from" - station 238 if ( item ) // AP has shown up yet, so just add our new "from" - station
239 { 239 {
240 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); 240 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
241 } 241 }
242 else 242 else
@@ -248,5 +248,20 @@ void MScanListView::toDStraffic( QString from, QString to, QString via )
248void MScanListView::fromDStraffic( QString from, QString to, QString via ) 248void MScanListView::fromDStraffic( QString from, QString to, QString via )
249{ 249{
250 qWarning( "D'oh! Not yet implemented..." ); 250 QString s;
251 MScanListItem* network;
252
253 QListViewItemIterator it( this );
254 while ( it.current() && it.current()->text( col_ap ) != via ) ++it;
255
256 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
257
258 if ( item ) // AP has shown up yet, so just add our new "from" - station
259 {
260 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" );
261 }
262 else
263 {
264 qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
265 }
251} 266}
252 267
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
index a14d426..56bf837 100644
--- a/noncore/net/wellenreiter/gui/scanlist.h
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -48,5 +48,5 @@ class MScanListView: public OListView
48 48
49 protected: 49 protected:
50 void addIfNotExisting( MScanListItem* parent, QString addr ); 50 void addIfNotExisting( MScanListItem* parent, QString addr, const QString& type = "station" );
51 51
52 private: 52 private: