1 #ifndef BLUETOOTHDEVICE_H
2 #define BLUETOOTHDEVICE_H
6 #include <bluedevice.h>
8 class OrgBluezAudioInterface;
9 class OrgBluezInputInterface;
11 class BluetoothDevice : public QObject
14 Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged);
15 Q_PROPERTY(bool audioConnected READ audioConnected NOTIFY audioConnectedChanged)
16 Q_PROPERTY(bool inputConnected READ inputConnected NOTIFY inputConnectedChanged)
17 Q_PROPERTY(bool trusted READ trusted WRITE setTrusted NOTIFY trustedChanged)
18 Q_PROPERTY(QStringList profiles READ profiles NOTIFY profilesChanged)
19 Q_PROPERTY(QString alias READ alias)
20 Q_PROPERTY(QString name READ name)
21 Q_PROPERTY(QString address READ address)
22 Q_PROPERTY(QString icon READ icon)
23 Q_PROPERTY(QString path READ path)
26 explicit BluetoothDevice(QDBusObjectPath path = QDBusObjectPath(), QObject *parent = 0);
29 void connectedChanged(bool isConnected);
30 void audioConnectedChanged(bool isConnected);
31 void inputConnectedChanged(bool isConnected);
32 void propertyChanged(QString name, QVariant value);
33 void profilesChanged(QStringList uuids);
34 void trustedChanged(bool trust);
39 void connectAudioSrc();
40 QString connectSerial();
43 void disconnectAudio();
45 void setTrusted(bool trust);
47 QStringList profiles();
48 bool isProfileSupported(QString profile);
52 bool audioConnected();
53 bool inputConnected();
61 void propertyChanged(QString name,QDBusVariant value);
62 void audioPropertiesChanged(QString name, QDBusVariant value);
63 void inputPropertiesChanged(QString name, QDBusVariant value);
66 OrgBluezDeviceInterface *m_device;
67 OrgBluezAudioInterface *audio;
68 OrgBluezInputInterface *input;
71 #endif // BLUETOOTHDEVICE_H