QMqttAuthenticationProperties Class

The QMqttAuthenticationProperties class represents configuration options during the authentication process. 更多...

头: #include <QMqttAuthenticationProperties>
qmake: QT += mqtt
Since: Qt 5.12

该类在 Qt 5.12 引入。

公共函数

QByteArray authenticationData () const
QString authenticationMethod () const
QString reason () const
void setAuthenticationData (const QByteArray & adata )
void setAuthenticationMethod (const QString & method )
void setReason (const QString & r )
void setUserProperties (const QMqttUserProperties & user )
QMqttUserProperties userProperties () const

详细描述

注意: Authentication properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See QMqttClient::ProtocolVersion 了解更多信息。

成员函数文档编制

QByteArray QMqttAuthenticationProperties:: authenticationData () const

Returns the authentication data

另请参阅 setAuthenticationData ().

QString QMqttAuthenticationProperties:: authenticationMethod () const

Returns the authentication method.

另请参阅 setAuthenticationMethod ().

QString QMqttAuthenticationProperties:: reason () const

Returns the reason string. The reason string specifies the reason for a disconnect.

另请参阅 setReason ().

void QMqttAuthenticationProperties:: setAuthenticationData (const QByteArray & adata )

Sets the authentication data to adata .

Authentication data can only be used if an authentication method has been specified.

另请参阅 authenticationData () 和 authenticationMethod ().

void QMqttAuthenticationProperties:: setAuthenticationMethod (const QString & method )

Sets the authentication method to method .

另请参阅 authenticationMethod ().

void QMqttAuthenticationProperties:: setReason (const QString & r )

Sets the reason string to r .

另请参阅 reason ().

void QMqttAuthenticationProperties:: setUserProperties (const QMqttUserProperties & user )

Sets the user properties to user .

另请参阅 userProperties ().

QMqttUserProperties QMqttAuthenticationProperties:: userProperties () const

Returns the user properties.

另请参阅 setUserProperties ().