diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-07-25 14:42:06 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-07-25 14:42:18 +0200 |
commit | 25638b02766ae3109bfc83b3249e6d0dc9e21bdb (patch) | |
tree | 8ac8f0cd544dd39da674657940d6c509ea94721c /src/bluetooth/bluez | |
parent | fc2a206322f6190226ebc1f04062f2c9170f0bac (diff) | |
parent | b19148f9a0f820630bd83432d96117e9598c315d (diff) |
Merge remote-tracking branch 'gerrit/dev' into btlebtle
Change-Id: Id7698ec157a4e06296bcc27d48aaa8325dd3c23a
Diffstat (limited to 'src/bluetooth/bluez')
47 files changed, 750 insertions, 195 deletions
diff --git a/src/bluetooth/bluez/adapter.cpp b/src/bluetooth/bluez/adapter.cpp index 10b46f3b..eaea76f8 100644 --- a/src/bluetooth/bluez/adapter.cpp +++ b/src/bluetooth/bluez/adapter.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p adapter_p.h:adapter.cpp org.bluez.all.xml org.bluez.Adapter * - * 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/adapter_p.h b/src/bluetooth/bluez/adapter_p.h index d9b6a0c7..236fe7e4 100644 --- a/src/bluetooth/bluez/adapter_p.h +++ b/src/bluetooth/bluez/adapter_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p adapter_p.h:adapter.cpp org.bluez.all.xml org.bluez.Adapter * - * 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 ADAPTER_P_H_1273205927 -#define ADAPTER_P_H_1273205927 +#ifndef ADAPTER_P_H +#define ADAPTER_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.Adapter"; } public: - OrgBluezAdapterInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezAdapterInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezAdapterInterface(); @@ -39,106 +39,106 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<> CancelDeviceCreation(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("CancelDeviceCreation"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("CancelDeviceCreation"), argumentList); } inline QDBusPendingReply<QDBusObjectPath> CreateDevice(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("CreateDevice"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("CreateDevice"), argumentList); } inline QDBusPendingReply<QDBusObjectPath> CreatePairedDevice(const QString &in0, const QDBusObjectPath &in1, const QString &in2) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1) << qVariantFromValue(in2); - return asyncCallWithArgumentList(QLatin1String("CreatePairedDevice"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); + return asyncCallWithArgumentList(QStringLiteral("CreatePairedDevice"), argumentList); } inline QDBusPendingReply<QDBusObjectPath> FindDevice(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("FindDevice"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("FindDevice"), argumentList); } inline QDBusPendingReply<QVariantMap> GetProperties() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("GetProperties"), argumentList); } inline QDBusPendingReply<QList<QDBusObjectPath> > ListDevices() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("ListDevices"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ListDevices"), argumentList); } inline QDBusPendingReply<> RegisterAgent(const QDBusObjectPath &in0, const QString &in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("RegisterAgent"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("RegisterAgent"), argumentList); } inline QDBusPendingReply<> ReleaseMode() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("ReleaseMode"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ReleaseMode"), argumentList); } inline QDBusPendingReply<> ReleaseSession() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("ReleaseSession"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ReleaseSession"), argumentList); } inline QDBusPendingReply<> RemoveDevice(const QDBusObjectPath &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("RemoveDevice"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("RemoveDevice"), argumentList); } inline QDBusPendingReply<> RequestMode(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("RequestMode"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("RequestMode"), argumentList); } inline QDBusPendingReply<> RequestSession() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("RequestSession"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("RequestSession"), argumentList); } inline QDBusPendingReply<> SetProperty(const QString &in0, const QDBusVariant &in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("SetProperty"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("SetProperty"), 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); } inline QDBusPendingReply<> UnregisterAgent(const QDBusObjectPath &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("UnregisterAgent"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("UnregisterAgent"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/agent.cpp b/src/bluetooth/bluez/agent.cpp index 89840531..6fa80176 100644 --- a/src/bluetooth/bluez/agent.cpp +++ b/src/bluetooth/bluez/agent.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c OrgBluezAgentAdaptor -a agent_p.h:agent.cpp org.bluez.Agent.xml org.bluez.Agent * - * 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. diff --git a/src/bluetooth/bluez/agent_p.h b/src/bluetooth/bluez/agent_p.h index 8329089f..32efa62e 100644 --- a/src/bluetooth/bluez/agent_p.h +++ b/src/bluetooth/bluez/agent_p.h @@ -1,20 +1,19 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c OrgBluezAgentAdaptor -a agent_p.h:agent.cpp org.bluez.Agent.xml org.bluez.Agent * - * 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 * before re-generating it. */ -#ifndef AGENT_P_H_1291941396 -#define AGENT_P_H_1291941396 +#ifndef AGENT_P_H +#define AGENT_P_H #include <QtCore/QObject> #include <QtDBus/QtDBus> - QT_BEGIN_NAMESPACE class QByteArray; template<class T> class QList; diff --git a/src/bluetooth/bluez/bluetoothmanagement.cpp b/src/bluetooth/bluez/bluetoothmanagement.cpp index 9df74b34..3f97f75c 100644 --- a/src/bluetooth/bluez/bluetoothmanagement.cpp +++ b/src/bluetooth/bluez/bluetoothmanagement.cpp @@ -43,7 +43,7 @@ #include "bluetoothmanagement_p.h" #include "bluez_data_p.h" -#include "../qbluetoothsocket_p.h" +#include "../qbluetoothsocketbase_p.h" #include <unistd.h> #include <sys/prctl.h> diff --git a/src/bluetooth/bluez/bluez.pri b/src/bluetooth/bluez/bluez.pri index b99f2712..a8ca8e22 100644 --- a/src/bluetooth/bluez/bluez.pri +++ b/src/bluetooth/bluez/bluez.pri @@ -17,6 +17,9 @@ HEADERS += bluez/manager_p.h \ bluez/obex_client1_bluez5_p.h \ bluez/obex_objectpush1_bluez5_p.h \ bluez/obex_transfer1_bluez5_p.h \ + bluez/gattchar1_p.h \ + bluez/gattdesc1_p.h \ + bluez/gattservice1_p.h \ bluez/bluez_data_p.h \ bluez/hcimanager_p.h \ bluez/remotedevicemanager_p.h \ @@ -41,6 +44,9 @@ SOURCES += bluez/manager.cpp \ bluez/obex_client1_bluez5.cpp \ bluez/obex_objectpush1_bluez5.cpp \ bluez/obex_transfer1_bluez5.cpp \ + bluez/gattchar1.cpp \ + bluez/gattdesc1.cpp \ + bluez/gattservice1.cpp \ bluez/hcimanager.cpp \ bluez/remotedevicemanager.cpp \ bluez/bluetoothmanagement.cpp diff --git a/src/bluetooth/bluez/bluez5_helper.cpp b/src/bluetooth/bluez/bluez5_helper.cpp index de41003f..f798088e 100644 --- a/src/bluetooth/bluez/bluez5_helper.cpp +++ b/src/bluetooth/bluez/bluez5_helper.cpp @@ -40,7 +40,10 @@ #include <QtCore/QGlobalStatic> #include <QtCore/QLoggingCategory> #include <QtCore/QMap> +#include <QtCore/QVersionNumber> +#include <QtNetwork/private/qnet_unix_p.h> #include "bluez5_helper_p.h" +#include "bluez_data_p.h" #include "objectmanager_p.h" #include "properties_p.h" #include "adapter1_bluez5_p.h" @@ -59,6 +62,7 @@ typedef enum Bluez5TestResultType } Bluez5TestResult; Q_GLOBAL_STATIC_WITH_ARGS(Bluez5TestResult, bluezVersion, (BluezVersionUnknown)); +Q_GLOBAL_STATIC_WITH_ARGS(QVersionNumber, bluezDaemonVersion, (QVersionNumber())); bool isBluez5() { @@ -97,6 +101,184 @@ bool isBluez5() return (*bluezVersion() == BluezVersion5); } +/* + Checks that the mandatory Bluetooth HCI ioctls are offered + by Linux kernel. Returns \c true if the ictls are available; otherwise \c false. + + Mandatory ioctls: + - HCIGETCONNLIST + - HCIGETDEVINFO + - HCIGETDEVLIST + */ +bool mandatoryHciIoctlsAvailable() +{ + // open hci socket + int hciSocket = ::qt_safe_socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); + if (hciSocket < 0) { + qCWarning(QT_BT_BLUEZ) << "Cannot open HCI socket:" << qt_error_string(errno); + return false; + } + + // check HCIGETDEVLIST & HCIGETDEVLIST + struct hci_dev_req *devRequest = 0; + struct hci_dev_list_req *devRequestList = 0; + struct hci_dev_info devInfo; + const int devListSize = sizeof(struct hci_dev_list_req) + + HCI_MAX_DEV * sizeof(struct hci_dev_req); + + devRequestList = (hci_dev_list_req *) malloc(devListSize); + if (!devRequestList) { + qt_safe_close(hciSocket); + return false; // if we cannot malloc nothing will help anyway + } + + QScopedPointer<hci_dev_list_req, QScopedPointerPodDeleter> pDevList(devRequestList); + memset(pDevList.data(), 0, devListSize); + pDevList->dev_num = HCI_MAX_DEV; + devRequest = pDevList->dev_req; + + if (qt_safe_ioctl(hciSocket, HCIGETDEVLIST, devRequestList) < 0) { + qt_safe_close(hciSocket); + qCWarning(QT_BT_BLUEZ) << "HCI icotl HCIGETDEVLIST:" << qt_error_string(errno); + return false; + } + + if (devRequestList->dev_num > 0) { + devInfo.dev_id = devRequest->dev_id; + if (qt_safe_ioctl(hciSocket, HCIGETDEVINFO, &devInfo) < 0) { + qt_safe_close(hciSocket); + qCWarning(QT_BT_BLUEZ) << "HCI icotl HCIGETDEVINFO:" << qt_error_string(errno); + return false; + } + } + + // check HCIGETCONNLIST + const int maxNoOfConnections = 20; + hci_conn_list_req *infoList = nullptr; + infoList = (hci_conn_list_req *) + malloc(sizeof(hci_conn_list_req) + maxNoOfConnections * sizeof(hci_conn_info)); + + if (!infoList) { + qt_safe_close(hciSocket); + return false; + } + + QScopedPointer<hci_conn_list_req, QScopedPointerPodDeleter> pInfoList(infoList); + pInfoList->conn_num = maxNoOfConnections; + pInfoList->dev_id = devInfo.dev_id; + + if (qt_safe_ioctl(hciSocket, HCIGETCONNLIST, (void *) infoList) < 0) { + qCWarning(QT_BT_BLUEZ) << "HCI icotl HCIGETCONNLIST:" << qt_error_string(errno); + qt_safe_close(hciSocket); + return false; + } + + qt_safe_close(hciSocket); + return true; +} + +/*! + * This function returns the version of bluetoothd in use on the system. + * This is required to determine which QLEControllerPrivate implementation + * is required. The following version tags are of significance: + * + * Version < 4.0 -> QLEControllerPrivateCommon + * Version < 5.42 -> QLEControllerPrivateBluez + * Version >= 5.42 -> QLEControllerPrivateBluezDBus + * + * This function utilizes a singleton pattern. It always returns a cached + * version tag which is determined on first call. This is necessary to + * avoid continuesly running the somewhat expensive tests. + * + * The function must never return a null QVersionNumber. + */ +QVersionNumber bluetoothdVersion() +{ + if (bluezDaemonVersion()->isNull()) { + qCDebug(QT_BT_BLUEZ) << "Detecting bluetoothd version"; + //Order of matching + // 1. Pick whatever the user decides via BLUETOOTH_FORCE_DBUS_LE_VERSION + // Set version to below version 5.42 to use custom/old GATT stack implementation + const QString version = qEnvironmentVariable("BLUETOOTH_FORCE_DBUS_LE_VERSION"); + if (!version.isNull()) { + const QVersionNumber vn = QVersionNumber::fromString(version); + if (!vn.isNull()) { + *bluezDaemonVersion() = vn; + qCDebug(QT_BT_BLUEZ) << "Forcing Bluez LE API selection:" + << bluezDaemonVersion()->toString(); + } + } + + // 2. Find bluetoothd binary and check "bluetoothd --version" + if (bluezDaemonVersion()->isNull() && qt_haveLinuxProcfs()) { + QDBusConnection session = QDBusConnection::systemBus(); + qint64 pid = session.interface()->servicePid(QStringLiteral("org.bluez")).value(); + QByteArray buffer; + + auto determineBinaryVersion = [](const QString &binary) -> QVersionNumber { + QProcess process; + process.start(binary, {QStringLiteral("--version")}); + process.waitForFinished(); + + const QString version = QString::fromLocal8Bit(process.readAll()); + const QVersionNumber vn = QVersionNumber::fromString(version); + if (!vn.isNull()) + qCDebug(QT_BT_BLUEZ) << "Detected bluetoothd version" << vn; + return vn; + }; + + //try reading /proc/<pid>/exe first -> requires process owner + qCDebug(QT_BT_BLUEZ) << "Using /proc/<pid>/exe"; + const QString procExe = QStringLiteral("/proc/%1/exe").arg(pid); + const QVersionNumber vn = determineBinaryVersion(procExe); + if (!vn.isNull()) + *bluezDaemonVersion() = vn; + + if (bluezDaemonVersion()->isNull()) { + qCDebug(QT_BT_BLUEZ) << "Using /proc/<pid>/cmdline"; + //try to reading /proc/<pid>/cmdline (does not require additional process rights) + QFile procFile(QStringLiteral("/proc/%1/cmdline").arg(pid)); + if (procFile.open(QIODevice::ReadOnly|QIODevice::Text)) { + buffer = procFile.readAll(); + procFile.close(); + + // cmdline params separated by character \0 -> first is bluetoothd binary + const QString binary = QString::fromLocal8Bit(buffer.split('\0').at(0)); + QFileInfo info(binary); + if (info.isExecutable()) + *bluezDaemonVersion() = determineBinaryVersion(binary); + else + qCDebug(QT_BT_BLUEZ) << "Cannot determine bluetoothd version via cmdline:" + << binary; + } + } + } + + // 3. Fall back to custom ATT backend, if possible? + if (bluezDaemonVersion()->isNull()) { + // Check mandatory HCI ioctls are available + if (mandatoryHciIoctlsAvailable()) { + // default 4.0 for now -> implies custom (G)ATT implementation + *bluezDaemonVersion() = QVersionNumber(4, 0); + } + } + + // 4. Ultimate fallback -> enable dummy backend + if (bluezDaemonVersion()->isNull()) { + // version 3 represents disabled BTLE + // bluezDaemonVersion should not be null to avoid repeated version tests + *bluezDaemonVersion() = QVersionNumber(3, 0); + qCWarning(QT_BT_BLUEZ) << "Cannot determine bluetoothd version and required Bluetooth HCI ioctols"; + qCWarning(QT_BT_BLUEZ) << "Disabling Qt Bluetooth LE feature"; + } + + qCDebug(QT_BT_BLUEZ) << "Bluetoothd:" << bluezDaemonVersion()->toString(); + } + + Q_ASSERT(!bluezDaemonVersion()->isNull()); + return *bluezDaemonVersion(); +} + struct AdapterData { public: diff --git a/src/bluetooth/bluez/bluez5_helper_p.h b/src/bluetooth/bluez/bluez5_helper_p.h index 2d72caf1..1747f249 100644 --- a/src/bluetooth/bluez/bluez5_helper_p.h +++ b/src/bluetooth/bluez/bluez5_helper_p.h @@ -54,6 +54,7 @@ #include <QtCore/QObject> #include <QtDBus/QtDBus> #include <QtBluetooth/QBluetoothAddress> +#include <QtBluetooth/private/qtbluetoothglobal_p.h> typedef QMap<QString, QVariantMap> InterfaceList; typedef QMap<QDBusObjectPath, InterfaceList> ManagedObjectList; @@ -67,6 +68,9 @@ QT_BEGIN_NAMESPACE bool isBluez5(); +// exported for unit test purposes +Q_BLUETOOTH_PRIVATE_EXPORT QVersionNumber bluetoothdVersion(); + QString sanitizeNameForDBus(const QString& text); QString findAdapterForAddress(const QBluetoothAddress &wantedAddress, bool *ok); diff --git a/src/bluetooth/bluez/bluez_data_p.h b/src/bluetooth/bluez/bluez_data_p.h index 684cd5b8..2a2e597c 100644 --- a/src/bluetooth/bluez/bluez_data_p.h +++ b/src/bluetooth/bluez/bluez_data_p.h @@ -123,6 +123,10 @@ struct bt_security { #error "Unknown byte order" #endif +#define HCIGETCONNLIST _IOR('H', 212, int) +#define HCIGETDEVINFO _IOR('H', 211, int) +#define HCIGETDEVLIST _IOR('H', 210, int) + // Bluetooth address typedef struct { quint8 b[6]; diff --git a/src/bluetooth/bluez/device.cpp b/src/bluetooth/bluez/device.cpp index 5dc814dc..14b91ad0 100644 --- a/src/bluetooth/bluez/device.cpp +++ b/src/bluetooth/bluez/device.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -i servicemap_p.h -p device_p.h:device.cpp org.bluez.Device.xml org.bluez.Device * - * 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.cpp b/src/bluetooth/bluez/device1_bluez5.cpp index 491a365d..cd6453ad 100644 --- a/src/bluetooth/bluez/device1_bluez5.cpp +++ b/src/bluetooth/bluez/device1_bluez5.cpp @@ -1,5 +1,6 @@ /* * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p device1_bluez5_p.h:device1_bluez5.cpp org.bluez.Device1.xml * * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. * diff --git a/src/bluetooth/bluez/device1_bluez5_p.h b/src/bluetooth/bluez/device1_bluez5_p.h index 4feb5318..b9523a56 100644 --- a/src/bluetooth/bluez/device1_bluez5_p.h +++ b/src/bluetooth/bluez/device1_bluez5_p.h @@ -1,5 +1,6 @@ /* * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p device1_bluez5_p.h:device1_bluez5.cpp org.bluez.Device1.xml * * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. * diff --git a/src/bluetooth/bluez/device_p.h b/src/bluetooth/bluez/device_p.h index 417db3d9..2e1e39ad 100644 --- a/src/bluetooth/bluez/device_p.h +++ b/src/bluetooth/bluez/device_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -i servicemap_p.h -p device_p.h:device.cpp org.bluez.Device.xml org.bluez.Device * - * 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 DEVICE_P_H_1273205927 -#define DEVICE_P_H_1273205927 +#ifndef DEVICE_P_H +#define DEVICE_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -32,7 +32,7 @@ public: { return "org.bluez.Device"; } public: - OrgBluezDeviceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezDeviceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezDeviceInterface(); @@ -40,53 +40,53 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<> CancelDiscovery() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("CancelDiscovery"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("CancelDiscovery"), argumentList); } inline QDBusPendingReply<QDBusObjectPath> CreateNode(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("CreateNode"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("CreateNode"), argumentList); } inline QDBusPendingReply<> Disconnect() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("Disconnect"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Disconnect"), argumentList); } inline QDBusPendingReply<ServiceMap> DiscoverServices(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("DiscoverServices"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("DiscoverServices"), argumentList); } inline QDBusPendingReply<QVariantMap> GetProperties() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("GetProperties"), argumentList); } inline QDBusPendingReply<QList<QDBusObjectPath> > ListNodes() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("ListNodes"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ListNodes"), argumentList); } inline QDBusPendingReply<> RemoveNode(const QDBusObjectPath &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("RemoveNode"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("RemoveNode"), argumentList); } inline QDBusPendingReply<> SetProperty(const QString &in0, const QDBusVariant &in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("SetProperty"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("SetProperty"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/gattchar1.cpp b/src/bluetooth/bluez/gattchar1.cpp new file mode 100644 index 00000000..cdb3fc0d --- /dev/null +++ b/src/bluetooth/bluez/gattchar1.cpp @@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattchar1_p.h:gattchar1.cpp org.bluez.GattCharacteristic1.xml + * + * 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 + * before re-generating it. + */ + +#include "gattchar1_p.h" + +/* + * Implementation of interface class OrgBluezGattCharacteristic1Interface + */ + +OrgBluezGattCharacteristic1Interface::OrgBluezGattCharacteristic1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) +{ +} + +OrgBluezGattCharacteristic1Interface::~OrgBluezGattCharacteristic1Interface() +{ +} + diff --git a/src/bluetooth/bluez/gattchar1_p.h b/src/bluetooth/bluez/gattchar1_p.h new file mode 100644 index 00000000..c19e9f58 --- /dev/null +++ b/src/bluetooth/bluez/gattchar1_p.h @@ -0,0 +1,93 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattchar1_p.h:gattchar1.cpp org.bluez.GattCharacteristic1.xml + * + * 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 GATTCHAR1_P_H +#define GATTCHAR1_P_H + +#include <QtCore/QObject> +#include <QtCore/QByteArray> +#include <QtCore/QList> +#include <QtCore/QMap> +#include <QtCore/QString> +#include <QtCore/QStringList> +#include <QtCore/QVariant> +#include <QtDBus/QtDBus> + +/* + * Proxy class for interface org.bluez.GattCharacteristic1 + */ +class OrgBluezGattCharacteristic1Interface: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.bluez.GattCharacteristic1"; } + +public: + OrgBluezGattCharacteristic1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); + + ~OrgBluezGattCharacteristic1Interface(); + + Q_PROPERTY(QStringList Flags READ flags) + inline QStringList flags() const + { return qvariant_cast< QStringList >(property("Flags")); } + + Q_PROPERTY(bool Notifying READ notifying) + inline bool notifying() const + { return qvariant_cast< bool >(property("Notifying")); } + + Q_PROPERTY(QDBusObjectPath Service READ service) + inline QDBusObjectPath service() const + { return qvariant_cast< QDBusObjectPath >(property("Service")); } + + Q_PROPERTY(QString UUID READ uUID) + inline QString uUID() const + { return qvariant_cast< QString >(property("UUID")); } + + Q_PROPERTY(QByteArray Value READ value) + inline QByteArray value() const + { return qvariant_cast< QByteArray >(property("Value")); } + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<QByteArray> ReadValue(const QVariantMap &options) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(options); + return asyncCallWithArgumentList(QStringLiteral("ReadValue"), argumentList); + } + + inline QDBusPendingReply<> StartNotify() + { + QList<QVariant> argumentList; + return asyncCallWithArgumentList(QStringLiteral("StartNotify"), argumentList); + } + + inline QDBusPendingReply<> StopNotify() + { + QList<QVariant> argumentList; + return asyncCallWithArgumentList(QStringLiteral("StopNotify"), argumentList); + } + + inline QDBusPendingReply<> WriteValue(const QByteArray &value, const QVariantMap &options) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(value) << QVariant::fromValue(options); + return asyncCallWithArgumentList(QStringLiteral("WriteValue"), argumentList); + } + +Q_SIGNALS: // SIGNALS +}; + +namespace org { + namespace bluez { + typedef ::OrgBluezGattCharacteristic1Interface GattCharacteristic1; + } +} +#endif diff --git a/src/bluetooth/bluez/gattdesc1.cpp b/src/bluetooth/bluez/gattdesc1.cpp new file mode 100644 index 00000000..8447e49b --- /dev/null +++ b/src/bluetooth/bluez/gattdesc1.cpp @@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattdesc1_p.h:gattdesc1.cpp org.bluez.GattDescriptor1.xml + * + * 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 + * before re-generating it. + */ + +#include "gattdesc1_p.h" + +/* + * Implementation of interface class OrgBluezGattDescriptor1Interface + */ + +OrgBluezGattDescriptor1Interface::OrgBluezGattDescriptor1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) +{ +} + +OrgBluezGattDescriptor1Interface::~OrgBluezGattDescriptor1Interface() +{ +} + diff --git a/src/bluetooth/bluez/gattdesc1_p.h b/src/bluetooth/bluez/gattdesc1_p.h new file mode 100644 index 00000000..6ade7a42 --- /dev/null +++ b/src/bluetooth/bluez/gattdesc1_p.h @@ -0,0 +1,73 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattdesc1_p.h:gattdesc1.cpp org.bluez.GattDescriptor1.xml + * + * 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 GATTDESC1_P_H +#define GATTDESC1_P_H + +#include <QtCore/QObject> +#include <QtCore/QByteArray> +#include <QtCore/QList> +#include <QtCore/QMap> +#include <QtCore/QString> +#include <QtCore/QStringList> +#include <QtCore/QVariant> +#include <QtDBus/QtDBus> + +/* + * Proxy class for interface org.bluez.GattDescriptor1 + */ +class OrgBluezGattDescriptor1Interface: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.bluez.GattDescriptor1"; } + +public: + OrgBluezGattDescriptor1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); + + ~OrgBluezGattDescriptor1Interface(); + + Q_PROPERTY(QDBusObjectPath Characteristic READ characteristic) + inline QDBusObjectPath characteristic() const + { return qvariant_cast< QDBusObjectPath >(property("Characteristic")); } + + Q_PROPERTY(QString UUID READ uUID) + inline QString uUID() const + { return qvariant_cast< QString >(property("UUID")); } + + Q_PROPERTY(QByteArray Value READ value) + inline QByteArray value() const + { return qvariant_cast< QByteArray >(property("Value")); } + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<QByteArray> ReadValue(const QVariantMap &options) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(options); + return asyncCallWithArgumentList(QStringLiteral("ReadValue"), argumentList); + } + + inline QDBusPendingReply<> WriteValue(const QByteArray &value, const QVariantMap &options) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(value) << QVariant::fromValue(options); + return asyncCallWithArgumentList(QStringLiteral("WriteValue"), argumentList); + } + +Q_SIGNALS: // SIGNALS +}; + +namespace org { + namespace bluez { + typedef ::OrgBluezGattDescriptor1Interface GattDescriptor1; + } +} +#endif diff --git a/src/bluetooth/bluez/gattservice1.cpp b/src/bluetooth/bluez/gattservice1.cpp new file mode 100644 index 00000000..0b80ac90 --- /dev/null +++ b/src/bluetooth/bluez/gattservice1.cpp @@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattservice1_p.h:gattservice1.cpp org.bluez.GattService1.xml + * + * 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 + * before re-generating it. + */ + +#include "gattservice1_p.h" + +/* + * Implementation of interface class OrgBluezGattService1Interface + */ + +OrgBluezGattService1Interface::OrgBluezGattService1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) +{ +} + +OrgBluezGattService1Interface::~OrgBluezGattService1Interface() +{ +} + diff --git a/src/bluetooth/bluez/gattservice1_p.h b/src/bluetooth/bluez/gattservice1_p.h new file mode 100644 index 00000000..128305f1 --- /dev/null +++ b/src/bluetooth/bluez/gattservice1_p.h @@ -0,0 +1,63 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -p gattservice1_p.h:gattservice1.cpp org.bluez.GattService1.xml + * + * 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 GATTSERVICE1_P_H +#define GATTSERVICE1_P_H + +#include <QtCore/QObject> +#include <QtCore/QByteArray> +#include <QtCore/QList> +#include <QtCore/QMap> +#include <QtCore/QString> +#include <QtCore/QStringList> +#include <QtCore/QVariant> +#include <QtDBus/QtDBus> + +/* + * Proxy class for interface org.bluez.GattService1 + */ +class OrgBluezGattService1Interface: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "org.bluez.GattService1"; } + +public: + OrgBluezGattService1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); + + ~OrgBluezGattService1Interface(); + + Q_PROPERTY(QDBusObjectPath Device READ device) + inline QDBusObjectPath device() const + { return qvariant_cast< QDBusObjectPath >(property("Device")); } + + Q_PROPERTY(QList<QDBusObjectPath> Includes READ includes) + inline QList<QDBusObjectPath> includes() const + { return qvariant_cast< QList<QDBusObjectPath> >(property("Includes")); } + + Q_PROPERTY(bool Primary READ primary) + inline bool primary() const + { return qvariant_cast< bool >(property("Primary")); } + + Q_PROPERTY(QString UUID READ uUID) + inline QString uUID() const + { return qvariant_cast< QString >(property("UUID")); } + +public Q_SLOTS: // METHODS +Q_SIGNALS: // SIGNALS +}; + +namespace org { + namespace bluez { + typedef ::OrgBluezGattService1Interface GattService1; + } +} +#endif diff --git a/src/bluetooth/bluez/generate b/src/bluetooth/bluez/generate index cdba18c4..5c401ffe 100755 --- a/src/bluetooth/bluez/generate +++ b/src/bluetooth/bluez/generate @@ -13,10 +13,14 @@ qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml org.openobe #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 -i bluez5_helper_p.h -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 -i bluez5_helper_p.h -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 +qdbusxml2cpp -p gattchar1_p.h:gattchar1.cpp org.bluez.GattCharacteristic1.xml +qdbusxml2cpp -p gattdesc1_p.h:gattdesc1.cpp org.bluez.GattDescriptor1.xml +qdbusxml2cpp -p gattservice1_p.h:gattservice1.cpp org.bluez.GattService1.xml + diff --git a/src/bluetooth/bluez/hcimanager.cpp b/src/bluetooth/bluez/hcimanager.cpp index c524117c..bdb74ae0 100644 --- a/src/bluetooth/bluez/hcimanager.cpp +++ b/src/bluetooth/bluez/hcimanager.cpp @@ -40,7 +40,7 @@ #include "hcimanager_p.h" -#include "qbluetoothsocket_p.h" +#include "qbluetoothsocketbase_p.h" #include "qlowenergyconnectionparameters.h" #include <QtCore/qloggingcategory.h> @@ -53,10 +53,6 @@ #include <sys/uio.h> #include <unistd.h> -#define HCIGETCONNLIST _IOR('H', 212, int) -#define HCIGETDEVINFO _IOR('H', 211, int) -#define HCIGETDEVLIST _IOR('H', 210, int) - QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ) diff --git a/src/bluetooth/bluez/manager.cpp b/src/bluetooth/bluez/manager.cpp index b5d6590d..8ca6fb42 100644 --- a/src/bluetooth/bluez/manager.cpp +++ b/src/bluetooth/bluez/manager.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p manager_p.h:manager.cpp org.bluez.Manager.xml org.bluez.Manager * - * 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/manager_p.h b/src/bluetooth/bluez/manager_p.h index edb1c73b..a969e067 100644 --- a/src/bluetooth/bluez/manager_p.h +++ b/src/bluetooth/bluez/manager_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p manager_p.h:manager.cpp org.bluez.Manager.xml org.bluez.Manager * - * 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 MANAGER_P_H_1273205927 -#define MANAGER_P_H_1273205927 +#ifndef MANAGER_P_H +#define MANAGER_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.Manager"; } public: - OrgBluezManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezManagerInterface(); @@ -39,20 +39,20 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<QDBusObjectPath> DefaultAdapter() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("DefaultAdapter"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("DefaultAdapter"), argumentList); } inline QDBusPendingReply<QDBusObjectPath> FindAdapter(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("FindAdapter"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("FindAdapter"), argumentList); } inline QDBusPendingReply<QList<QDBusObjectPath> > ListAdapters() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("ListAdapters"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ListAdapters"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/obex_agent.cpp b/src/bluetooth/bluez/obex_agent.cpp index c5252898..5bc05f87 100644 --- a/src/bluetooth/bluez/obex_agent.cpp +++ b/src/bluetooth/bluez/obex_agent.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 - * Command line was: qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml org.openobex.Agent * - * 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. diff --git a/src/bluetooth/bluez/obex_agent_p.h b/src/bluetooth/bluez/obex_agent_p.h index 8af38d86..242b2598 100644 --- a/src/bluetooth/bluez/obex_agent_p.h +++ b/src/bluetooth/bluez/obex_agent_p.h @@ -1,20 +1,19 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 - * Command line was: qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -a obex_agent_p.h:obex_agent.cpp org.openobex.agent.xml org.openobex.Agent * - * 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 * before re-generating it. */ -#ifndef OBEX_AGENT_P_H_1291359033 -#define OBEX_AGENT_P_H_1291359033 +#ifndef OBEX_AGENT_P_H +#define OBEX_AGENT_P_H #include <QtCore/QObject> #include <QtDBus/QtDBus> - QT_BEGIN_NAMESPACE class QByteArray; template<class T> class QList; diff --git a/src/bluetooth/bluez/obex_client.cpp b/src/bluetooth/bluez/obex_client.cpp index 07730d42..bef9155a 100644 --- a/src/bluetooth/bluez/obex_client.cpp +++ b/src/bluetooth/bluez/obex_client.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_client_p.h:obex_client.cpp org.openobex.client.xml org.openobex.Client * - * 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/obex_client1_bluez5_p.h b/src/bluetooth/bluez/obex_client1_bluez5_p.h index 5133faea..ccd5b0d6 100644 --- a/src/bluetooth/bluez/obex_client1_bluez5_p.h +++ b/src/bluetooth/bluez/obex_client1_bluez5_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp org.bluez.Client1.xml -p asd + * Command line was: qdbusxml2cpp -p obex_client1_bluez5_p.h:obex_client1_bluez5_p.h org.bluez.Client1.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 ASD_H_1399976174 -#define ASD_H_1399976174 +#ifndef OBEX_CLIENT1_BLUEZ5_P_H +#define OBEX_CLIENT1_BLUEZ5_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.obex.Client1"; } public: - OrgBluezObexClient1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezObexClient1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezObexClient1Interface(); @@ -40,14 +40,14 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(destination) << QVariant::fromValue(args); - return asyncCallWithArgumentList(QLatin1String("CreateSession"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("CreateSession"), argumentList); } inline QDBusPendingReply<> RemoveSession(const QDBusObjectPath &session) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(session); - return asyncCallWithArgumentList(QLatin1String("RemoveSession"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("RemoveSession"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/obex_client_p.h b/src/bluetooth/bluez/obex_client_p.h index b2dd0f61..13b638b6 100644 --- a/src/bluetooth/bluez/obex_client_p.h +++ b/src/bluetooth/bluez/obex_client_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_client_p.h:obex_client.cpp org.openobex.client.xml org.openobex.Client * - * 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 OBEX_CLIENT_P_H_1291349694 -#define OBEX_CLIENT_P_H_1291349694 +#ifndef OBEX_CLIENT_P_H +#define OBEX_CLIENT_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.openobex.Client"; } public: - OrgOpenobexClientInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgOpenobexClientInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgOpenobexClientInterface(); @@ -39,36 +39,36 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<QDBusObjectPath> CreateSession(const QVariantMap &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("CreateSession"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("CreateSession"), argumentList); } inline QDBusPendingReply<> ExchangeBusinessCards(const QVariantMap &in0, const QString &in1, const QString &in2) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1) << qVariantFromValue(in2); - return asyncCallWithArgumentList(QLatin1String("ExchangeBusinessCards"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); + return asyncCallWithArgumentList(QStringLiteral("ExchangeBusinessCards"), argumentList); } inline QDBusPendingReply<QString> GetCapabilities(const QVariantMap &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("GetCapabilities"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("GetCapabilities"), argumentList); } inline QDBusPendingReply<> PullBusinessCard(const QVariantMap &in0, const QString &in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("PullBusinessCard"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("PullBusinessCard"), argumentList); } inline QDBusPendingReply<> SendFiles(const QVariantMap &in0, const QStringList &in1, const QDBusObjectPath &in2) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1) << qVariantFromValue(in2); - return asyncCallWithArgumentList(QLatin1String("SendFiles"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); + return asyncCallWithArgumentList(QStringLiteral("SendFiles"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/obex_manager.cpp b/src/bluetooth/bluez/obex_manager.cpp index 0eb5d1c8..cc6e0ecb 100644 --- a/src/bluetooth/bluez/obex_manager.cpp +++ b/src/bluetooth/bluez/obex_manager.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_manager_p.h:obex_manager.cpp org.openobex.all.xml org.openobex.Manager * - * 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/obex_manager_p.h b/src/bluetooth/bluez/obex_manager_p.h index a6e4d189..822954ab 100644 --- a/src/bluetooth/bluez/obex_manager_p.h +++ b/src/bluetooth/bluez/obex_manager_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_manager_p.h:obex_manager.cpp org.openobex.all.xml org.openobex.Manager * - * 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 OBEX_MANAGER_P_H_1291186314 -#define OBEX_MANAGER_P_H_1291186314 +#ifndef OBEX_MANAGER_P_H +#define OBEX_MANAGER_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.openobex.Manager"; } public: - OrgOpenobexManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgOpenobexManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgOpenobexManagerInterface(); @@ -39,15 +39,15 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<> RegisterAgent(const QDBusObjectPath &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("RegisterAgent"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("RegisterAgent"), argumentList); } inline QDBusPendingReply<> UnregisterAgent(const QDBusObjectPath &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("UnregisterAgent"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("UnregisterAgent"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/obex_objectpush1_bluez5.cpp b/src/bluetooth/bluez/obex_objectpush1_bluez5.cpp index 6edb27a8..59b94e80 100644 --- a/src/bluetooth/bluez/obex_objectpush1_bluez5.cpp +++ b/src/bluetooth/bluez/obex_objectpush1_bluez5.cpp @@ -1,8 +1,8 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp org.bluez.obex.ObjectPush1.xml -p obex_objectpush1_bluez5 + * Command line was: qdbusxml2cpp -p obex_objectpush1_bluez5_p.h:obex_objectpush1_bluez5.cpp org.bluez.obex.ObjectPush1.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/obex_objectpush1_bluez5_p.h b/src/bluetooth/bluez/obex_objectpush1_bluez5_p.h index ba5f090d..5fa1703b 100644 --- a/src/bluetooth/bluez/obex_objectpush1_bluez5_p.h +++ b/src/bluetooth/bluez/obex_objectpush1_bluez5_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp org.bluez.obex.ObjectPush1.xml -p obex_objectpush1_bluez5 + * Command line was: qdbusxml2cpp -p obex_objectpush1_bluez5_p.h:obex_objectpush1_bluez5.cpp org.bluez.obex.ObjectPush1.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 OBEX_OBJECTPUSH1_BLUEZ5_H_1399989318 -#define OBEX_OBJECTPUSH1_BLUEZ5_H_1399989318 +#ifndef OBEX_OBJECTPUSH1_BLUEZ5_P_H +#define OBEX_OBJECTPUSH1_BLUEZ5_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.obex.ObjectPush1"; } public: - OrgBluezObexObjectPush1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezObexObjectPush1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezObexObjectPush1Interface(); @@ -40,13 +40,13 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(clientfile) << QVariant::fromValue(targetfile); - return asyncCallWithArgumentList(QLatin1String("ExchangeBusinessCards"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("ExchangeBusinessCards"), argumentList); } inline QDBusReply<QDBusObjectPath> ExchangeBusinessCards(const QString &clientfile, const QString &targetfile, QVariantMap &properties) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(clientfile) << QVariant::fromValue(targetfile); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("ExchangeBusinessCards"), argumentList); + QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("ExchangeBusinessCards"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { properties = qdbus_cast<QVariantMap>(reply.arguments().at(1)); } @@ -57,13 +57,13 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(targetfile); - return asyncCallWithArgumentList(QLatin1String("PullBusinessCard"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("PullBusinessCard"), argumentList); } inline QDBusReply<QDBusObjectPath> PullBusinessCard(const QString &targetfile, QVariantMap &properties) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(targetfile); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("PullBusinessCard"), argumentList); + QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("PullBusinessCard"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { properties = qdbus_cast<QVariantMap>(reply.arguments().at(1)); } @@ -74,13 +74,13 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(sourcefile); - return asyncCallWithArgumentList(QLatin1String("SendFile"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("SendFile"), argumentList); } inline QDBusReply<QDBusObjectPath> SendFile(const QString &sourcefile, QVariantMap &properties) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(sourcefile); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("SendFile"), argumentList); + QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("SendFile"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { properties = qdbus_cast<QVariantMap>(reply.arguments().at(1)); } diff --git a/src/bluetooth/bluez/obex_transfer.cpp b/src/bluetooth/bluez/obex_transfer.cpp index 49e1f7c9..be27362f 100644 --- a/src/bluetooth/bluez/obex_transfer.cpp +++ b/src/bluetooth/bluez/obex_transfer.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_transfer_p.h:obex_transfer.cpp org.openobex.transfer.xml org.openobex.Transfer * - * 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/obex_transfer1_bluez5_p.h b/src/bluetooth/bluez/obex_transfer1_bluez5_p.h index 2307f2ae..ccde588e 100644 --- a/src/bluetooth/bluez/obex_transfer1_bluez5_p.h +++ b/src/bluetooth/bluez/obex_transfer1_bluez5_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp org.bluez.obex.Transfer1.xml -p obex_transfer1_bluez5 + * Command line was: qdbusxml2cpp -p obex_transfer1_bluez5_p.h:obex_transfer1_bluez5_p.h org.bluez.obex.Transfer1.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 OBEX_TRANSFER1_BLUEZ5_H_1400058158 -#define OBEX_TRANSFER1_BLUEZ5_H_1400058158 +#ifndef OBEX_TRANSFER1_BLUEZ5_P_H +#define OBEX_TRANSFER1_BLUEZ5_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.obex.Transfer1"; } public: - OrgBluezObexTransfer1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezObexTransfer1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezObexTransfer1Interface(); @@ -63,19 +63,19 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<> Cancel() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("Cancel"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Cancel"), argumentList); } inline QDBusPendingReply<> Resume() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("Resume"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Resume"), argumentList); } inline QDBusPendingReply<> Suspend() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("Suspend"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Suspend"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/obex_transfer_p.h b/src/bluetooth/bluez/obex_transfer_p.h index 81b9eb22..b8fa0a5d 100644 --- a/src/bluetooth/bluez/obex_transfer_p.h +++ b/src/bluetooth/bluez/obex_transfer_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p obex_transfer_p.h:obex_transfer.cpp org.openobex.transfer.xml org.openobex.Transfer * - * 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 OBEX_TRANSFER_P_H_1291853849 -#define OBEX_TRANSFER_P_H_1291853849 +#ifndef OBEX_TRANSFER_P_H +#define OBEX_TRANSFER_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.openobex.Transfer"; } public: - OrgOpenobexTransferInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgOpenobexTransferInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgOpenobexTransferInterface(); @@ -39,13 +39,13 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<> Cancel() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("Cancel"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Cancel"), argumentList); } inline QDBusPendingReply<QVariantMap> GetProperties() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("GetProperties"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/objectmanager.cpp b/src/bluetooth/bluez/objectmanager.cpp index a8e8fdba..4484ea27 100644 --- a/src/bluetooth/bluez/objectmanager.cpp +++ b/src/bluetooth/bluez/objectmanager.cpp @@ -1,8 +1,8 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p objectmanager -v -i bluez5_helper.h org.freedesktop.dbus.objectmanager.xml + * Command line was: qdbusxml2cpp -p objectmanager_p.h:objectmanager.cpp org.freedesktop.dbus.objectmanager.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/objectmanager_p.h b/src/bluetooth/bluez/objectmanager_p.h index 74f5ab43..7aa2f35b 100644 --- a/src/bluetooth/bluez/objectmanager_p.h +++ b/src/bluetooth/bluez/objectmanager_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p objectmanager -v -i bluez5_helper.h org.freedesktop.dbus.objectmanager.xml + * Command line was: qdbusxml2cpp -p objectmanager_p.h:objectmanager.cpp org.freedesktop.dbus.objectmanager.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 OBJECTMANAGER_H_1396883000 -#define OBJECTMANAGER_H_1396883000 +#ifndef OBJECTMANAGER_P_H +#define OBJECTMANAGER_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -33,7 +33,7 @@ public: { return "org.freedesktop.DBus.ObjectManager"; } public: - OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgFreedesktopDBusObjectManagerInterface(); @@ -41,7 +41,7 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<ManagedObjectList> GetManagedObjects() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("GetManagedObjects"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/org.bluez.GattCharacteristic1.xml b/src/bluetooth/bluez/org.bluez.GattCharacteristic1.xml new file mode 100644 index 00000000..f62014cf --- /dev/null +++ b/src/bluetooth/bluez/org.bluez.GattCharacteristic1.xml @@ -0,0 +1,22 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="org.bluez.GattCharacteristic1"> + <method name="ReadValue"> + <arg name="options" type="a{sv}" direction="in"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> + <arg name="value" type="ay" direction="out"/> + </method> + <method name="WriteValue"> + <arg name="value" type="ay" direction="in"/> + <arg name="options" type="a{sv}" direction="in"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> + </method> + <method name="StartNotify"></method> + <method name="StopNotify"></method> + <property name="UUID" type="s" access="read"></property> + <property name="Service" type="o" access="read"></property> + <property name="Value" type="ay" access="read"></property> + <property name="Notifying" type="b" access="read"></property> + <property name="Flags" type="as" access="read"></property> + </interface> +</node> diff --git a/src/bluetooth/bluez/org.bluez.GattDescriptor1.xml b/src/bluetooth/bluez/org.bluez.GattDescriptor1.xml new file mode 100644 index 00000000..fc7ebce0 --- /dev/null +++ b/src/bluetooth/bluez/org.bluez.GattDescriptor1.xml @@ -0,0 +1,18 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="org.bluez.GattDescriptor1"> + <method name="ReadValue"> + <arg name="options" type="a{sv}" direction="in"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> + <arg name="value" type="ay" direction="out"/> + </method> + <method name="WriteValue"> + <arg name="value" type="ay" direction="in"/> + <arg name="options" type="a{sv}" direction="in"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> + </method> + <property name="UUID" type="s" access="read"></property> + <property name="Characteristic" type="o" access="read"></property> + <property name="Value" type="ay" access="read"></property> + </interface> +</node> diff --git a/src/bluetooth/bluez/org.bluez.GattService1.xml b/src/bluetooth/bluez/org.bluez.GattService1.xml new file mode 100644 index 00000000..e90eeda7 --- /dev/null +++ b/src/bluetooth/bluez/org.bluez.GattService1.xml @@ -0,0 +1,9 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="org.bluez.GattService1"> + <property name="UUID" type="s" access="read"></property> + <property name="Device" type="o" access="read"></property> + <property name="Primary" type="b" access="read"></property> + <property name="Includes" type="ao" access="read"></property> + </interface> +</node> diff --git a/src/bluetooth/bluez/profile1.cpp b/src/bluetooth/bluez/profile1.cpp index c289c89b..26d42c7c 100644 --- a/src/bluetooth/bluez/profile1.cpp +++ b/src/bluetooth/bluez/profile1.cpp @@ -1,8 +1,8 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p profile1 org.bluez.ProfileManager1.xml + * Command line was: qdbusxml2cpp -p profile1_p.h:profile1.cpp org.bluez.ProfileManager1.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/profile1_p.h b/src/bluetooth/bluez/profile1_p.h index a08f10e0..e61fb2a9 100644 --- a/src/bluetooth/bluez/profile1_p.h +++ b/src/bluetooth/bluez/profile1_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p profile1 org.bluez.ProfileManager1.xml + * Command line was: qdbusxml2cpp -p profile1_p.h:profile1.cpp org.bluez.ProfileManager1.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 PROFILE1_H_1400142085 -#define PROFILE1_H_1400142085 +#ifndef PROFILE1_P_H +#define PROFILE1_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.ProfileManager1"; } public: - OrgBluezProfileManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezProfileManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezProfileManager1Interface(); @@ -40,14 +40,14 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(profile) << QVariant::fromValue(UUID) << QVariant::fromValue(options); - return asyncCallWithArgumentList(QLatin1String("RegisterProfile"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("RegisterProfile"), argumentList); } inline QDBusPendingReply<> UnregisterProfile(const QDBusObjectPath &profile) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(profile); - return asyncCallWithArgumentList(QLatin1String("UnregisterProfile"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("UnregisterProfile"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/properties.cpp b/src/bluetooth/bluez/properties.cpp index 4ddbc30c..1c10bfdc 100644 --- a/src/bluetooth/bluez/properties.cpp +++ b/src/bluetooth/bluez/properties.cpp @@ -1,8 +1,8 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p properties -v org.freedesktop.dbus.properties.xml + * Command line was: qdbusxml2cpp -p properties_p.h:properties.cpp org.freedesktop.dbus.properties.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/properties_p.h b/src/bluetooth/bluez/properties_p.h index daadfefc..16a43e80 100644 --- a/src/bluetooth/bluez/properties_p.h +++ b/src/bluetooth/bluez/properties_p.h @@ -1,15 +1,15 @@ /* * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p properties -v org.freedesktop.dbus.properties.xml + * Command line was: qdbusxml2cpp -p properties_p.h:properties.cpp org.freedesktop.dbus.properties.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 PROPERTIES_H_1396952220 -#define PROPERTIES_H_1396952220 +#ifndef PROPERTIES_P_H +#define PROPERTIES_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.freedesktop.DBus.Properties"; } public: - OrgFreedesktopDBusPropertiesInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgFreedesktopDBusPropertiesInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgFreedesktopDBusPropertiesInterface(); @@ -40,21 +40,21 @@ public Q_SLOTS: // METHODS { QList<QVariant> argumentList; argumentList << QVariant::fromValue(interface) << QVariant::fromValue(name); - return asyncCallWithArgumentList(QLatin1String("Get"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Get"), argumentList); } inline QDBusPendingReply<QVariantMap> GetAll(const QString &interface) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(interface); - return asyncCallWithArgumentList(QLatin1String("GetAll"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("GetAll"), argumentList); } inline QDBusPendingReply<> Set(const QString &interface, const QString &name, const QDBusVariant &value) { QList<QVariant> argumentList; argumentList << QVariant::fromValue(interface) << QVariant::fromValue(name) << QVariant::fromValue(value); - return asyncCallWithArgumentList(QLatin1String("Set"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("Set"), argumentList); } Q_SIGNALS: // SIGNALS diff --git a/src/bluetooth/bluez/remotedevicemanager.cpp b/src/bluetooth/bluez/remotedevicemanager.cpp index f63b21e6..5d17d571 100644 --- a/src/bluetooth/bluez/remotedevicemanager.cpp +++ b/src/bluetooth/bluez/remotedevicemanager.cpp @@ -106,6 +106,7 @@ void RemoteDeviceManager::prepareNextJob() jobQueue.pop_front(); jobInProgress = false; + qDebug(QT_BT_BLUEZ) << "RemoteDeviceManager job queue status:" << jobQueue.empty(); if (jobQueue.empty()) emit finished(); else @@ -163,8 +164,10 @@ void RemoteDeviceManager::disconnectDevice(const QBluetoothAddress &remote) } } - if (!jobStarted) + if (!jobStarted) { + qDebug(QT_BT_BLUEZ) << "RemoteDeviceManager JobDisconnectDevice failed"; QTimer::singleShot(0, this, [this](){ prepareNextJob(); }); + } } QT_END_NAMESPACE diff --git a/src/bluetooth/bluez/service.cpp b/src/bluetooth/bluez/service.cpp index 2004bea7..d2b15fc2 100644 --- a/src/bluetooth/bluez/service.cpp +++ b/src/bluetooth/bluez/service.cpp @@ -1,8 +1,8 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p service_p.h:service.cpp org.bluez.all.xml org.bluez.Service * - * 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/service_p.h b/src/bluetooth/bluez/service_p.h index e8c5e1f4..573265a8 100644 --- a/src/bluetooth/bluez/service_p.h +++ b/src/bluetooth/bluez/service_p.h @@ -1,15 +1,15 @@ /* - * This file was generated by qdbusxml2cpp version 0.7 + * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -p service_p.h:service.cpp org.bluez.all.xml org.bluez.Service * - * 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 SERVICE_P_H_1277421939 -#define SERVICE_P_H_1277421939 +#ifndef SERVICE_P_H +#define SERVICE_P_H #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -31,7 +31,7 @@ public: { return "org.bluez.Service"; } public: - OrgBluezServiceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + OrgBluezServiceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~OrgBluezServiceInterface(); @@ -39,35 +39,35 @@ public Q_SLOTS: // METHODS inline QDBusPendingReply<uint> AddRecord(const QString &in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("AddRecord"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("AddRecord"), argumentList); } inline QDBusPendingReply<> CancelAuthorization() { QList<QVariant> argumentList; - return asyncCallWithArgumentList(QLatin1String("CancelAuthorization"), argumentList); + return asyncCallWithArgumentList(QStringLiteral("CancelAuthorization"), argumentList); } inline QDBusPendingReply<> RemoveRecord(uint in0) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0); - return asyncCallWithArgumentList(QLatin1String("RemoveRecord"), argumentList); + argumentList << QVariant::fromValue(in0); + return asyncCallWithArgumentList(QStringLiteral("RemoveRecord"), argumentList); } inline QDBusPendingReply<> RequestAuthorization(const QString &in0, uint in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("RequestAuthorization"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("RequestAuthorization"), argumentList); } inline QDBusPendingReply<> UpdateRecord(uint in0, const QString &in1) { QList<QVariant> argumentList; - argumentList << qVariantFromValue(in0) << qVariantFromValue(in1); - return asyncCallWithArgumentList(QLatin1String("UpdateRecord"), argumentList); + argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); + return asyncCallWithArgumentList(QStringLiteral("UpdateRecord"), argumentList); } Q_SIGNALS: // SIGNALS |