QXmppPubSubEventBase Class
| Header: | #include <QXmppPubSubEventBase> |
| Since: | QXmpp 1.5 |
| Inherits: | QXmppMessage |
| Inherited By: |
Public Functions
| QXmppPubSubEventBase(QXmppPubSubEventBase::EventType type = Items, const QString &node = {}) | |
| QXmppPubSubEventBase(const QXmppPubSubEventBase &other) | |
| QXmppPubSubEventBase(QXmppPubSubEventBase &&) | |
| std::optional<QXmppDataForm> | configurationForm() const |
| QXmppPubSubEventBase::EventType | eventType() const |
| QString | node() const |
| QString | redirectUri() const |
| QStringList | retractIds() const |
| void | setConfigurationForm(const std::optional<QXmppDataForm> &configurationForm) |
| void | setEventType(QXmppPubSubEventBase::EventType type) |
| void | setNode(const QString &node) |
| void | setRedirectUri(const QString &redirectUri) |
| void | setRetractIds(const QStringList &retractIds) |
| void | setSubscription(const std::optional<QXmppPubSubSubscription> &subscription) |
| std::optional<QXmppPubSubSubscription> | subscription() const |
| QXmppPubSubEventBase & | operator=(QXmppPubSubEventBase &&) |
| QXmppPubSubEventBase & | operator=(const QXmppPubSubEventBase &other) |
Detailed Description
The QXmppPubSubEventBase class is an abstract class used for parsing of generic PubSub event notifications as defined by XEP-0060: Publish- Subscribe.
This class cannot be used directly. For a full-featured access to the event notifications, please use the QXmppPubSubEvent class.
Member Function Documentation
QXmppPubSubEventBase::QXmppPubSubEventBase(QXmppPubSubEventBase::EventType type = Items, const QString &node = {})
Constructs a PubSub event.
QXmppPubSubEventBase::QXmppPubSubEventBase(const QXmppPubSubEventBase &other)
Default copy-constructor.
QXmppPubSubEventBase::QXmppPubSubEventBase(QXmppPubSubEventBase &&)
Default move-constructor.
std::optional<QXmppDataForm> QXmppPubSubEventBase::configurationForm() const
Returns a configuration data form if the event contains one.
See also setConfigurationForm().
QXmppPubSubEventBase::EventType QXmppPubSubEventBase::eventType() const
Returns the event type of the PubSub event.
See also setEventType().
QString QXmppPubSubEventBase::node() const
Returns the name of the event's node.
This does not work with Subscription events. In those cases you need to get the node of the subscription.
See also setNode(), subscription(), and QXmppPubSubSubscription::node().
QString QXmppPubSubEventBase::redirectUri() const
Returns the redirect URI to the new node.
This can be set for delete notifications to inform subscribers of the new node. Inclusion of this is of course optional.
See also setRedirectUri().
QStringList QXmppPubSubEventBase::retractIds() const
Returns the item IDs that have been retracted.
This is only used for the Items event type.
See also setRetractIds().
void QXmppPubSubEventBase::setConfigurationForm(const std::optional<QXmppDataForm> &configurationForm)
Sets a configuration data form (or clears it with std::nullopt).
configurationForm.
See also configurationForm().
void QXmppPubSubEventBase::setEventType(QXmppPubSubEventBase::EventType type)
Sets the event type of the PubSub event.
See also eventType().
void QXmppPubSubEventBase::setNode(const QString &node)
Sets the name of the event's node to node.
This does not work with Subscription events. In those cases you need to set the node of the subscription.
See also node(), subscription(), and QXmppPubSubSubscription::setNode().
void QXmppPubSubEventBase::setRedirectUri(const QString &redirectUri)
Sets the redirect URI to the new node.
This can be set for delete notifications to inform subscribers of the new node. Inclusion of this is of course optional.
redirectUri.
See also redirectUri().
void QXmppPubSubEventBase::setRetractIds(const QStringList &retractIds)
Sets the item IDs that have been retracted.
This is only used for the Items event type.
retractIds.
See also retractIds().
void QXmppPubSubEventBase::setSubscription(const std::optional<QXmppPubSubSubscription> &subscription)
Sets the subscription in case of a Subscription event.
See also subscription().
std::optional<QXmppPubSubSubscription> QXmppPubSubEventBase::subscription() const
Returns the subscription in case of a Subscription event.
See also setSubscription().
QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(QXmppPubSubEventBase &&)
Default move-assignment operator.
QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(const QXmppPubSubEventBase &other)
Default assignment operator.