QMqttMessageStatusProperties Class

QMqttMessageStatusProperties クラスは、メッセージ配信中にサーバーから提供される追加情報を表します。詳細...

ヘッダ #include <QMqttMessageStatusProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

パブリック関数

QString reason() const
QMqtt::ReasonCode reasonCode() const
QMqttUserProperties userProperties() const

詳細説明

QMqttClient::publish() によって送信されるメッセージのQoSレベルに応じて、サーバーは配送の状態を報告する。QMqtt::MessageStatus に加えて、補完的な情報がサーバによって含まれるかもしれない。これらの情報は、QMqttMessageStatusProperties を介してユーザに公開されます。

注: メッセージ・ステータス・プロパティはMQTT 5.0仕様の一部であり、より低いプロトコル・レベルで接続する場合は使用できません。詳細はQMqttClient::ProtocolVersion を参照。

メンバー関数ドキュメント

QString QMqttMessageStatusProperties::reason() const

メッセージの配送に失敗した際の理由文字列を返します。

QMqtt::ReasonCode QMqttMessageStatusProperties::reasonCode() const

メッセージの配送に失敗した場合の理由コードを返します。

QMqttUserProperties QMqttMessageStatusProperties::userProperties() const

メッセージとともに指定されたプロパティを返します。

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