diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-07-12 16:03:04 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-07-24 11:16:06 +0000 |
commit | e1537a4677722e55c790c8fd7b424c0620afb710 (patch) | |
tree | 015e0128174ec52ac5a73f0e4e90555affaa6509 | |
parent | d206d1e4182f6e1a79c05bd1c11a5acf5ec80c22 (diff) |
Provide means to select the Bluetooth discovery type on BlueZ
This is an addition since BlueZ 5.30.
Task-number: QTBUG-57575
Change-Id: Ib24702ac91ee55e5e0511d93cd9bd43937c0edb1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/bluetooth/bluez/adapter1_bluez5.cpp | 4 | ||||
-rw-r--r-- | src/bluetooth/bluez/adapter1_bluez5_p.h | 23 | ||||
-rw-r--r-- | src/bluetooth/bluez/org.bluez.Adapter1.xml | 4 |
3 files changed, 21 insertions, 10 deletions
diff --git a/src/bluetooth/bluez/adapter1_bluez5.cpp b/src/bluetooth/bluez/adapter1_bluez5.cpp index 0f1e0acd..b1aefc8d 100644 --- a/src/bluetooth/bluez/adapter1_bluez5.cpp +++ b/src/bluetooth/bluez/adapter1_bluez5.cpp @@ -1,8 +1,8 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p adapter1 -v org.bluez.Adapter1.xml + * Command line was: qdbusxml2cpp -p adapter1_bluez5_p.h:adapter1_bluez5.cpp org.bluez.Adapter1.xml * - * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd. + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments diff --git a/src/bluetooth/bluez/adapter1_bluez5_p.h b/src/bluetooth/bluez/adapter1_bluez5_p.h index 5568da4c..ce108ad0 100644 --- a/src/bluetooth/bluez/adapter1_bluez5_p.h +++ b/src/bluetooth/bluez/adapter1_bluez5_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p adapter1 -v org.bluez.Adapter1.xml + * Command line was: qdbusxml2cpp -p adapter1_bluez5_p.h:adapter1_bluez5.cpp org.bluez.Adapter1.xml * - * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd. + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ -#ifndef ADAPTER1_H_1396951555 -#define ADAPTER1_H_1396951555 +#ifndef ADAPTER1_BLUEZ5_P_H +#define ADAPTER1_BLUEZ5_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.Adapter1"; } public: - OrgBluezAdapter1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezAdapter1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezAdapter1Interface(); @@ -100,19 +100,26 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(device); - return asyncCallWithArgumentList(QLatin1String("RemoveDevice"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("RemoveDevice"), argumentList); + } + + inline QDBusPendingReply<> SetDiscoveryFilter(const QVariantMap &properties) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(properties); + return asyncCallWithArgumentList(QStringLiteral("SetDiscoveryFilter"), argumentList); } inline QDBusPendingReply<> StartDiscovery() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("StartDiscovery"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("StartDiscovery"), argumentList); } inline QDBusPendingReply<> StopDiscovery() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("StopDiscovery"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("StopDiscovery"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/org.bluez.Adapter1.xml b/src/bluetooth/bluez/org.bluez.Adapter1.xml index a1e6babe..121c277e 100644 --- a/src/bluetooth/bluez/org.bluez.Adapter1.xml +++ b/src/bluetooth/bluez/org.bluez.Adapter1.xml @@ -7,6 +7,10 @@ <method name="RemoveDevice"> <arg name="device" type="o" direction="in"/> </method> + <method name="SetDiscoveryFilter"> + <arg name="properties" type="a{sv}" direction="in"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> + </method> <property name="Address" type="s" access="read"></property> <property name="Name" type="s" access="read"></property> <property name="Alias" type="s" access="readwrite"></property> |