diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-29 16:22:43 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-11-23 13:11:18 +0000 |
commit | a73904741a9bd7f6d7268ba7342aa246b42552e4 (patch) | |
tree | 8d5340ce869141aababca8e9c6d5a7a4e5ce29e1 | |
parent | a80794deb97e8429f20bec602e55fd5b975bb50d (diff) |
QLowEnergyController: Rename "sendCommand" function.
With the upcoming implementation of GATT server functionality,
the name will not fit anymore.
Change-Id: I1a4f3bd5a21c7b13429d120d12831ff3f80d7f7f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 12 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_p.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index 5d479989..f0504352 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -482,7 +482,7 @@ void QLowEnergyControllerPrivate::l2cpReadyRead() //send confirmation QByteArray packet; packet.append(static_cast<char>(ATT_OP_HANDLE_VAL_CONFIRMATION)); - sendCommand(packet); + sendPacket(packet); processUnsolicitedReply(incomingPacket); return; @@ -503,7 +503,7 @@ void QLowEnergyControllerPrivate::l2cpReadyRead() bt_put_unaligned(htobs(0), (quint16 *)(packet.data() + 2)); packet[4] = ATT_ERROR_REQUEST_NOT_SUPPORTED; - sendCommand(packet); + sendPacket(packet); return; } @@ -578,12 +578,12 @@ void QLowEnergyControllerPrivate::encryptionChangedEvent( sendNextPendingRequest(); } -void QLowEnergyControllerPrivate::sendCommand(const QByteArray &packet) +void QLowEnergyControllerPrivate::sendPacket(const QByteArray &packet) { qint64 result = l2cpSocket->write(packet.constData(), packet.size()); if (result == -1) { - qCDebug(QT_BT_BLUEZ) << "Cannot write L2CP command:" << hex + qCDebug(QT_BT_BLUEZ) << "Cannot write L2CP packet:" << hex << packet.toHex() << l2cpSocket->errorString(); setError(QLowEnergyController::NetworkError); @@ -600,7 +600,7 @@ void QLowEnergyControllerPrivate::sendNextPendingRequest() // << request.payload.toHex(); requestPending = true; - sendCommand(request.payload); + sendPacket(request.payload); } QLowEnergyHandle parseReadByTypeCharDiscovery( @@ -1713,7 +1713,7 @@ void QLowEnergyControllerPrivate::writeCharacteristic( // It can be send at any time and does not produce responses. // Therefore we will not put them into the openRequest queue at all. if (!writeWithResponse) { - sendCommand(data); + sendPacket(data); return; } diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h index 912e7906..bcff30b8 100644 --- a/src/bluetooth/qlowenergycontroller_p.h +++ b/src/bluetooth/qlowenergycontroller_p.h @@ -208,7 +208,7 @@ private: void handleConnectionRequest(); void closeServerSocket(); - void sendCommand(const QByteArray &packet); + void sendPacket(const QByteArray &packet); void sendNextPendingRequest(); void processReply(const Request &request, const QByteArray &reply); |