QMqttSubscriptionProperties Class

The QMqttSubscriptionProperties class represents configuration options a QMqttClient can pass to the server when subscribing to a topic filter. 更多...

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

该类在 Qt 5.12 引入。

公共函数

void setSubscriptionIdentifier (quint32 id )
void setUserProperties (const QMqttUserProperties & user )
quint32 subscriptionIdentifier () const
QMqttUserProperties userProperties () const

详细描述

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

成员函数文档编制

void QMqttSubscriptionProperties:: setSubscriptionIdentifier ( quint32 id )

Sets the subscription identifier to id .

另请参阅 subscriptionIdentifier ().

void QMqttSubscriptionProperties:: setUserProperties (const QMqttUserProperties & user )

Sets the user properties to user .

另请参阅 userProperties ().

quint32 QMqttSubscriptionProperties:: subscriptionIdentifier () const

Returns the subscription identifier used to describe this subscription.

另请参阅 setSubscriptionIdentifier ().

QMqttUserProperties QMqttSubscriptionProperties:: userProperties () const

Returns the user specified properties.

另请参阅 setUserProperties ().