QXmpp Version: 1.10.3
Loading...
Searching...
No Matches
QXmppPubSubEventBase Class Reference
Inheritance diagram for QXmppPubSubEventBase:
QXmppMessage QXmppStanza QXmppNonza QXmppPubSubEvent< T >

Public Types

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 }

Public Member Functions

 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 &&)
 Move-constructor.
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 &)
 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< 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 ()
std::optional< QXmppJingleMessageInitiationElementjingleMessageInitiationElement () 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< QXmppStanzaIdstanzaIds () 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< 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)
QVector< QXmppFileSourcesAttachmentfileSourcesAttachments () const
void setFileSourcesAttachments (const QVector< QXmppFileSourcesAttachment > &)
std::optional< QXmpp::Replyreply () const
void setReply (const std::optional< QXmpp::Reply > &)
QString readReplyQuoteFromBody () const
std::optional< QXmppCallInviteElementcallInviteElement () 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.
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 void parse (const QDomElement &)=0
virtual void toXml (QXmlStreamWriter *writer) const =0

Additional Inherited Members

Static Public Member Functions inherited from QXmppMessage
static bool isSlashMeCommand (const QString &body)
static QString slashMeCommandText (const QString &body)

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.

Since
QXmpp 1.5

Member Enumeration Documentation

◆ EventType

Enumeration of different event types

Constructor & Destructor Documentation

◆ QXmppPubSubEventBase()

QXmppPubSubEventBase::QXmppPubSubEventBase ( EventType type = Items,
const QString & node = {} )

Constructs a PubSub event.

Member Function Documentation

◆ configurationForm()

std::optional< QXmppDataForm > QXmppPubSubEventBase::configurationForm ( ) const

Returns a configuration data form if the event contains one.

◆ eventType()

QXmppPubSubEventBase::EventType QXmppPubSubEventBase::eventType ( ) const

Returns the event type of the PubSub event.

◆ node()

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
subscription()
QXmppPubSubSubscription::node()

◆ redirectUri()

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.

◆ retractIds()

QStringList QXmppPubSubEventBase::retractIds ( ) const

Returns the item IDs that have been retracted.

This is only used for the Items event type.

◆ setConfigurationForm()

void QXmppPubSubEventBase::setConfigurationForm ( const std::optional< QXmppDataForm > & configurationForm)

Sets a configuration data form (or clears it with std::nullopt).

◆ setEventType()

void QXmppPubSubEventBase::setEventType ( EventType type)

Sets the event type of the PubSub event.

◆ setNode()

void QXmppPubSubEventBase::setNode ( const QString & node)

Sets the name of the event's node.

This does not work with Subscription events. In those cases you need to set the node of the subscription.

See also
subscription()
QXmppPubSubSubscription::setNode()

◆ setRedirectUri()

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.

◆ setRetractIds()

void QXmppPubSubEventBase::setRetractIds ( const QStringList & retractIds)

Sets the item IDs that have been retracted.

This is only used for the Items event type.

◆ setSubscription()

void QXmppPubSubEventBase::setSubscription ( const std::optional< QXmppPubSubSubscription > & subscription)

Sets the subscription in case of a Subscription event.

◆ subscription()

std::optional< QXmppPubSubSubscription > QXmppPubSubEventBase::subscription ( ) const

Returns the subscription in case of a Subscription event.


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