diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-15 12:00:13 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-11-19 06:52:35 +0000 |
commit | 57353d3f91f89e6e364b9798277048e25b9c63b8 (patch) | |
tree | f8bd609be5ade91e7b09dfb8f1d48578e51021e7 /src/bluetooth/qlowenergycontroller.cpp | |
parent | a8d80a81d56f0fb85c41bf6ec5716c5ce7e5dac0 (diff) |
QLowEnergyController: Listen for and accept GATT connection requests.
BlueZ only. No requests are handled yet.
Change-Id: I25058989beb5b3ae02a4f43eeaec09c8225198dc
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycontroller.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bluetooth/qlowenergycontroller.cpp b/src/bluetooth/qlowenergycontroller.cpp index 9a9327a5..f8832f1a 100644 --- a/src/bluetooth/qlowenergycontroller.cpp +++ b/src/bluetooth/qlowenergycontroller.cpp @@ -306,6 +306,10 @@ void QLowEnergyControllerPrivate::setState( return; state = newState; + if (state == QLowEnergyController::UnconnectedState + && role == QLowEnergyController::PeripheralRole) { + remoteDevice.clear(); + } emit q->stateChanged(state); } @@ -769,10 +773,8 @@ QLowEnergyService *QLowEnergyController::createServiceObject( /*! Starts advertising the data given in \a advertisingData and \a scanResponseData, using the parameters set in \a parameters. The controller has to be in the \l PeripheralRole. - \omit - If \a parameters indicates that the advertisement should be connectable, then this call + If \a parameters indicates that the advertisement should be connectable, then this function also starts listening for incoming client connections. - \endomit Providing \a scanResponseData is not required, as it is not applicable for certain configurations of \c parameters. |