QMqttLastWillProperties Class
The QMqttLastWillProperties class represents configuration options a QMqttClient can pass to the server when specifying the last will during connecting to a server. More...
Header: | #include <QMqttLastWillProperties> |
qmake: | QT += mqtt |
Since: | Qt 5.12 |
This class was introduced in Qt 5.12.
Public Functions
QString | contentType() const |
QByteArray | correlationData() const |
quint32 | messageExpiryInterval() const |
QMqtt::PayloadFormatIndicator | payloadFormatIndicator() const |
QString | responseTopic() const |
void | setContentType(const QString &content) |
void | setCorrelationData(const QByteArray &correlation) |
void | setMessageExpiryInterval(quint32 expiry) |
void | setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p) |
void | setResponseTopic(const QString &response) |
void | setUserProperties(const QMqttUserProperties &properties) |
void | setWillDelayInterval(quint32 delay) |
QMqttUserProperties | userProperties() const |
quint32 | willDelayInterval() const |
Detailed Description
Note: Last Will properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See QMqttClient::ProtocolVersion for more information.
Member Function Documentation
QString QMqttLastWillProperties::contentType() const
Returns the content type of the last will message.
See also setContentType().
QByteArray QMqttLastWillProperties::correlationData() const
Returns the correlation data to identify the request.
See also setCorrelationData().
quint32 QMqttLastWillProperties::messageExpiryInterval() const
Returns the lifetime of the last will message in seconds, starting from the will delay interval.
See also setMessageExpiryInterval().
QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const
Returns the payload format indicator.
See also setPayloadFormatIndicator().
QString QMqttLastWillProperties::responseTopic() const
Returns the topic that subscribers to the last will message should respond to.
See also setResponseTopic().
void QMqttLastWillProperties::setContentType(const QString &content)
Sets the content type to content.
See also contentType().
void QMqttLastWillProperties::setCorrelationData(const QByteArray &correlation)
Sets the correlation data to correlation.
See also correlationData().
void QMqttLastWillProperties::setMessageExpiryInterval(quint32 expiry)
Sets the message expiry interval to expiry.
See also messageExpiryInterval().
void QMqttLastWillProperties::setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)
Sets the payload format indicator to p.
See also payloadFormatIndicator().
void QMqttLastWillProperties::setResponseTopic(const QString &response)
Sets the response topic to response.
See also responseTopic().
void QMqttLastWillProperties::setUserProperties(const QMqttUserProperties &properties)
Sets the user properties to properties.
See also userProperties().
void QMqttLastWillProperties::setWillDelayInterval(quint32 delay)
Sets the will delay interval to delay.
See also willDelayInterval().
QMqttUserProperties QMqttLastWillProperties::userProperties() const
Returns the user properties.
See also setUserProperties().
quint32 QMqttLastWillProperties::willDelayInterval() const
Returns the delay in seconds a last will message will be sent after disconnecting from the server.
See also setWillDelayInterval().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.