summaryrefslogtreecommitdiff
path: root/libopie2/examples/opienet
authormickeyl <mickeyl>2003-10-23 17:51:00 (UTC)
committer mickeyl <mickeyl>2003-10-23 17:51:00 (UTC)
commita9eddd4cd428dd844d8693e98e4df8e365e75da8 (patch) (side-by-side diff)
tree21b5957143ad30b0efb505694505985ca65d3850 /libopie2/examples/opienet
parenta61c014e1fb43e36aa7454ce4b3cb9a7a706c6fa (diff)
downloadopie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.zip
opie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.tar.gz
opie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.tar.bz2
misc changes
Diffstat (limited to 'libopie2/examples/opienet') (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,4 +1,5 @@
#include <opie2/onetwork.h>
+#include <opie2/ostation.h>
#include <opie2/omanufacturerdb.h>
int main( int argc, char** argv )
@@ -27,7 +28,7 @@ int main( int argc, char** argv )
//if ( iface->mode() == OWirelessNetworkInterface::adhoc )
//{
- 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() );
//}
// nickname
@@ -58,11 +59,18 @@ int main( int argc, char** argv )
// network scan
- 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
{
qDebug( "DEMO: Warning! Scan didn't work!" );