6#ifndef QXMPPPUBSUBBASEITEM_H
7#define QXMPPPUBSUBBASEITEM_H
9#include "QXmppGlobal.h"
13#include <QSharedDataPointer>
15class QXmlStreamWriter;
16class QXmppPubSubBaseItemPrivate;
30 void setId(
const QString &
id);
32 QString publisher()
const;
33 void setPublisher(
const QString &publisher);
36 void parse(
const QDomElement &element);
37 void toXml(QXmlStreamWriter *writer)
const;
40 static bool isItem(
const QDomElement &element);
43 virtual void parsePayload(
const QDomElement &payloadElement);
44 virtual void serializePayload(QXmlStreamWriter *writer)
const;
46 template<
typename PayloadChecker>
47 static bool isItem(
const QDomElement &element, PayloadChecker isPayloadValid);
50 QSharedDataPointer<QXmppPubSubBaseItemPrivate> d;
72template<
typename PayloadChecker>
79 const QDomElement payload = element.firstChildElement();
82 if (!payload.isNull()) {
83 return isPayloadValid(payload);
Definition QXmppPubSubBaseItem.h:19
QXmppPubSubBaseItem & operator=(QXmppPubSubBaseItem &&)
Default move-assignment operator.
QXmppPubSubBaseItem(const QXmppPubSubBaseItem &)
Default copy-constructor.
QXmppPubSubBaseItem(QXmppPubSubBaseItem &&)
Default move-constructor.
static bool isItem(const QDomElement &element)
Definition QXmppPubSubBaseItem.cpp:130
QXmppPubSubBaseItem & operator=(const QXmppPubSubBaseItem &)
Default assignment operator.