initial Bluetooth Device Model addition
[profile/ivi/bluetooth-qt.git] / bluetoothdevice.h
1 #ifndef BLUETOOTHDEVICE_H
2 #define BLUETOOTHDEVICE_H
3
4 #include <QObject>
5 #include <QStringList>
6 #include <bluedevice.h>
7 /*
8 #include <audiosource.h>
9 #include <audiosink.h>
10 #include <headset.h>
11 */
12 class BluetoothDevice : public QObject
13 {
14     Q_OBJECT    
15         /*Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
16         Q_PROPERTY(QString alias READ alias)
17         Q_PROPERTY(QString name READ name)
18         Q_PROPERTY(QString address READ address)
19         Q_PROPERTY(QString icon READ icon)
20         Q_PROPERTY(QString path READ path)
21         Q_PROPERTY(QString connectedProfile READ connectedProfile)*/
22
23 public:
24         explicit BluetoothDevice(QDBusObjectPath path, QObject *parent = 0);
25
26 signals:
27         void connetedChanged();
28
29 public slots:
30         void unpair();
31         void connect(QString profile);
32         void disconnect();
33
34         QStringList profiles();
35         bool isProfileSupported(QString profile);
36         QString connectedProfile();
37
38         ///properties:
39         bool connected();
40         QString alias();
41         QString name();
42         QString address();
43         QString icon();
44         QString path();
45
46 private slots:
47         void propertyChanged(QString name,QDBusVariant value);
48
49 private:
50         OrgBluezDeviceInterface *m_device;
51 };
52
53 #endif // BLUETOOTHDEVICE_H