Diffstat (limited to 'examples/opiebluez/oblueztest/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/opiebluez/oblueztest/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/opiebluez/oblueztest/main.cpp b/examples/opiebluez/oblueztest/main.cpp index 2e66d9a..361dbd8 100644 --- a/examples/opiebluez/oblueztest/main.cpp +++ b/examples/opiebluez/oblueztest/main.cpp | |||
@@ -1,20 +1,23 @@ | |||
1 | #include <opie2/odebug.h> | 1 | #include <opie2/odebug.h> |
2 | #include <opie2/obluetooth.h> | 2 | #include <opie2/obluetooth.h> |
3 | 3 | ||
4 | using namespace Opie::Core; | 4 | using namespace Opie::Core; |
5 | using namespace Opie::Bluez; | 5 | using namespace Opie::Bluez; |
6 | 6 | ||
7 | int main( int argc, char** argv ) | 7 | int main( int argc, char** argv ) |
8 | { | 8 | { |
9 | OBluetooth* sys = OBluetooth::instance(); | 9 | OBluetooth* sys = OBluetooth::instance(); |
10 | 10 | ||
11 | OBluetooth::InterfaceIterator it = sys->iterator(); | 11 | OBluetooth::InterfaceIterator it = sys->iterator(); |
12 | 12 | ||
13 | while( it.current() ) | 13 | while( it.current() ) |
14 | { | 14 | { |
15 | odebug << "APP: Bluetooth host controller interface '" << it.current()->name() << "' has MAC '" << it.current()->macAddress() << "'" << oendl; | 15 | odebug << "APP: Bluetooth host controller interface '" << it.current()->name() << "' has MAC '" << it.current()->macAddress() << "'" << oendl; |
16 | odebug << "APP: Interface is " << ( it.current()->isUp() ? "UP" : "DOWN" ) << ". Trying to toggle state..." << oendl; | ||
17 | it.current()->setUp( !it.current()->isUp() ); | ||
18 | odebug << "APP: Interface is " << ( it.current()->isUp() ? "UP" : "DOWN" ) << "." << oendl; | ||
16 | ++it; | 19 | ++it; |
17 | } | 20 | } |
18 | return 0; | 21 | return 0; |
19 | } | 22 | } |
20 | 23 | ||