summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_winrt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Do not crash when trying to an unreachable paired LE deviceOliver Wolff2017-12-121-1/+11
| | | | | | | | | | | | | As device discovery returns every paired device on winrt, it is possible that we try to connect to a device, that is paired but not available. When doing so the application should not crash but state that there was an error connecting to the device. Task-number: QTBUG-64480 Change-Id: I8d79f6da1de2b0bda7a51a7cfd068bb4a6057257 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Early return instead of assert is case of errorMaurice Kalinowski2017-11-161-2/+9
| | | | | | | | | Some devices report access denied for various reasons (group policy, disabled, etc.). Hence, do return and stop the discovery instead of asserting. Change-Id: I22fe9cc375fd3b3580deaf72c614bf62600cbf32 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Reflect unsupported state of peripheral role of lowenergycontrollerOliver Wolff2017-11-031-0/+24
| | | | | | | | | | | | | | There currently is no API for supporting the peripheral role on winrt, but there is no way to reflect that inside our API. If a user tries to set up a low energy peripheral device, the application should not crash though. The crash occurred, when the controller was set up in a perihperal role and the application tried to read or write a descriptor or characteristic. In this case the functions should just return early. Task-number: QTBUG-63709 Change-Id: I30b277788d822f869743e1f294ee1402abd36309 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Fix build using -no-pchOliver Wolff2017-10-251-0/+1
| | | | | | Task-number: QTBUG-63210 Change-Id: I98637337d8a77c8847bd0f2c567fec5e6a4ace31 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: qRegisterMetaType for QLowEnergyCharacteristic/QLowEnergyDescriptorOliver Wolff2016-12-071-0/+3
| | | | | | | | | | As the signals about read/written characteristics and descriptors are emitted from a different thread (XAML thread) the types have to be registered in order to make the queued connection work. Task-number: QTBUG-57385 Change-Id: I4542c8d1be03d2d3fe1b0a69b94ef0a2ff916026 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Do not emit a LE status change if an error/timeout happenedOliver Wolff2016-11-011-2/+4
| | | | | | | | | It is possible that the connectionStateChanged callback is called after an error occurred (device is being connected too late). In this case the controller must not emit the connected signal. Change-Id: Id82decba72067b34a2078720802a762e15308a41 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Avoid unnecessary asserts in LowEnergyControllerOliver Wolff2016-11-011-1/+3
| | | | | | | | | We do not want to assert when a user tries to write an invalid value. Setting the correct error and returning early is the proper way to handle this situation. Change-Id: Ia358023ed186bc4b7c5be0e6319182dbe563f576 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: BTLE: Handle characteristic changesOliver Wolff2016-11-011-3/+80
| | | | | | Task-number: QTBUG-37779 Change-Id: Ie368e85286a3d132c633ef759a2bdb0fb206172d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Added missing error handling to device discovery and low energyOliver Wolff2016-10-041-3/+10
| | | | | | | Task-number: QTBUG-56191 Task-number: QTBUG-56219 Change-Id: I8ad3dc392d09055418b0dca3794386e53f287307 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Proper state and warning on access denied errorOliver Wolff2016-07-281-0/+5
| | | | | Change-Id: I4cf980c020fa11a1e213a1f5cd0110033aeaec71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Register connectionStatus callback in Xaml threadOliver Wolff2016-07-261-12/+16
| | | | | Change-Id: I06777c75c20f662d3dff897f65947321eb79d5a2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* WinRT: getNativeService/getNativeCharacteristic helper functionsOliver Wolff2016-07-261-53/+66
| | | | | Change-Id: I5094eb7252049e55617a2883d0f917700c42b451 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* winrt: Proper handling of ClientCharacteristicConfigurationOliver Wolff2016-07-261-91/+229
| | | | | | Task-number: QTBUG-37779 Change-Id: Ie37067abc104a2e6e162ea9e00af8ff6d504fb0e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* WinRT: use constrefs for ComPtr parameters where applicableOliver Wolff2016-07-191-4/+4
| | | | | Change-Id: Ic4ba77d86f11e984ba66929006df183d227fccce Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: BTLE: Write descriptorsOliver Wolff2016-06-161-5/+89
| | | | | | | Task-number: QTBUG-37779 Change-Id: Ib3ef0723b069275f4dd96dfba8316cc2b4ecb4f3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: BTLE: Write characteristicsOliver Wolff2016-06-161-6/+83
| | | | | | | Task-number: QTBUG-37779 Change-Id: I10a9ebdb6d879646f9b063fa031b02f0c71797b4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: BTLE: Read descriptorsOliver Wolff2016-06-161-4/+70
| | | | | | | Task-number: QTBUG-37779 Change-Id: I25f598ad7b5aef3791070842cbbc1a405e264572 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: BTLE: Read characteristicsOliver Wolff2016-06-161-3/+57
| | | | | | | Task-number: QTBUG-37779 Change-Id: I430009132f68ed71e6054bebece05101fde7409a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: Use ComPtr for native typesOliver Wolff2016-05-311-1/+1
| | | | | Change-Id: Id6b09a04925296ff8b21b9c784df722fae79e3cd Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: BTLE: Discover service detailsOliver Wolff2016-05-311-2/+237
| | | | | | | Task-number: QTBUG-37779 Change-Id: I5a4fb51b9c2402954ce4d370f003e8787561f5a7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* WinRT: BTLE: Discover list of available servicesOliver Wolff2016-05-311-1/+80
| | | | | | Task-number: QTBUG-37779 Change-Id: Ia92facf9f3f1c6aae8fac7a205d3f9ad4921787e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* winrt: BTLE: Device (dis-)connectionOliver Wolff2016-05-261-0/+257
Task-number: QTBUG-37779 Change-Id: I0f83e706a10d6c42543bd41aa012fde746f1a334 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>