diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2019-08-05 11:28:30 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2019-08-07 10:44:32 +0200 |
commit | 99db6526341e6f0f2a4798088c1f954cff013b7b (patch) | |
tree | da49c1c9717a03cdc2e69970ad4848e989e6bb8c /src/bluetooth/qbluetoothlocaldevice_p.h | |
parent | 8b7b52d66f2616040ca4aaae3f2732be96e19ab8 (diff) | |
parent | f2f9da656fd77330cce44dfe0721b3f68f1d809d (diff) |
Merge remote-tracking branch 'origin/dev' into wip/win
Change-Id: I83175151c0eef1a11d2f21648cc04c86e46777c1
Diffstat (limited to 'src/bluetooth/qbluetoothlocaldevice_p.h')
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_p.h | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_p.h b/src/bluetooth/qbluetoothlocaldevice_p.h index e18169f9..28e7ed53 100644 --- a/src/bluetooth/qbluetoothlocaldevice_p.h +++ b/src/bluetooth/qbluetoothlocaldevice_p.h @@ -85,6 +85,21 @@ QT_END_NAMESPACE #include <QtCore/QPair> #endif +#ifdef QT_WINRT_BLUETOOTH +#include <wrl.h> + +namespace ABI { + namespace Windows { + namespace Devices { + namespace Bluetooth { + struct IBluetoothDeviceStatics; + struct IBluetoothLEDeviceStatics; + } + } + } +} +#endif + QT_BEGIN_NAMESPACE extern void registerQBluetoothLocalDeviceMetaType(); @@ -232,7 +247,22 @@ public: private: QBluetoothLocalDevice *q_ptr; }; -#elif !defined(QT_OSX_BLUETOOTH) // winrt and dummy backend +#elif defined(QT_WINRT_BLUETOOTH) +class QBluetoothLocalDevicePrivate : public QObject +{ + Q_DECLARE_PUBLIC(QBluetoothLocalDevice) +public: + QBluetoothLocalDevicePrivate(QBluetoothLocalDevice *q, + QBluetoothAddress = QBluetoothAddress()); + + bool isValid() const; + +private: + QBluetoothLocalDevice *q_ptr; + Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::IBluetoothDeviceStatics> mStatics; + Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::IBluetoothLEDeviceStatics> mLEStatics; +}; +#elif !defined(QT_OSX_BLUETOOTH) // dummy backend class QBluetoothLocalDevicePrivate : public QObject { public: @@ -243,11 +273,7 @@ public: bool isValid() const { -#ifndef QT_WINRT_BLUETOOTH return false; -#else - return true; -#endif } }; #endif |