add more spacing
[personal-kdebase.git] / workspace / solid / bluez / tests / blueztest.cpp
blobb8d31d354128763bf07114db8c08b0703f59f668
1 #include <kdebug.h>
2 #include <QApplication>
3 #include <QObject>
5 #include "bluez-bluetoothmanager.h"
6 #include "bluez-bluetoothinterface.h"
7 //#include "bluez-bluetoothremotedevice.h"
9 int main(int argc, char **argv)
12 QApplication app(argc, argv);
13 BluezBluetoothManager mgr(0, QStringList());
15 kDebug() << "Interfaces: " << mgr.bluetoothInterfaces();
16 kDebug() << "Default Interface: " << mgr.defaultInterface();
17 kDebug() << "Finding Interface hci0: " << mgr.findInterface("hci0");
20 // kDebug() << "Bluetooth Input Devices: " << mgr.bluetoothInputDevices();
22 BluezBluetoothInterface iface(mgr.defaultInterface());
24 iface.setProperty("Name","testNAME");
26 QMap<QString, QVariant> props = iface.getProperties();
28 foreach(QString key, props.keys()) {
29 kDebug() << "Interface Property: " << key << " : " << props[key];
33 iface.startDiscovery();
35 #if 0
36 BluezBluetoothRemoteDevice remote("/org/bluez/hci0/00:16:BC:15:A3:FF");
38 kDebug() << "Name: " << remote.name();
39 kDebug() << "Company: " << remote.company();
40 kDebug() << "Services: " << remote.serviceClasses();
41 kDebug() << "Major Class: " << remote.majorClass();
42 kDebug() << "Minor Class: " << remote.minorClass();
44 if (remote.hasBonding()) {
45 remote.removeBonding();
48 remote.createBonding();
51 kDebug() << mgr.setupInputDevice("/org/bluez/hci0/00:04:61:81:75:FF");
52 #endif
54 return app.exec();