diff options
| author | Linus Jahn <lnj@kaidan.im> | 2019-12-06 22:47:10 +0100 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-12-08 23:08:44 +0100 |
| commit | 9f2d1158e0e2a212e0189d3a6ce772c0be88ed50 (patch) | |
| tree | 4bff4db45d695b6fea1c09b3e3f6c88bbeb879e1 /src/base/QXmppPubSubIq.h | |
| parent | 8ceb773c3cfcad6421bb91f9811ff7b4f412169f (diff) | |
| download | qxmpp-9f2d1158e0e2a212e0189d3a6ce772c0be88ed50.tar.gz | |
QXmppPubSubIq/QXmppPubSubItem: Use d-pointer to maintain binary compat in future
Diffstat (limited to 'src/base/QXmppPubSubIq.h')
| -rw-r--r-- | src/base/QXmppPubSubIq.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/base/QXmppPubSubIq.h b/src/base/QXmppPubSubIq.h index 741b25da..d18e92b0 100644 --- a/src/base/QXmppPubSubIq.h +++ b/src/base/QXmppPubSubIq.h @@ -24,15 +24,25 @@ #ifndef QXMPPPUBSUBIQ_H #define QXMPPPUBSUBIQ_H +#include <QSharedDataPointer> + #include "QXmppIq.h" +class QXmppPubSubItemPrivate; +class QXmppPubSubIqPrivate; + /// \brief The QXmppPubSubItem class represents a publish-subscribe item /// as defined by XEP-0060: Publish-Subscribe. -/// class QXMPP_EXPORT QXmppPubSubItem { public: + QXmppPubSubItem(); + QXmppPubSubItem(const QXmppPubSubItem &iq); + ~QXmppPubSubItem(); + + QXmppPubSubItem &operator=(const QXmppPubSubItem &iq); + QString id() const; void setId(const QString &id); @@ -45,8 +55,7 @@ public: /// \endcond private: - QString m_id; - QXmppElement m_contents; + QSharedDataPointer<QXmppPubSubItemPrivate> d; }; /// \brief The QXmppPubSubIq class represents an IQ used for the @@ -58,8 +67,7 @@ class QXMPP_EXPORT QXmppPubSubIq : public QXmppIq { public: /// This enum is used to describe a publish-subscribe query type. - enum QueryType - { + enum QueryType { AffiliationsQuery, DefaultQuery, ItemsQuery, @@ -71,6 +79,12 @@ public: UnsubscribeQuery }; + QXmppPubSubIq(); + QXmppPubSubIq(const QXmppPubSubIq &iq); + ~QXmppPubSubIq(); + + QXmppPubSubIq &operator=(const QXmppPubSubIq &iq); + QXmppPubSubIq::QueryType queryType() const; void setQueryType(QXmppPubSubIq::QueryType queryType); @@ -97,12 +111,7 @@ protected: /// \endcond private: - QXmppPubSubIq::QueryType m_queryType; - QString m_queryJid; - QString m_queryNode; - QList<QXmppPubSubItem> m_items; - QString m_subscriptionId; - QString m_subscriptionType; + QSharedDataPointer<QXmppPubSubIqPrivate> d; }; #endif |
