return m_device->path();
}
+bool BluetoothDevice::trusted()
+{
+ QVariantMap props = m_device->GetProperties();
+ return props["Trusted"].toBool();
+}
+
+void BluetoothDevice::setTrusted(bool trust)
+{
+ m_device->SetProperty("Trusted",QDBusVariant(trust));
+}
+
void BluetoothDevice::propertyChanged(QString name,QDBusVariant value)
{
qDebug()<<"BluetoothDevice::propertyChanged()";
emit profilesChanged(value.variant().toStringList());
}
+ if(name == "Trusted")
+ {
+ emit trustedChanged(value.variant().toBool());
+ }
emit propertyChanged(name,value.variant());
///TODO: create individual signals for each property
Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged);
Q_PROPERTY(bool audioConnected READ audioConnected NOTIFY audioConnectedChanged)
Q_PROPERTY(bool inputConnected READ inputConnected NOTIFY inputConnectedChanged)
+ Q_PROPERTY(bool trusted READ trusted WRITE setTrusted NOTIFY trustedChanged)
Q_PROPERTY(QStringList profiles READ profiles NOTIFY profilesChanged)
Q_PROPERTY(QString alias READ alias)
Q_PROPERTY(QString name READ name)
void inputConnectedChanged(bool isConnected);
void propertyChanged(QString name, QVariant value);
void profilesChanged(QStringList uuids);
+ void trustedChanged(bool trust);
public slots:
void unpair();
void connectInput();
void disconnect();
void disconnectAudio();
+ bool trusted();
+ void setTrusted(bool trust);
QStringList profiles();
bool isProfileSupported(QString profile);