QXmpp Version: 1.10.0
|
The QXmppPubSubEvent class represents a PubSub event notification as defined by XEP-0060: Publish-Subscribe. More...
Public Member Functions | |
QVector< T > | items () const |
void | setItems (const QVector< T > &items) |
Public Member Functions inherited from QXmppPubSubEventBase | |
QXmppPubSubEventBase (EventType=Items, const QString &node={}) | |
QXmppPubSubEventBase (const QXmppPubSubEventBase &other) | |
Default copy-constructor. | |
QXmppPubSubEventBase (QXmppPubSubEventBase &&) | |
Default move-constructor. | |
QXmppPubSubEventBase & | operator= (const QXmppPubSubEventBase &other) |
Default assignment operator. | |
QXmppPubSubEventBase & | operator= (QXmppPubSubEventBase &&) |
Default move-assignment operator. | |
EventType | eventType () const |
void | setEventType (EventType) |
QString | node () const |
void | setNode (const QString &node) |
QStringList | retractIds () const |
void | setRetractIds (const QStringList &) |
QString | redirectUri () const |
void | setRedirectUri (const QString &) |
std::optional< QXmppPubSubSubscription > | subscription () const |
void | setSubscription (const std::optional< QXmppPubSubSubscription > &subscription) |
std::optional< QXmppDataForm > | configurationForm () const |
void | setConfigurationForm (const std::optional< QXmppDataForm > &configurationForm) |
Public Member Functions inherited from QXmppMessage | |
QXmppMessage (const QString &from=QString(), const QString &to=QString(), const QString &body=QString(), const QString &thread=QString()) | |
QXmppMessage (const QXmppMessage &other) | |
Constructs a copy of other. | |
QXmppMessage (QXmppMessage &&) | |
Move-constructor. | |
QXmppMessage & | operator= (const QXmppMessage &other) |
Assignment operator. | |
QXmppMessage & | operator= (QXmppMessage &&) |
Move-assignment operator. | |
bool | isXmppStanza () const override |
QString | body () const |
Returns the message's body. | |
void | setBody (const QString &) |
Sets the message's body. | |
QString | e2eeFallbackBody () const |
void | setE2eeFallbackBody (const QString &fallbackBody) |
QString | subject () const |
Returns the message's subject. | |
void | setSubject (const QString &) |
Sets the message's subject. | |
QString | thread () const |
Returns the message's thread. | |
void | setThread (const QString &) |
Sets the message's thread. | |
QString | parentThread () const |
void | setParentThread (const QString &) |
QXmppMessage::Type | type () const |
Returns the message's type. | |
void | setType (QXmppMessage::Type) |
Sets the message's type. | |
QString | outOfBandUrl () const |
void | setOutOfBandUrl (const QString &) |
QVector< QXmppOutOfBandUrl > | outOfBandUrls () const |
void | setOutOfBandUrls (const QVector< QXmppOutOfBandUrl > &urls) |
QString | xhtml () const |
void | setXhtml (const QString &xhtml) |
QXmppMessage::State | state () const |
void | setState (QXmppMessage::State) |
QDateTime | stamp () const |
void | setStamp (const QDateTime &stamp) |
bool | isReceiptRequested () const |
void | setReceiptRequested (bool requested) |
QString | receiptId () const |
void | setReceiptId (const QString &id) |
bool | isAttentionRequested () const |
void | setAttentionRequested (bool requested) |
QXmppBitsOfBinaryDataList | bitsOfBinaryData () const |
QXmppBitsOfBinaryDataList & | bitsOfBinaryData () |
void | setBitsOfBinaryData (const QXmppBitsOfBinaryDataList &bitsOfBinaryData) |
bool | isSlashMeCommand () const |
QString | slashMeCommandText () const |
QString | mucInvitationJid () const |
void | setMucInvitationJid (const QString &jid) |
QString | mucInvitationPassword () const |
void | setMucInvitationPassword (const QString &password) |
QString | mucInvitationReason () const |
void | setMucInvitationReason (const QString &reason) |
bool | isPrivate () const |
void | setPrivate (const bool) |
bool | isCarbonForwarded () const |
void | setCarbonForwarded (bool) |
QString | replaceId () const |
void | setReplaceId (const QString &) |
bool | isMarkable () const |
void | setMarkable (const bool) |
QString | markedId () const |
void | setMarkerId (const QString &) |
QString | markedThread () const |
void | setMarkedThread (const QString &) |
Marker | marker () const |
void | setMarker (const Marker) |
bool | hasHint (const Hint hint) const |
void | addHint (const Hint hint) |
void | removeHint (const Hint hint) |
void | removeAllHints () |
std::optional< QXmppJingleMessageInitiationElement > | jingleMessageInitiationElement () const |
void | setJingleMessageInitiationElement (const std::optional< QXmppJingleMessageInitiationElement > &jingleMessageInitiationElement) |
QString | stanzaId () const |
void | setStanzaId (const QString &id) |
QString | stanzaIdBy () const |
void | setStanzaIdBy (const QString &id) |
QVector< QXmppStanzaId > | stanzaIds () const |
void | setStanzaIds (const QVector< QXmppStanzaId > &) |
QString | originId () const |
void | setOriginId (const QString &id) |
QString | attachId () const |
void | setAttachId (const QString &) |
QString | mixParticipantId () const |
QString | mixUserJid () const |
void | setMixUserJid (const QString &) |
QString | mixUserNick () const |
void | setMixUserNick (const QString &) |
QXmpp::EncryptionMethod | encryptionMethod () const |
void | setEncryptionMethod (QXmpp::EncryptionMethod) |
QString | encryptionMethodNs () const |
void | setEncryptionMethodNs (const QString &) |
QString | encryptionName () const |
void | setEncryptionName (const QString &) |
bool | isSpoiler () const |
void | setIsSpoiler (bool) |
QString | spoilerHint () const |
void | setSpoilerHint (const QString &) |
std::optional< QXmppMixInvitation > | mixInvitation () const |
void | setMixInvitation (const std::optional< QXmppMixInvitation > &mixInvitation) |
bool | isFallback () const |
void | setIsFallback (bool isFallback) |
const QVector< QXmppFallback > & | fallbackMarkers () const |
void | setFallbackMarkers (const QVector< QXmppFallback > &) |
QString | readFallbackRemovedText (QXmppFallback::Element element, const QVector< QString > &supportedNamespaces) const |
QString | readFallbackText (QXmppFallback::Element element, QStringView forNamespace) const |
std::optional< QXmppTrustMessageElement > | trustMessageElement () const |
void | setTrustMessageElement (const std::optional< QXmppTrustMessageElement > &trustMessageElement) |
std::optional< QXmppMessageReaction > | reaction () const |
void | setReaction (const std::optional< QXmppMessageReaction > &reaction) |
const QVector< QXmppFileShare > & | sharedFiles () const |
void | setSharedFiles (const QVector< QXmppFileShare > &sharedFiles) |
QVector< QXmppFileSourcesAttachment > | fileSourcesAttachments () const |
void | setFileSourcesAttachments (const QVector< QXmppFileSourcesAttachment > &) |
std::optional< QXmpp::Reply > | reply () const |
void | setReply (const std::optional< QXmpp::Reply > &) |
QString | readReplyQuoteFromBody () const |
std::optional< QXmppCallInviteElement > | callInviteElement () const |
void | setCallInviteElement (std::optional< QXmppCallInviteElement > callInviteElement) |
void | parseExtensions (const QDomElement &element, QXmpp::SceMode sceMode) |
virtual bool | parseExtension (const QDomElement &element, QXmpp::SceMode) |
virtual void | serializeExtensions (QXmlStreamWriter *writer, QXmpp::SceMode, const QString &baseNamespace={}) const |
Public Member Functions inherited from QXmppStanza | |
QXmppStanza (const QString &from=QString(), const QString &to=QString()) | |
QXmppStanza (const QXmppStanza &other) | |
Constructs a copy of other. | |
QXmppStanza (QXmppStanza &&) | |
Move constructor. | |
~QXmppStanza () override | |
Destroys a QXmppStanza. | |
QXmppStanza & | operator= (const QXmppStanza &other) |
Assigns other to this stanza. | |
QXmppStanza & | operator= (QXmppStanza &&) |
Move-assignment operator. | |
QString | to () const |
void | setTo (const QString &) |
QString | from () const |
void | setFrom (const QString &) |
QString | id () const |
void | setId (const QString &) |
QString | lang () const |
void | setLang (const QString &) |
QXmppStanza::Error | error () const |
std::optional< Error > | errorOptional () const |
void | setError (const QXmppStanza::Error &error) |
void | setError (const std::optional< Error > &error) |
QXmppElementList | extensions () const |
void | setExtensions (const QXmppElementList &elements) |
QList< QXmppExtendedAddress > | extendedAddresses () const |
void | setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses) |
std::optional< QXmppE2eeMetadata > | e2eeMetadata () const |
void | setE2eeMetadata (const std::optional< QXmppE2eeMetadata > &e2eeMetadata) |
Public Member Functions inherited from QXmppNonza | |
virtual bool | isXmppStanza () const |
virtual void | parse (const QDomElement &)=0 |
virtual void | toXml (QXmlStreamWriter *writer) const =0 |
Static Public Member Functions | |
static bool | isPubSubEvent (const QDomElement &element) |
Static Public Member Functions inherited from QXmppMessage | |
static bool | isSlashMeCommand (const QString &body) |
static QString | slashMeCommandText (const QString &body) |
Additional Inherited Members | |
Public Types inherited from QXmppPubSubEventBase | |
enum | EventType : uint8_t { Configuration , Delete , Items , Retract , Purge , Subscription } |
Public Types inherited from QXmppMessage | |
enum | Type { Error = 0 , Normal , Chat , GroupChat , Headline } |
This enum describes a message type. | |
enum | State { None = 0 , Active , Inactive , Gone , Composing , Paused } |
enum | Marker { NoMarker = 0 , Received , Displayed , Acknowledged } |
enum | Hint { NoPermanentStore = 1 << 0 , NoStore = 1 << 1 , NoCopy = 1 << 2 , Store = 1 << 3 } |
The QXmppPubSubEvent class represents a PubSub event notification as defined by XEP-0060: Publish-Subscribe.
This class has a template parameter that can be used to define the type of the contained items.
You can use QXmppPubSubEvent::isPubSubItem() to check whether an DOM element is a <message/> with a PubSub event notification. If you set a special type as a template parameter, validity of the items will also be checked. To check for an event notification with items from XEP-0118: User Tune for example, you could use the following:
|
static |
Returns whether the element is a valid QXmppPubSubEvent and contains only valid items of type T.
QVector< T > QXmppPubSubEvent< T >::items |
Returns the PubSub items of the event.
void QXmppPubSubEvent< T >::setItems | ( | const QVector< T > & | items | ) |
Sets the PubSub items of the event.