summaryrefslogtreecommitdiff
path: root/libopie2/examples/opienet
authormickeyl <mickeyl>2003-05-01 00:59:20 (UTC)
committer mickeyl <mickeyl>2003-05-01 00:59:20 (UTC)
commit1d721ddb247e9000e29fba3150e0cce5f59f543e (patch) (side-by-side diff)
tree70b659b209395c8aff25442afaa4fc57c29679e6 /libopie2/examples/opienet
parent30c685f9da06d19c993e9bdb74f349dabbde063e (diff)
downloadopie-1d721ddb247e9000e29fba3150e0cce5f59f543e.zip
opie-1d721ddb247e9000e29fba3150e0cce5f59f543e.tar.gz
opie-1d721ddb247e9000e29fba3150e0cce5f59f543e.tar.bz2
implement and document a bunch of missing methods
Diffstat (limited to 'libopie2/examples/opienet') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp21
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 )
OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() );
qDebug( "DEMO: '%s' seems to feature the wireless extensions.", (const char*) iface->name() );
qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() );
- qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() );
qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() );
//if ( iface->mode() == OWirelessNetworkInterface::adhoc )
@@ -27,7 +26,23 @@ int main( int argc, char** argv )
qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP() );
//}
- // try to set monitor mode
+ // nickname
+ qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() );
+ iface->setNickName( "MyNickName" );
+ if ( iface->nickName() != "MyNickName" )
+ qDebug( "DEMO: Warning! Can't change nickname" );
+ else
+ qDebug( "DEMO: Nickname change successful." );
+
+ // operation mode
+ qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() );
+ iface->setMode( "adhoc" );
+ if ( iface->mode() != "adhoc" )
+ qDebug( "DEMO: Warning! Can't change operation mode" );
+ else
+ qDebug( "DEMO: Operation Mode change successful." );
+
+ iface->setMode( "managed" );
/*
@@ -38,8 +53,6 @@ int main( int argc, char** argv )
// now the real deal
iface->setPrivate( "monitor", 2, 2, 3 );
- */
-
// trying to set hw address to 12:34:56:AB:CD:EF
/*