QXmpp Version: 1.5.1
Public Member Functions | Static Public Member Functions | List of all members
QXmppPubSubEvent< T > Class Template Reference

The QXmppPubSubEvent class represents a PubSub event notification as defined by XEP-0060: Publish-Subscribe. More...

Inheritance diagram for QXmppPubSubEvent< T >:
Inheritance graph
Collaboration diagram for QXmppPubSubEvent< T >:
Collaboration graph

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.
QXmppPubSubEventBaseoperator= (const QXmppPubSubEventBase &other)
 Default assignment operator.
QXmppPubSubEventBaseoperator= (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< QXmppPubSubSubscriptionsubscription () const
void setSubscription (const std::optional< QXmppPubSubSubscription > &subscription)
std::optional< QXmppDataFormconfigurationForm () 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 &&)
QXmppMessageoperator= (const QXmppMessage &other)
 Assignment operator.
QXmppMessageoperator= (QXmppMessage &&)
 Move-assignment operator.
bool isXmppStanza () const override
QString body () const
 Returns the message's body.
void setBody (const QString &)
QString e2eeFallbackBody () const
void setE2eeFallbackBody (const QString &fallbackBody)
QString subject () const
 Returns the message's subject.
void setSubject (const QString &)
QString thread () const
 Returns the message's thread.
void setThread (const QString &)
QString parentThread () const
void setParentThread (const QString &)
QXmppMessage::Type type () const
 Returns the message's type.
void setType (QXmppMessage::Type)
QString outOfBandUrl () const
void setOutOfBandUrl (const QString &)
QVector< QXmppOutOfBandUrloutOfBandUrls () 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
QXmppBitsOfBinaryDataListbitsOfBinaryData ()
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 ()
QString stanzaId () const
void setStanzaId (const QString &id)
QString stanzaIdBy () const
void setStanzaIdBy (const QString &id)
QString originId () const
void setOriginId (const QString &id)
QString attachId () const
void setAttachId (const QString &)
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< QXmppMixInvitationmixInvitation () const
void setMixInvitation (const std::optional< QXmppMixInvitation > &mixInvitation)
bool isFallback () const
void setIsFallback (bool isFallback)
std::optional< QXmppTrustMessageElementtrustMessageElement () const
void setTrustMessageElement (const std::optional< QXmppTrustMessageElement > &trustMessageElement)
std::optional< QXmppMessageReactionreaction () const
void setReaction (const std::optional< QXmppMessageReaction > &reaction)
const QVector< QXmppFileShare > & sharedFiles () const
void setSharedFiles (const QVector< QXmppFileShare > &sharedFiles)
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.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QXmppStanzaoperator= (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< ErrorerrorOptional () const
void setError (const QXmppStanza::Error &error)
void setError (const std::optional< Error > &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)
std::optional< QXmppE2eeMetadatae2eeMetadata () 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 ,
 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 }

Detailed Description

template<typename T = QXmppPubSubItem>
class QXmppPubSubEvent< T >

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 bool isPubSubEvent(const QDomElement &element)
Definition: QXmppPubSubEvent.h:118
QXmpp 1.5

Member Function Documentation

◆ isPubSubEvent()

template<typename T >
bool QXmppPubSubEvent< T >::isPubSubEvent ( const QDomElement &  element)

Returns whether the element is a valid QXmppPubSubEvent and contains only valid items of type T.

◆ items()

template<typename T >
QVector< T > QXmppPubSubEvent< T >::items

Returns the PubSub items of the event.

◆ setItems()

template<typename T >
void QXmppPubSubEvent< T >::setItems ( const QVector< T > &  items)

Sets the PubSub items of the event.

The documentation for this class was generated from the following file: