| 1 | // Copyright (C) 2018 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | // Qt-Security score:significant reason:default |
| 4 | |
| 5 | #ifndef QMQTTCONNECTIONPROPERTIES_P_H |
| 6 | #define QMQTTCONNECTIONPROPERTIES_P_H |
| 7 | |
| 8 | // |
| 9 | // W A R N I N G |
| 10 | // ------------- |
| 11 | // |
| 12 | // This file is not part of the Qt API. It exists purely as an |
| 13 | // implementation detail. This header file may change from version to |
| 14 | // version without notice, or even be removed. |
| 15 | // |
| 16 | // We mean it. |
| 17 | // |
| 18 | |
| 19 | #include "qmqttconnectionproperties.h" |
| 20 | #include "private/qglobal_p.h" |
| 21 | |
| 22 | #include <QtCore/QLoggingCategory> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | Q_DECLARE_LOGGING_CATEGORY(lcMqttConnection) |
| 27 | |
| 28 | class QMqttLastWillPropertiesData : public QSharedData |
| 29 | { |
| 30 | public: |
| 31 | QString contentType; |
| 32 | QString responseTopic; |
| 33 | QByteArray correlationData; |
| 34 | QMqttUserProperties userProperties; |
| 35 | quint32 willDelayInterval{0}; |
| 36 | quint32 messageExpiryInterval{0}; |
| 37 | QMqtt::PayloadFormatIndicator formatIndicator{QMqtt::PayloadFormatIndicator::Unspecified}; |
| 38 | }; |
| 39 | |
| 40 | class QMqttConnectionPropertiesData : public QSharedData |
| 41 | { |
| 42 | public: |
| 43 | QMqttUserProperties userProperties; |
| 44 | QString authenticationMethod; |
| 45 | QByteArray authenticationData; |
| 46 | quint32 sessionExpiryInterval{0}; |
| 47 | quint32 maximumPacketSize{std::numeric_limits<quint32>::max()}; |
| 48 | quint16 maximumReceive{65535}; |
| 49 | quint16 maximumTopicAlias{0}; |
| 50 | bool requestResponseInformation{false}; |
| 51 | bool requestProblemInformation{true}; |
| 52 | }; |
| 53 | |
| 54 | class QMqttServerConnectionPropertiesData : public QSharedData |
| 55 | { |
| 56 | public: |
| 57 | QMqttServerConnectionProperties::ServerPropertyDetails details{QMqttServerConnectionProperties::None}; |
| 58 | QString reasonString; |
| 59 | QString responseInformation; |
| 60 | QString serverReference; |
| 61 | quint16 serverKeepAlive{0}; |
| 62 | quint8 maximumQoS{2}; |
| 63 | QMqtt::ReasonCode reasonCode{QMqtt::ReasonCode::Success}; |
| 64 | bool valid{false}; // Only set to true after CONNACK |
| 65 | bool retainAvailable{true}; |
| 66 | bool wildcardSupported{true}; |
| 67 | bool subscriptionIdentifierSupported{true}; |
| 68 | bool sharedSubscriptionSupported{true}; |
| 69 | }; |
| 70 | |
| 71 | QT_END_NAMESPACE |
| 72 | |
| 73 | #endif // QMQTTCONNECTIONPROPERTIES_P_H |
| 74 |
