author | mickeyl <mickeyl> | 2003-05-01 00:59:20 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-01 00:59:20 (UTC) |
commit | 1d721ddb247e9000e29fba3150e0cce5f59f543e (patch) (unidiff) | |
tree | 70b659b209395c8aff25442afaa4fc57c29679e6 /libopie2/examples | |
parent | 30c685f9da06d19c993e9bdb74f349dabbde063e (diff) | |
download | opie-1d721ddb247e9000e29fba3150e0cce5f59f543e.zip opie-1d721ddb247e9000e29fba3150e0cce5f59f543e.tar.gz opie-1d721ddb247e9000e29fba3150e0cce5f59f543e.tar.bz2 |
implement and document a bunch of missing methods
-rw-r--r-- | libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index f801b15..fd68772 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | |||
@@ -19,7 +19,6 @@ int main( int argc, char** argv ) | |||
19 | OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); | 19 | OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); |
20 | qDebug( "DEMO: '%s' seems to feature the wireless extensions.", (const char*) iface->name() ); | 20 | qDebug( "DEMO: '%s' seems to feature the wireless extensions.", (const char*) iface->name() ); |
21 | qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() ); | 21 | qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() ); |
22 | qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() ); | ||
23 | qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() ); | 22 | qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() ); |
24 | 23 | ||
25 | //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) | 24 | //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) |
@@ -27,7 +26,23 @@ int main( int argc, char** argv ) | |||
27 | qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP() ); | 26 | qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP() ); |
28 | //} | 27 | //} |
29 | 28 | ||
30 | // try to set monitor mode | 29 | // nickname |
30 | qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() ); | ||
31 | iface->setNickName( "MyNickName" ); | ||
32 | if ( iface->nickName() != "MyNickName" ) | ||
33 | qDebug( "DEMO: Warning! Can't change nickname" ); | ||
34 | else | ||
35 | qDebug( "DEMO: Nickname change successful." ); | ||
36 | |||
37 | // operation mode | ||
38 | qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() ); | ||
39 | iface->setMode( "adhoc" ); | ||
40 | if ( iface->mode() != "adhoc" ) | ||
41 | qDebug( "DEMO: Warning! Can't change operation mode" ); | ||
42 | else | ||
43 | qDebug( "DEMO: Operation Mode change successful." ); | ||
44 | |||
45 | iface->setMode( "managed" ); | ||
31 | 46 | ||
32 | /* | 47 | /* |
33 | 48 | ||
@@ -38,8 +53,6 @@ int main( int argc, char** argv ) | |||
38 | // now the real deal | 53 | // now the real deal |
39 | iface->setPrivate( "monitor", 2, 2, 3 ); | 54 | iface->setPrivate( "monitor", 2, 2, 3 ); |
40 | 55 | ||
41 | */ | ||
42 | |||
43 | // trying to set hw address to 12:34:56:AB:CD:EF | 56 | // trying to set hw address to 12:34:56:AB:CD:EF |
44 | 57 | ||
45 | /* | 58 | /* |