From 25d556c2097445d16cc05b3961f86f1b6ae60ed1 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 3 Apr 2019 13:34:20 +0200 Subject: winrt: Move byteArrayFromBuffer into qbluetoothutils_winrt That code has been (unneededly) duplicated several times. We should have that helper function just once. Change-Id: I28fc9c5f7f7218b7870dc30bec228c9af8c6b090 Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothutils_winrt_p.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/bluetooth/qbluetoothutils_winrt_p.h') diff --git a/src/bluetooth/qbluetoothutils_winrt_p.h b/src/bluetooth/qbluetoothutils_winrt_p.h index c272bae1..93950fc9 100644 --- a/src/bluetooth/qbluetoothutils_winrt_p.h +++ b/src/bluetooth/qbluetoothutils_winrt_p.h @@ -53,10 +53,26 @@ #include +#include + +namespace ABI { + namespace Windows { + namespace Storage { + namespace Streams { + struct IBuffer; + } + } + } +} + QT_BEGIN_NAMESPACE bool supportsNewLEApi(); +using NativeBuffer = ABI::Windows::Storage::Streams::IBuffer; +QByteArray byteArrayFromBuffer(const Microsoft::WRL::ComPtr &buffer, + bool isWCharString = false); + QT_END_NAMESPACE #endif // QBLUETOOTHSOCKET_WINRT_P_H -- cgit v1.2.3