summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter
authormickeyl <mickeyl>2003-05-02 23:32:16 (UTC)
committer mickeyl <mickeyl>2003-05-02 23:32:16 (UTC)
commit4aaa8efd13ad014280a6f1f05391c1ec464790db (patch) (side-by-side diff)
tree4c9612dcd9897d8b2af48a731305e304dd523dc9 /noncore/net/wellenreiter
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 (limited to 'noncore/net/wellenreiter') (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
@@ -176,3 +176,3 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
-void MScanListView::addIfNotExisting( MScanListItem* network, QString addr )
+void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type )
{
@@ -197,3 +197,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr )
// Hey, it seems to be a new item :-D
- MScanListItem* station = new MScanListItem( network, "station", /* network->text( col_essid ) */ "", addr, false, -1, -1 );
+ MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr, false, -1, -1 );
if ( _manufacturerdb )
@@ -239,3 +239,3 @@ void MScanListView::toDStraffic( QString from, QString to, QString via )
{
- addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from );
+ addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
}
@@ -249,3 +249,18 @@ void MScanListView::fromDStraffic( QString from, QString to, QString via )
{
- qWarning( "D'oh! Not yet implemented..." );
+ QString s;
+ MScanListItem* network;
+
+ QListViewItemIterator it( this );
+ while ( it.current() && it.current()->text( col_ap ) != via ) ++it;
+
+ MScanListItem* item = static_cast<MScanListItem*>( it.current() );
+
+ if ( item ) // AP has shown up yet, so just add our new "from" - station
+ {
+ addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" );
+ }
+ else
+ {
+ qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
+ }
}
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
@@ -49,3 +49,3 @@ class MScanListView: public OListView
protected:
- void addIfNotExisting( MScanListItem* parent, QString addr );
+ void addIfNotExisting( MScanListItem* parent, QString addr, const QString& type = "station" );