1 | // Copyright (C) 2018 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QMQTTTYPE_H |
5 | #define QMQTTTYPE_H |
6 | |
7 | #include <QtMqtt/qmqttglobal.h> |
8 | |
9 | #include <QtCore/QDebug> |
10 | #include <QtCore/QList> |
11 | #include <QtCore/QPair> |
12 | #include <QtCore/QSharedDataPointer> |
13 | #include <QtCore/QString> |
14 | |
15 | QT_BEGIN_NAMESPACE |
16 | |
17 | class QMqttStringPairData; |
18 | class Q_MQTT_EXPORT QMqttStringPair |
19 | { |
20 | public: |
21 | QMqttStringPair(); |
22 | QMqttStringPair(const QString &name, const QString &value); |
23 | QMqttStringPair(const QMqttStringPair &); |
24 | ~QMqttStringPair(); |
25 | |
26 | QString name() const; |
27 | void setName(const QString &n); |
28 | |
29 | QString value() const; |
30 | void setValue(const QString &v); |
31 | |
32 | bool operator==(const QMqttStringPair &other) const; |
33 | bool operator!=(const QMqttStringPair &other) const; |
34 | QMqttStringPair &operator=(const QMqttStringPair &); |
35 | private: |
36 | QSharedDataPointer<QMqttStringPairData> data; |
37 | }; |
38 | |
39 | #ifndef QT_NO_DEBUG_STREAM |
40 | Q_MQTT_EXPORT QDebug operator<<(QDebug d, const QMqttStringPair &s); |
41 | #endif |
42 | |
43 | class Q_MQTT_EXPORT QMqttUserProperties : public QList<QMqttStringPair> |
44 | { |
45 | public: |
46 | }; |
47 | |
48 | QT_END_NAMESPACE |
49 | |
50 | #endif // QMQTTTYPE_H |
51 | |