The QMqttLastWillProperties class represents configuration options a QMqttClient can pass to the server when specifying the last will during connecting to a server. 更多...
| 頭: | #include <QMqttLastWillProperties> |
| qmake: | QT += mqtt |
| Since: | Qt 5.12 |
該類在 Qt 5.12 引入。
| 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 |
注意: 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 瞭解更多信息。
Returns the content type of the last will message.
另請參閱 setContentType ().
Returns the correlation data to identify the request.
另請參閱 setCorrelationData ().
Returns the lifetime of the last will message in seconds, starting from the will delay interval.
另請參閱 setMessageExpiryInterval ().
Returns the payload format indicator.
另請參閱 setPayloadFormatIndicator ().
Returns the topic that subscribers to the last will message should respond to.
另請參閱 setResponseTopic ().
Sets the content type to content .
另請參閱 contentType ().
Sets the correlation data to correlation .
另請參閱 correlationData ().
Sets the message expiry interval to expiry .
另請參閱 messageExpiryInterval ().
Sets the payload format indicator to p .
另請參閱 payloadFormatIndicator ().
Sets the response topic to response .
另請參閱 responseTopic ().
Sets the user properties to properties .
另請參閱 userProperties ().
Sets the will delay interval to delay .
另請參閱 willDelayInterval ().
Returns the user properties.
另請參閱 setUserProperties ().
Returns the delay in seconds a last will message will be sent after disconnecting from the server.
另請參閱 setWillDelayInterval ().