summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_winrt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Cancel and close the operation before deleting the SocketWorkerAndy Shaw2018-01-261-0/+4
| | | | | | | | | | Since it is possible that after calling Cancel() on the IAsyncInfo that it will still call the Completed() callback, we need to ensure that it has a chance to process the pending events before it is deleted. Change-Id: I7d6fbb5bf6344098048b147c9d361c1fe7923b55 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Initialize the discoveryAgent variable to 0Andy Shaw2018-01-241-0/+1
| | | | | Change-Id: Ief783e899cde02ae033be8cd3af61ab5572d81a5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Check for valid m_socketObject before accessing socket informationOliver Wolff2017-08-021-0/+15
| | | | | | | | | | If the socket was created without giving the socket type, ensureNativeSocket was not called and thus m_socketObject is 0. Calling localName and friends caused a crash because they accesses the object unconditionally. Change-Id: I442e3d1492458161fb8660f1b2f17d52b37a2935 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add indirection for QBluetoothSocket::bytesToWrite()Alex Blasche2017-06-291-0/+5
| | | | | | | | | | | | | | | | | | Not all platforms use txbuffer for writes. Fortunately those platforms who do not use it do not use any buffering at all. Hence bytesToWrite() returned the correct value as txbuffer always had size zero. Therefore this patch is effectively a NOP. Nevertheless this patch encourages the right implementation across the platform. This does not affect macOS as it has a separate implementation for QBluetoothSocket::bytesToWrite(). Task-number: QTBUG-58190 Change-Id: Ic05f4358b079f612ee7e0e4dbb7fb9aa78fd6556 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix concurrent access to QBluetoothSocket::canReadLine() on AndroidAlex Blasche2017-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | On Android, the socket's read buffer is managed in the Java thread. QBluetoothSocket::canReadLine() is public API (most likely) being called by in the main Qt thread though. The function directly called into the Java buffer instance without proper locking. This can create race conditions. Starting with this patch canReadLine() calls another QBluetoothSocketPrivate indirection to allow a platform specific implementation. This affects WinRT, BlueZ and the dummy backend too. This is not an issue on macOS as its implementation of QBluetoothSocket is separate and does not have to deal with multiple QBluetoothSocketPrivate implementations. Task-number: QTBUG-58190 Task-number: QTBUG-60830 Change-Id: Idae19f1aee6f809699d36519b01a3c68ad9c563d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Set proper socket state in setSocketDescriptorOliver Wolff2017-02-031-0/+1
| | | | | Change-Id: I5469f696d0f20d563a67cdcc94af16faf6cac8ea Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Use custom setSocketDescriptor functionOliver Wolff2017-02-031-7/+13
| | | | | | | | We have to use a similar approach to the one that is used on android as the ComPtr cannot reliably passed as an int. Change-Id: Ia52c78d4725fb3240eafa62fcb55531a282c0cd3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Register callbacks in Xaml threadOliver Wolff2017-02-031-9/+15
| | | | | Change-Id: Ib32af0803e95229a1671055da4d5608f3fd3e0f6 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Add bluetooth server supportOliver Wolff2017-01-311-5/+16
| | | | | | Task-numer: QTBUG-37779 Change-Id: Ieb3ed5dfea7d60b3875cbe97bb26f8060bebcc17 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Fix wrong function name in invokeMethod in bluetooth socketOliver Wolff2017-01-301-1/+1
| | | | | Change-Id: I9fd9131c031328afa936a52e42371409e3fbac48 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Add bluetooth socket supportOliver Wolff2017-01-201-0/+644
Task-number: QTBUG-37779 Change-Id: I7fb49a6870768da956793b0d0681c371da939df9 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>