summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_bluez.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-10-29 16:22:43 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-11-23 13:11:18 +0000
commita73904741a9bd7f6d7268ba7342aa246b42552e4 (patch)
tree8d5340ce869141aababca8e9c6d5a7a4e5ce29e1 /src/bluetooth/qlowenergycontroller_bluez.cpp
parenta80794deb97e8429f20bec602e55fd5b975bb50d (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>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_bluez.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_bluez.cpp12
1 files changed, 6 insertions, 6 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;
}