author | mickeyl <mickeyl> | 2003-10-23 17:51:00 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-23 17:51:00 (UTC) |
commit | a9eddd4cd428dd844d8693e98e4df8e365e75da8 (patch) (unidiff) | |
tree | 21b5957143ad30b0efb505694505985ca65d3850 /libopie2/examples/opienet | |
parent | a61c014e1fb43e36aa7454ce4b3cb9a7a706c6fa (diff) | |
download | opie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.zip opie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.tar.gz opie-a9eddd4cd428dd844d8693e98e4df8e365e75da8.tar.bz2 |
misc changes
-rw-r--r-- | libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | 16 |
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 @@ | |||
1 | #include <opie2/onetwork.h> | 1 | #include <opie2/onetwork.h> |
2 | #include <opie2/ostation.h> | ||
2 | #include <opie2/omanufacturerdb.h> | 3 | #include <opie2/omanufacturerdb.h> |
3 | 4 | ||
4 | int main( int argc, char** argv ) | 5 | int main( int argc, char** argv ) |
@@ -27,7 +28,7 @@ int main( int argc, char** argv ) | |||
27 | 28 | ||
28 | //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) | 29 | //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) |
29 | //{ | 30 | //{ |
30 | qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP() ); | 31 | qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP().toString() ); |
31 | //} | 32 | //} |
32 | 33 | ||
33 | // nickname | 34 | // nickname |
@@ -58,11 +59,18 @@ int main( int argc, char** argv ) | |||
58 | 59 | ||
59 | // network scan | 60 | // network scan |
60 | 61 | ||
61 | int stations = iface->scanNetwork(); | 62 | OStationList* stations = iface->scanNetwork(); |
62 | if ( stations != -1 ) | 63 | if ( stations ) |
63 | { | 64 | { |
64 | qDebug( "DEMO: # of stations around = %d", stations ); | 65 | qDebug( "DEMO: # of stations around = %d", stations->count() ); |
66 | OStation* station; | ||
67 | for ( station = stations->first(); station != 0; station = stations->next() ) | ||
68 | { | ||
69 | qDebug( "DEMO: station dump following..." ); | ||
70 | station->dump(); | ||
71 | } | ||
65 | } | 72 | } |
73 | |||
66 | else | 74 | else |
67 | { | 75 | { |
68 | qDebug( "DEMO: Warning! Scan didn't work!" ); | 76 | qDebug( "DEMO: Warning! Scan didn't work!" ); |