QXmppPubSubEvent Class

template <typename T = QXmppPubSubBaseItem> class QXmppPubSubEvent

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

Header: #include <QXmppPubSubEvent>
Since: QXmpp 1.5
Inherits: QXmppPubSubEventBase

Detailed Description

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 &lt;message/&gt; 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:

 QXmppPubSubEvent<QXmppTuneItem>::isPubSubEvent(element);