summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothutils_winrt_p.h
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2019-04-03 13:34:20 +0200
committerOliver Wolff <oliver.wolff@qt.io>2019-04-15 12:24:15 +0000
commit25d556c2097445d16cc05b3961f86f1b6ae60ed1 (patch)
tree05e3141d8cff0bf688e22b8b797eb6fedc14ef8c /src/bluetooth/qbluetoothutils_winrt_p.h
parent1bf25e130d4d6ae859c4f2aabe2a752532aee5e5 (diff)
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 <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothutils_winrt_p.h')
-rw-r--r--src/bluetooth/qbluetoothutils_winrt_p.h16
1 files changed, 16 insertions, 0 deletions
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 <QtCore/QtGlobal>
+#include <wrl/client.h>
+
+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<NativeBuffer> &buffer,
+ bool isWCharString = false);
+
QT_END_NAMESPACE
#endif // QBLUETOOTHSOCKET_WINRT_P_H