summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/bluez')
-rw-r--r--src/bluetooth/bluez/adapter1_bluez5.cpp4
-rw-r--r--src/bluetooth/bluez/adapter1_bluez5_p.h23
-rw-r--r--src/bluetooth/bluez/bluez5_helper.cpp1
-rw-r--r--src/bluetooth/bluez/bluez5_helper_p.h2
-rw-r--r--src/bluetooth/bluez/device1_bluez5.cpp3
-rw-r--r--src/bluetooth/bluez/device1_bluez5_p.h38
-rwxr-xr-xsrc/bluetooth/bluez/generate14
-rw-r--r--src/bluetooth/bluez/objectmanager_p.h4
-rw-r--r--src/bluetooth/bluez/org.bluez.Adapter1.xml4
-rw-r--r--src/bluetooth/bluez/org.bluez.Device1.xml10
10 files changed, 72 insertions, 31 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/bluez5_helper.cpp b/src/bluetooth/bluez/bluez5_helper.cpp
index 8871a872..de41003f 100644
--- a/src/bluetooth/bluez/bluez5_helper.cpp
+++ b/src/bluetooth/bluez/bluez5_helper.cpp
@@ -69,6 +69,7 @@ bool isBluez5()
qDBusRegisterMetaType<InterfaceList>();
qDBusRegisterMetaType<ManagedObjectList>();
+ qDBusRegisterMetaType<ManufacturerDataList>();
QDBusPendingReply<ManagedObjectList> reply = manager.GetManagedObjects();
reply.waitForFinished();
diff --git a/src/bluetooth/bluez/bluez5_helper_p.h b/src/bluetooth/bluez/bluez5_helper_p.h
index a46810fc..2d72caf1 100644
--- a/src/bluetooth/bluez/bluez5_helper_p.h
+++ b/src/bluetooth/bluez/bluez5_helper_p.h
@@ -57,8 +57,10 @@
typedef QMap<QString, QVariantMap> InterfaceList;
typedef QMap<QDBusObjectPath, InterfaceList> ManagedObjectList;
+typedef QMap<quint16, QDBusVariant> ManufacturerDataList;
Q_DECLARE_METATYPE(InterfaceList)
+Q_DECLARE_METATYPE(ManufacturerDataList)
Q_DECLARE_METATYPE(ManagedObjectList)
QT_BEGIN_NAMESPACE
diff --git a/src/bluetooth/bluez/device1_bluez5.cpp b/src/bluetooth/bluez/device1_bluez5.cpp
index a4c01d3f..491a365d 100644
--- a/src/bluetooth/bluez/device1_bluez5.cpp
+++ b/src/bluetooth/bluez/device1_bluez5.cpp
@@ -1,8 +1,7 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
- * Command line was: qdbusxml2cpp -p device1_bluez5 -v org.bluez.Device1.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/device1_bluez5_p.h b/src/bluetooth/bluez/device1_bluez5_p.h
index d6181b34..4feb5318 100644
--- a/src/bluetooth/bluez/device1_bluez5_p.h
+++ b/src/bluetooth/bluez/device1_bluez5_p.h
@@ -1,15 +1,14 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
- * Command line was: qdbusxml2cpp -p device1_bluez5 -v org.bluez.Device1.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 DEVICE1_BLUEZ5_H_1396951960
-#define DEVICE1_BLUEZ5_H_1396951960
+#ifndef DEVICE1_BLUEZ5_P_H
+#define DEVICE1_BLUEZ5_P_H
#include <QtCore/QObject>
#include <QtCore/QByteArray>
@@ -19,6 +18,7 @@
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
+#include "bluez5_helper_p.h"
/*
* Proxy class for interface org.bluez.Device1
@@ -31,7 +31,7 @@ public:
{ return "org.bluez.Device1"; }
public:
- OrgBluezDevice1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+ OrgBluezDevice1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
~OrgBluezDevice1Interface();
@@ -75,6 +75,10 @@ public:
inline bool legacyPairing() const
{ return qvariant_cast< bool >(property("LegacyPairing")); }
+ Q_PROPERTY(ManufacturerDataList ManufacturerData READ manufacturerData)
+ inline ManufacturerDataList manufacturerData() const
+ { return qvariant_cast< ManufacturerDataList >(property("ManufacturerData")); }
+
Q_PROPERTY(QString Modalias READ modalias)
inline QString modalias() const
{ return qvariant_cast< QString >(property("Modalias")); }
@@ -91,12 +95,24 @@ public:
inline short rSSI() const
{ return qvariant_cast< short >(property("RSSI")); }
+ Q_PROPERTY(QVariantMap ServiceData READ serviceData)
+ inline QVariantMap serviceData() const
+ { return qvariant_cast< QVariantMap >(property("ServiceData")); }
+
+ Q_PROPERTY(bool ServicesResolved READ servicesResolved)
+ inline bool servicesResolved() const
+ { return qvariant_cast< bool >(property("ServicesResolved")); }
+
Q_PROPERTY(bool Trusted READ trusted WRITE setTrusted)
inline bool trusted() const
{ return qvariant_cast< bool >(property("Trusted")); }
inline void setTrusted(bool value)
{ setProperty("Trusted", QVariant::fromValue(value)); }
+ Q_PROPERTY(short TxPower READ txPower)
+ inline short txPower() const
+ { return qvariant_cast< short >(property("TxPower")); }
+
Q_PROPERTY(QStringList UUIDs READ uUIDs)
inline QStringList uUIDs() const
{ return qvariant_cast< QStringList >(property("UUIDs")); }
@@ -105,39 +121,39 @@ public Q_SLOTS: // METHODS
inline QDBusPendingReply<> CancelPairing()
{
QList<QVariant> argumentList;
- return asyncCallWithArgumentList(QLatin1String("CancelPairing"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("CancelPairing"), argumentList);
}
inline QDBusPendingReply<> Connect()
{
QList<QVariant> argumentList;
- return asyncCallWithArgumentList(QLatin1String("Connect"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("Connect"), argumentList);
}
inline QDBusPendingReply<> ConnectProfile(const QString &UUID)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(UUID);
- return asyncCallWithArgumentList(QLatin1String("ConnectProfile"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("ConnectProfile"), argumentList);
}
inline QDBusPendingReply<> Disconnect()
{
QList<QVariant> argumentList;
- return asyncCallWithArgumentList(QLatin1String("Disconnect"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("Disconnect"), argumentList);
}
inline QDBusPendingReply<> DisconnectProfile(const QString &UUID)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(UUID);
- return asyncCallWithArgumentList(QLatin1String("DisconnectProfile"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("DisconnectProfile"), argumentList);
}
inline QDBusPendingReply<> Pair()
{
QList<QVariant> argumentList;
- return asyncCallWithArgumentList(QLatin1String("Pair"), argumentList);
+ return asyncCallWithArgumentList(QStringLiteral("Pair"), argumentList);
}
Q_SIGNALS: // SIGNALS
diff --git a/src/bluetooth/bluez/generate b/src/bluetooth/bluez/generate
index 14bcaea8..cdba18c4 100755
--- a/src/bluetooth/bluez/generate
+++ b/src/bluetooth/bluez/generate
@@ -1,5 +1,6 @@
#!/bin/sh
+#Bluez 4
qdbusxml2cpp -p manager_p.h:manager.cpp org.bluez.Manager.xml org.bluez.Manager
qdbusxml2cpp -p adapter_p.h:adapter.cpp org.bluez.all.xml org.bluez.Adapter
qdbusxml2cpp -i servicemap_p.h -p device_p.h:device.cpp org.bluez.Device.xml org.bluez.Device
@@ -9,8 +10,13 @@ qdbusxml2cpp -p obex_manager_p.h:obex_manager.cpp org.openobex.all.xml org.openo
qdbusxml2cpp -p obex_client_p.h:obex_client.cpp org.openobex.client.xml org.openobex.Client
qdbusxml2cpp -p obex_transfer_p.h:obex_transfer.cpp org.openobex.transfer.xml org.openobex.Transfer
qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml org.openobex.Agent
-#qdbusxml2cpp -p serialproxymanager_p.h:serialproxymanager.cpp org.bluez.all.xml org.bluez.SerialProxyManager
-#qdbusxml2cpp -p networkpeer_p.h:networkpeer.cpp org.bluez.all.xml org.bluez.NetworkPeer
-#qdbusxml2cpp -p networkhub_p.h:networkhub.cpp org.bluez.all.xml org.bluez.NetworkHub
-#qdbusxml2cpp -p networkrouter_p.h:networkrouter.cpp org.bluez.all.xml org.bluez.NetworkRouter
+#Bluez 5
+qdbusxml2cpp -p adapter1_bluez5_p.h:adapter1_bluez5.cpp org.bluez.Adapter1.xml
+qdbusxml2cpp -p device1_bluez5_p.h:device1_bluez5.cpp org.bluez.Device1.xml
+qdbusxml2cpp -p profile1_p.h:profile1.cpp org.bluez.ProfileManager1.xml
+qdbusxml2cpp -p objectmanager_p.h:objectmanager.cpp org.freedesktop.dbus.objectmanager.xml
+qdbusxml2cpp -p properties_p.h:properties.cpp org.freedesktop.dbus.properties.xml
+qdbusxml2cpp -p obex_client1_bluez5_p.h:obex_client1_bluez5_p.h org.bluez.Client1.xml
+qdbusxml2cpp -p obex_objectpush1_bluez5_p.h:obex_objectpush1_bluez5.cpp org.bluez.obex.ObjectPush1.xml
+qdbusxml2cpp -p obex_transfer1_bluez5_p.h:obex_transfer1_bluez5_p.h org.bluez.obex.Transfer1.xml
diff --git a/src/bluetooth/bluez/objectmanager_p.h b/src/bluetooth/bluez/objectmanager_p.h
index 823badeb..74f5ab43 100644
--- a/src/bluetooth/bluez/objectmanager_p.h
+++ b/src/bluetooth/bluez/objectmanager_p.h
@@ -20,10 +20,6 @@
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
-/* Temporary hack to merge branches until Bluez headers are removed
- * from bluez5_helpers_p.h.
- */
-#define NO_BLUEZ_INCLUDES
#include "bluez5_helper_p.h"
/*
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>
diff --git a/src/bluetooth/bluez/org.bluez.Device1.xml b/src/bluetooth/bluez/org.bluez.Device1.xml
index 1f8fd2c1..554d0b53 100644
--- a/src/bluetooth/bluez/org.bluez.Device1.xml
+++ b/src/bluetooth/bluez/org.bluez.Device1.xml
@@ -27,5 +27,15 @@
<property name="UUIDs" type="as" access="read"></property>
<property name="Modalias" type="s" access="read"></property>
<property name="Adapter" type="o" access="read"></property>
+ <!-- ManufacturerData & ServiceData introduced by Bluez 5.31 -->
+ <property name="ManufacturerData" type="a{qv}" access="read">
+ <annotation name="org.qtproject.QtDBus.QtTypeName" value="ManufacturerDataList"/>
+ </property>
+ <property name="ServiceData" type="a{sv}" access="read">
+ <annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
+ </property>
+ <!-- TxPower and ServicesResolved introduced by Bluez 5.42 -->
+ <property name="TxPower" type="n" access="read"></property>
+ <property name="ServicesResolved" type="b" access="read"></property>
</interface>
</node>