aboutsummaryrefslogtreecommitdiffstats
path: root/src/coap/qcoapprotocol.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-03-07 16:38:10 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2019-03-20 08:18:59 +0000
commit0868e398fe7e2d03bd854e9f0e4e9328942af3c3 (patch)
treebb8d395f3a6b9febfdd46f684a9e60e746b6ee54 /src/coap/qcoapprotocol.cpp
parentdb37d03101ba46f2180e7b27ed4e3a44f23cb0fb (diff)
Hide the API for sending byte array requests
Users should not be able to send "manually" constructed requests with raw byte array data. Only QCoapProtocol knows how to correctly construct/send coap messages and make the proper signal/slot connections. Change-Id: I8fd64638ea7f8e7b20671b80e6db4e1a7758c4fa Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/coap/qcoapprotocol.cpp')
-rw-r--r--src/coap/qcoapprotocol.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coap/qcoapprotocol.cpp b/src/coap/qcoapprotocol.cpp
index 90bcee5..971c70b 100644
--- a/src/coap/qcoapprotocol.cpp
+++ b/src/coap/qcoapprotocol.cpp
@@ -32,6 +32,7 @@
#include "qcoapinternalrequest_p.h"
#include "qcoapinternalreply_p.h"
#include "qcoapconnection.h"
+#include "qcoapconnection_p.h"
#include <QtCore/qrandom.h>
#include <QtCore/qthread.h>
@@ -210,7 +211,8 @@ void QCoapProtocolPrivate::sendRequest(QCoapInternalRequest *request, const QStr
QByteArray requestFrame = request->toQByteArray();
QUrl uri = request->targetUri();
const auto& hostAddress = host.isEmpty() ? uri.host() : host;
- request->connection()->sendRequest(requestFrame, hostAddress, static_cast<quint16>(uri.port()));
+ request->connection()->d_func()->sendRequest(requestFrame, hostAddress,
+ static_cast<quint16>(uri.port()));
}
/*!