Sur cette page

QMqttAuthenticationProperties Class

La classe `QMqttAuthenticationProperties` représente les options de configuration utilisées lors du processus d'authentification. En savoir plus...

En-tête : #include <QMqttAuthenticationProperties>
CMake : find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake : QT += mqtt

Fonctions publiques

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

Description détaillée

Remarque : les propriétésd’authentification font partie de la spécification MQTT 5.0 et ne peuvent pas être utilisées lors d’une connexion avec un niveau de protocole inférieur. Voir QMqttClient::ProtocolVersion pour plus d’informations.

Documentation des fonctions membres

QByteArray QMqttAuthenticationProperties::authenticationData() const

Renvoie les données d'authentification

Voir aussi setAuthenticationData().

QString QMqttAuthenticationProperties::authenticationMethod() const

Renvoie la méthode d'authentification.

Voir également setAuthenticationMethod().

QString QMqttAuthenticationProperties::reason() const

Renvoie la chaîne de motif. Cette chaîne indique la raison de la déconnexion.

Voir également setReason().

void QMqttAuthenticationProperties::setAuthenticationData(const QByteArray &adata)

Définit les données d'authentification sur adata.

Les données d'authentification ne peuvent être utilisées que si une méthode d'authentification a été spécifiée.

Voir également authenticationData() et authenticationMethod().

void QMqttAuthenticationProperties::setAuthenticationMethod(const QString &method)

Définit la méthode d'authentification sur « method ».

Voir également authenticationMethod().

void QMqttAuthenticationProperties::setReason(const QString &r)

Définit la chaîne de motif sur « r ».

Voir également reason().

void QMqttAuthenticationProperties::setUserProperties(const QMqttUserProperties &user)

Définit les propriétés utilisateur sur user.

Voir également userProperties().

QMqttUserProperties QMqttAuthenticationProperties::userProperties() const

Renvoie les propriétés de l'utilisateur.

Voir aussi setUserProperties().

© 2026 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.