summaryrefslogtreecommitdiff
path: root/libopie2/examples
Side-by-side diff
Diffstat (limited to 'libopie2/examples') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
index fc2026f..21026e1 100644
--- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
+++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
@@ -1,2 +1,3 @@
#include <opie2/onetwork.h>
+#include <opie2/ostation.h>
#include <opie2/omanufacturerdb.h>
@@ -29,3 +30,3 @@ int main( int argc, char** argv )
//{
- qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP() );
+ qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP().toString() );
//}
@@ -60,7 +61,14 @@ int main( int argc, char** argv )
- int stations = iface->scanNetwork();
- if ( stations != -1 )
+ OStationList* stations = iface->scanNetwork();
+ if ( stations )
{
- qDebug( "DEMO: # of stations around = %d", stations );
+ qDebug( "DEMO: # of stations around = %d", stations->count() );
+ OStation* station;
+ for ( station = stations->first(); station != 0; station = stations->next() )
+ {
+ qDebug( "DEMO: station dump following..." );
+ station->dump();
+ }
}
+
else