summaryrefslogtreecommitdiffstats
path: root/src/mqtt/qmqttconnectionproperties_p.h
blob: ad901524fa0361a6097abbfcb5c77d6b79c404ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
// Qt-Security score:significant reason:default

#ifndef QMQTTCONNECTIONPROPERTIES_P_H
#define QMQTTCONNECTIONPROPERTIES_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qmqttconnectionproperties.h"
#include "private/qglobal_p.h"

#include <QtCore/QLoggingCategory>

QT_BEGIN_NAMESPACE

Q_DECLARE_LOGGING_CATEGORY(lcMqttConnection)

class QMqttLastWillPropertiesData : public QSharedData
{
public:
    QString contentType;
    QString responseTopic;
    QByteArray correlationData;
    QMqttUserProperties userProperties;
    quint32 willDelayInterval{0};
    quint32 messageExpiryInterval{0};
    QMqtt::PayloadFormatIndicator formatIndicator{QMqtt::PayloadFormatIndicator::Unspecified};
};

class QMqttConnectionPropertiesData : public QSharedData
{
public:
    QMqttUserProperties userProperties;
    QString authenticationMethod;
    QByteArray authenticationData;
    quint32 sessionExpiryInterval{0};
    quint32 maximumPacketSize{std::numeric_limits<quint32>::max()};
    quint16 maximumReceive{65535};
    quint16 maximumTopicAlias{0};
    bool requestResponseInformation{false};
    bool requestProblemInformation{true};
};

class QMqttServerConnectionPropertiesData : public QSharedData
{
public:
    QMqttServerConnectionProperties::ServerPropertyDetails details{QMqttServerConnectionProperties::None};
    QString reasonString;
    QString responseInformation;
    QString serverReference;
    quint16 serverKeepAlive{0};
    quint8 maximumQoS{2};
    QMqtt::ReasonCode reasonCode{QMqtt::ReasonCode::Success};
    bool valid{false}; // Only set to true after CONNACK
    bool retainAvailable{true};
    bool wildcardSupported{true};
    bool subscriptionIdentifierSupported{true};
    bool sharedSubscriptionSupported{true};
};

QT_END_NAMESPACE

#endif // QMQTTCONNECTIONPROPERTIES_P_H