QXmppPubSubMetadata Class
The QXmppPubSubMetadata class represents the metadata of a PubSub node as defined by XEP-0060: Publish-Subscribe. More...
| Header: | #include <QXmppPubSubMetadata.h> |
| Since: | QXmpp 1.5 |
| Inherits: | QXmppExtensibleDataFormBase |
- List of all members, including inherited members
- QXmppPubSubMetadata is part of Stanzas.
Public Types
Public Functions
| QXmppPubSubMetadata() | |
| QXmppPubSubMetadata(const QXmppPubSubMetadata &) | |
| QXmppPubSubMetadata(QXmppPubSubMetadata &&) | |
| std::optional<QXmppPubSubNodeConfig::AccessModel> | accessModel() const |
| QStringList | contactJids() const |
| QDateTime | creationDate() const |
| QString | creatorJid() const |
| QString | description() const |
| QString | language() const |
| QXmppPubSubMetadata::ItemLimit | maxItems() const |
| std::optional<quint64> | numberOfSubscribers() const |
| QStringList | ownerJids() const |
| std::optional<QXmppPubSubNodeConfig::PublishModel> | publishModel() const |
| QStringList | publisherJids() const |
| void | setAccessModel(std::optional<QXmppPubSubNodeConfig::AccessModel> accessModel) |
| void | setContactJids(const QStringList &contactJids) |
| void | setCreationDate(const QDateTime &creationDate) |
| void | setCreatorJid(const QString &creatorJid) |
| void | setDescription(const QString &description) |
| void | setLanguage(const QString &language) |
| void | setMaxItems(QXmppPubSubMetadata::ItemLimit maxItems) |
| void | setNumberOfSubscribers(const std::optional<quint64> &numberOfSubscribers) |
| void | setOwnerJids(const QStringList &ownerJids) |
| void | setPublishModel(std::optional<QXmppPubSubNodeConfig::PublishModel> publishModel) |
| void | setPublisherJids(const QStringList &publisherJids) |
| void | setTitle(const QString &title) |
| void | setType(const QString &type) |
| QString | title() const |
| QString | type() const |
| QXmppPubSubMetadata & | operator=(QXmppPubSubMetadata &&) |
| QXmppPubSubMetadata & | operator=(const QXmppPubSubMetadata &) |
Detailed Description
Node metadata is provided by the service as a data form in the service discovery information of a node.
All fields are optional: std::nullopt, invalid dates, empty strings and empty lists mean that a field is not set and it is not included in the serialized form.
See also QXmppPubSubNodeConfig.
Member Type Documentation
[alias] QXmppPubSubMetadata::ItemLimit
Maximum number of items of a node: either a number, Max for the maximum supported by the service or Unset if no limit has been set.
Member Function Documentation
QXmppPubSubMetadata::QXmppPubSubMetadata()
Constructs empty node metadata.
QXmppPubSubMetadata::QXmppPubSubMetadata(const QXmppPubSubMetadata &)
Default copy-constructor
QXmppPubSubMetadata::QXmppPubSubMetadata(QXmppPubSubMetadata &&)
Default move-constructor
std::optional<QXmppPubSubNodeConfig::AccessModel> QXmppPubSubMetadata::accessModel() const
Returns the access model of the node.
The access model defines who may subscribe to the node and retrieve its items.
This corresponds to the pubsub#access_model field.
See also setAccessModel().
QStringList QXmppPubSubMetadata::contactJids() const
Returns the JIDs of the entities to contact with questions about the node.
This corresponds to the pubsub#contact field.
See also setContactJids().
QDateTime QXmppPubSubMetadata::creationDate() const
Returns the date and time when the node was created.
This corresponds to the pubsub#creation_date field.
See also setCreationDate().
QString QXmppPubSubMetadata::creatorJid() const
Returns the JID of the entity that created the node.
This corresponds to the pubsub#creator field.
See also setCreatorJid().
QString QXmppPubSubMetadata::description() const
Returns the description of the node.
This corresponds to the pubsub#description field.
See also setDescription().
QString QXmppPubSubMetadata::language() const
Returns the default language of the node.
This corresponds to the pubsub#language field.
See also setLanguage().
QXmppPubSubMetadata::ItemLimit QXmppPubSubMetadata::maxItems() const
Returns the maximum number of items the node keeps.
The limit is either a number, Max for the maximum supported by the service or Unset.
This corresponds to the pubsub#max_items field.
See also setMaxItems().
std::optional<quint64> QXmppPubSubMetadata::numberOfSubscribers() const
Returns the number of subscribers to the node.
This corresponds to the pubsub#num_subscribers field.
See also setNumberOfSubscribers().
QStringList QXmppPubSubMetadata::ownerJids() const
Returns the JIDs of the owners of the node.
This corresponds to the pubsub#owner field.
See also setOwnerJids().
std::optional<QXmppPubSubNodeConfig::PublishModel> QXmppPubSubMetadata::publishModel() const
Returns the publish model of the node.
The publish model defines who is allowed to publish items to the node.
This corresponds to the pubsub#publish_model field.
See also setPublishModel().
QStringList QXmppPubSubMetadata::publisherJids() const
Returns the JIDs of the entities that may publish to the node.
This corresponds to the pubsub#publisher field.
See also setPublisherJids().
void QXmppPubSubMetadata::setAccessModel(std::optional<QXmppPubSubNodeConfig::AccessModel> accessModel)
Sets the access model of the node to accessModel.
See also accessModel().
void QXmppPubSubMetadata::setContactJids(const QStringList &contactJids)
Sets the JIDs of the entities to contact with questions about the node to contactJids.
See also contactJids().
void QXmppPubSubMetadata::setCreationDate(const QDateTime &creationDate)
Sets the date and time when the node was created to creationDate.
See also creationDate().
void QXmppPubSubMetadata::setCreatorJid(const QString &creatorJid)
Sets the JID of the entity that created the node to creatorJid.
See also creatorJid().
void QXmppPubSubMetadata::setDescription(const QString &description)
Sets the description of the node to description.
See also description().
void QXmppPubSubMetadata::setLanguage(const QString &language)
Sets the default language of the node to language.
See also language().
void QXmppPubSubMetadata::setMaxItems(QXmppPubSubMetadata::ItemLimit maxItems)
Sets the maximum number of items the node keeps to maxItems.
See also maxItems().
void QXmppPubSubMetadata::setNumberOfSubscribers(const std::optional<quint64> &numberOfSubscribers)
Sets the number of subscribers to the node to numberOfSubscribers.
See also numberOfSubscribers().
void QXmppPubSubMetadata::setOwnerJids(const QStringList &ownerJids)
Sets the JIDs of the owners of the node to ownerJids.
See also ownerJids().
void QXmppPubSubMetadata::setPublishModel(std::optional<QXmppPubSubNodeConfig::PublishModel> publishModel)
Sets the publish model of the node to publishModel.
See also publishModel().
void QXmppPubSubMetadata::setPublisherJids(const QStringList &publisherJids)
Sets the JIDs of the entities that may publish to the node to publisherJids.
See also publisherJids().
void QXmppPubSubMetadata::setTitle(const QString &title)
Sets the human readable name of the node to title.
See also title().
void QXmppPubSubMetadata::setType(const QString &type)
Sets the type of the payload of the node's items to type.
See also type().
QString QXmppPubSubMetadata::title() const
Returns the human readable name of the node.
This corresponds to the pubsub#title field.
See also setTitle().
QString QXmppPubSubMetadata::type() const
Returns the type of the payload of the node's items.
This is usually the namespace of the payload elements.
This corresponds to the pubsub#type field.
See also setType().
QXmppPubSubMetadata &QXmppPubSubMetadata::operator=(QXmppPubSubMetadata &&)
Default move-assignment operator
QXmppPubSubMetadata &QXmppPubSubMetadata::operator=(const QXmppPubSubMetadata &)
Default assignment operator