diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-10 15:41:13 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 15:14:51 +0000 |
commit | 149ca6289869a30cfd033160b5662d02671fe3e1 (patch) | |
tree | d554e96d7a3ecbaa60fd89f5cb350cad622d6951 | |
parent | d2dd87b0a69f0bcc23c4f7ebf9a1210731f3e2c3 (diff) |
Rename QtCoap::SecurityMode::NoSec -> QtCoap::SecurityMode::NoSecurity
This change is based on the feedback from API review.
Change-Id: I345bc519d6753608ead0bf4b006cf68c4e52c313
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | examples/coap/quickmulticastclient/qmlcoapmulticastclient.cpp | 2 | ||||
-rw-r--r-- | examples/coap/quicksecureclient/qmlcoapsecureclient.cpp | 2 | ||||
-rw-r--r-- | examples/coap/simplecoapclient/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/coap/qcoapclient.cpp | 4 | ||||
-rw-r--r-- | src/coap/qcoapclient.h | 2 | ||||
-rw-r--r-- | src/coap/qcoapconnection.cpp | 6 | ||||
-rw-r--r-- | src/coap/qcoapconnection_p.h | 4 | ||||
-rw-r--r-- | src/coap/qcoapnamespace.cpp | 2 | ||||
-rw-r--r-- | src/coap/qcoapnamespace.h | 2 | ||||
-rw-r--r-- | src/coap/qcoapqudpconnection.cpp | 8 | ||||
-rw-r--r-- | src/coap/qcoapqudpconnection_p.h | 4 | ||||
-rw-r--r-- | tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp | 2 |
12 files changed, 20 insertions, 20 deletions
diff --git a/examples/coap/quickmulticastclient/qmlcoapmulticastclient.cpp b/examples/coap/quickmulticastclient/qmlcoapmulticastclient.cpp index 4c3592b..196dfe5 100644 --- a/examples/coap/quickmulticastclient/qmlcoapmulticastclient.cpp +++ b/examples/coap/quickmulticastclient/qmlcoapmulticastclient.cpp @@ -56,7 +56,7 @@ Q_LOGGING_CATEGORY(lcCoapClient, "qt.coap.client") QmlCoapMulticastClient::QmlCoapMulticastClient(QObject *parent) - : QCoapClient(QtCoap::SecurityMode::NoSec, parent) + : QCoapClient(QtCoap::SecurityMode::NoSecurity, parent) { connect(this, &QCoapClient::finished, this, [this](QCoapReply *reply) { diff --git a/examples/coap/quicksecureclient/qmlcoapsecureclient.cpp b/examples/coap/quicksecureclient/qmlcoapsecureclient.cpp index 608ed0c..1d141bb 100644 --- a/examples/coap/quicksecureclient/qmlcoapsecureclient.cpp +++ b/examples/coap/quicksecureclient/qmlcoapsecureclient.cpp @@ -61,7 +61,7 @@ Q_LOGGING_CATEGORY(lcCoapClient, "qt.coap.client") QmlCoapSecureClient::QmlCoapSecureClient(QObject *parent) : QObject(parent) , m_coapClient(nullptr) - , m_securityMode(QtCoap::SecurityMode::NoSec) + , m_securityMode(QtCoap::SecurityMode::NoSecurity) { } diff --git a/examples/coap/simplecoapclient/mainwindow.cpp b/examples/coap/simplecoapclient/mainwindow.cpp index e5cda55..bff0dbc 100644 --- a/examples/coap/simplecoapclient/mainwindow.cpp +++ b/examples/coap/simplecoapclient/mainwindow.cpp @@ -65,7 +65,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { - m_client = new QCoapClient(QtCoap::SecurityMode::NoSec, this); + m_client = new QCoapClient(QtCoap::SecurityMode::NoSecurity, this); connect(m_client, &QCoapClient::finished, this, &MainWindow::onFinished); connect(m_client, &QCoapClient::error, this, &MainWindow::onError); diff --git a/src/coap/qcoapclient.cpp b/src/coap/qcoapclient.cpp index b11a5b2..c86096c 100644 --- a/src/coap/qcoapclient.cpp +++ b/src/coap/qcoapclient.cpp @@ -152,7 +152,7 @@ QCoapClientPrivate::~QCoapClientPrivate() Constructs a QCoapClient object for the given \a securityMode and sets \a parent as the parent object. - The default for \a securityMode is SecurityMode::NoSec, which + The default for \a securityMode is QtCoap::NoSecurity, which disables security. This connects using a QCoapQUdpConnection; to use a custom transport, @@ -585,7 +585,7 @@ bool QCoapClientPrivate::send(QCoapReply *reply) /*! Sets the security configuration parameters from \a configuration. - Configuration will be ignored if the QtCoap::NoSec mode is used. + Configuration will be ignored if the QtCoap::NoSecurity mode is used. \note This method must be called before the handshake starts. */ diff --git a/src/coap/qcoapclient.h b/src/coap/qcoapclient.h index 06290ce..0703ab1 100644 --- a/src/coap/qcoapclient.h +++ b/src/coap/qcoapclient.h @@ -53,7 +53,7 @@ class Q_COAP_EXPORT QCoapClient : public QObject { Q_OBJECT public: - explicit QCoapClient(QtCoap::SecurityMode securityMode = QtCoap::SecurityMode::NoSec, + explicit QCoapClient(QtCoap::SecurityMode securityMode = QtCoap::SecurityMode::NoSecurity, QObject *parent = nullptr); explicit QCoapClient(QCoapConnection *connection, QObject *parent = nullptr); ~QCoapClient(); diff --git a/src/coap/qcoapconnection.cpp b/src/coap/qcoapconnection.cpp index e104fee..23cb0d9 100644 --- a/src/coap/qcoapconnection.cpp +++ b/src/coap/qcoapconnection.cpp @@ -207,7 +207,7 @@ QCoapConnectionPrivate::sendRequest(const QByteArray &request, const QString &ho bool QCoapConnection::isSecure() const { Q_D(const QCoapConnection); - return d->securityMode != QtCoap::SecurityMode::NoSec; + return d->securityMode != QtCoap::SecurityMode::NoSecurity; } /*! @@ -249,8 +249,8 @@ void QCoapConnection::startToSendRequest() /*! Sets the security configuration parameters from the \a configuration. - The security configuration will be ignored if the QtCoap::NoSec mode is used - for connection. + The security configuration will be ignored if the QtCoap::NoSecurity mode is + used for connection. \note This method must be called before the handshake starts. */ diff --git a/src/coap/qcoapconnection_p.h b/src/coap/qcoapconnection_p.h index 07abe4a..200744d 100644 --- a/src/coap/qcoapconnection_p.h +++ b/src/coap/qcoapconnection_p.h @@ -61,7 +61,7 @@ public: Bound }; - explicit QCoapConnection(QtCoap::SecurityMode securityMode = QtCoap::SecurityMode::NoSec, + explicit QCoapConnection(QtCoap::SecurityMode securityMode = QtCoap::SecurityMode::NoSecurity, QObject *parent = nullptr); virtual ~QCoapConnection(); @@ -107,7 +107,7 @@ struct CoapFrame { class Q_AUTOTEST_EXPORT QCoapConnectionPrivate : public QObjectPrivate { public: - QCoapConnectionPrivate(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSec); + QCoapConnectionPrivate(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSecurity); ~QCoapConnectionPrivate() override = default; diff --git a/src/coap/qcoapnamespace.cpp b/src/coap/qcoapnamespace.cpp index b1e5fc4..a20a152 100644 --- a/src/coap/qcoapnamespace.cpp +++ b/src/coap/qcoapnamespace.cpp @@ -238,7 +238,7 @@ QT_BEGIN_NAMESPACE Specifies the security mode used for securing a CoAP connection, as defined in \l{https://tools.ietf.org/html/rfc7252#section-9}{RFC 7252}. - \value NoSec There is no protocol-level security (DTLS is disabled). + \value NoSecurity There is no protocol-level security (DTLS is disabled). \value PreSharedKey DTLS is enabled. PSK authentication will be used for security. diff --git a/src/coap/qcoapnamespace.h b/src/coap/qcoapnamespace.h index 353a046..1a64311 100644 --- a/src/coap/qcoapnamespace.h +++ b/src/coap/qcoapnamespace.h @@ -104,7 +104,7 @@ namespace QtCoap Q_ENUM_NS(Port) enum class SecurityMode : quint8 { - NoSec = 0, + NoSecurity = 0, PreSharedKey, RawPublicKey, Certificate diff --git a/src/coap/qcoapqudpconnection.cpp b/src/coap/qcoapqudpconnection.cpp index 08d96d1..4ca78dd 100644 --- a/src/coap/qcoapqudpconnection.cpp +++ b/src/coap/qcoapqudpconnection.cpp @@ -70,7 +70,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcCoapConnection) sets \a parent as the parent object. \note Since QtCoap::RawPublicKey is not supported yet, the connection - will fall back to the QtCoap::NoSec in the QtCoap::RawPublicKey mode. + will fall back to the QtCoap::NoSecurity in the QtCoap::RawPublicKey mode. That is, the connection won't be secure in this mode. */ QCoapQUdpConnection::QCoapQUdpConnection(QtCoap::SecurityMode securityMode, QObject *parent) : @@ -106,7 +106,7 @@ QCoapQUdpConnection::QCoapQUdpConnection(QCoapQUdpConnectionPrivate &dd, QObject case QtCoap::SecurityMode::RawPublicKey: qCWarning(lcCoapConnection, "RawPublicKey security is not supported yet," "disabling security"); - d->securityMode = QtCoap::SecurityMode::NoSec; + d->securityMode = QtCoap::SecurityMode::NoSecurity; break; case QtCoap::SecurityMode::PreSharedKey: d->dtls = new QDtls(QSslSocket::SslClientMode, this); @@ -127,8 +127,8 @@ QCoapQUdpConnection::QCoapQUdpConnection(QCoapQUdpConnectionPrivate &dd, QObject break; } #else - qCWarning(lcCoapConnection, "DTLS is disabled, falling back to QtCoap::NoSec mode."); - d->securityMode = QtCoap::SecurityMode::NoSec; + qCWarning(lcCoapConnection, "DTLS is disabled, falling back to QtCoap::NoSecurity mode."); + d->securityMode = QtCoap::SecurityMode::NoSecurity; #endif } } diff --git a/src/coap/qcoapqudpconnection_p.h b/src/coap/qcoapqudpconnection_p.h index 1ac1603..ba953e4 100644 --- a/src/coap/qcoapqudpconnection_p.h +++ b/src/coap/qcoapqudpconnection_p.h @@ -58,7 +58,7 @@ class Q_AUTOTEST_EXPORT QCoapQUdpConnection : public QCoapConnection Q_OBJECT public: - explicit QCoapQUdpConnection(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSec, + explicit QCoapQUdpConnection(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSecurity, QObject *parent = nullptr); ~QCoapQUdpConnection() override = default; @@ -89,7 +89,7 @@ protected: class Q_AUTOTEST_EXPORT QCoapQUdpConnectionPrivate : public QCoapConnectionPrivate { public: - QCoapQUdpConnectionPrivate(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSec); + QCoapQUdpConnectionPrivate(QtCoap::SecurityMode security = QtCoap::SecurityMode::NoSecurity); ~QCoapQUdpConnectionPrivate() override; virtual bool bind(); diff --git a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp index daed5fb..947cb5d 100644 --- a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp +++ b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp @@ -69,7 +69,7 @@ class QCoapQUdpConnectionForTest : public QCoapQUdpConnection Q_OBJECT public: QCoapQUdpConnectionForTest(QObject *parent = nullptr) : - QCoapQUdpConnection(QtCoap::SecurityMode::NoSec, parent) + QCoapQUdpConnection(QtCoap::SecurityMode::NoSecurity, parent) {} void bindSocketForTest() { d_func()->bindSocket(); } |