fixed issues with -1 index because deviceCreated was telling the view the wrong index
[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(QStringList profiles READ profiles)
17         Q_PROPERTY(QString alias READ alias)
18         Q_PROPERTY(QString name READ name)
19         Q_PROPERTY(QString address READ address)
20         Q_PROPERTY(QString icon READ icon)
21         Q_PROPERTY(QString path READ path)
22
23 public:
24         explicit BluetoothDevice(QDBusObjectPath path = QDBusObjectPath(), QObject *parent = 0);
25
26 signals:
27         void connectedChanged();
28         void propertyChanged(QString name, QVariant value);
29
30 public slots:
31         void unpair();
32         void connect(QString profile);
33         void disconnect();
34
35         QStringList profiles();
36         bool isProfileSupported(QString profile);
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