1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QMQTTSUBSCRIPTIONPROPERTIES_H
5#define QMQTTSUBSCRIPTIONPROPERTIES_H
6
7#include <QtMqtt/qmqttglobal.h>
8#include <QtMqtt/qmqtttype.h>
9
10#include <QtCore/QHash>
11#include <QtCore/QObject>
12#include <QtCore/QSharedDataPointer>
13#include <QtCore/QString>
14
15QT_BEGIN_NAMESPACE
16
17class QMqttSubscriptionPropertiesData;
18class QMqttUnsubscriptionPropertiesData;
19
20class Q_MQTT_EXPORT QMqttSubscriptionProperties
21{
22public:
23 QMqttSubscriptionProperties();
24 QMqttSubscriptionProperties(const QMqttSubscriptionProperties &);
25 QMqttSubscriptionProperties &operator=(const QMqttSubscriptionProperties &);
26 ~QMqttSubscriptionProperties();
27
28 QMqttUserProperties userProperties() const;
29 void setUserProperties(const QMqttUserProperties &user);
30
31 quint32 subscriptionIdentifier() const;
32 void setSubscriptionIdentifier(quint32 id);
33
34 bool noLocal() const;
35 void setNoLocal(bool noloc);
36private:
37 QSharedDataPointer<QMqttSubscriptionPropertiesData> data;
38};
39
40class Q_MQTT_EXPORT QMqttUnsubscriptionProperties
41{
42public:
43 QMqttUnsubscriptionProperties();
44 QMqttUnsubscriptionProperties(const QMqttUnsubscriptionProperties &);
45 QMqttUnsubscriptionProperties &operator=(const QMqttUnsubscriptionProperties &rhs);
46 ~QMqttUnsubscriptionProperties();
47
48 QMqttUserProperties userProperties() const;
49 void setUserProperties(const QMqttUserProperties &user);
50
51private:
52 QSharedDataPointer<QMqttUnsubscriptionPropertiesData> data;
53};
54
55QT_END_NAMESPACE
56
57#endif // QMQTTSUBSCRIPTIONPROPERTIES_H
58

source code of qtmqtt/src/mqtt/qmqttsubscriptionproperties.h