5#ifndef QXMPPPUBSUBSUBSCRIPTION_H
6#define QXMPPPUBSUBSUBSCRIPTION_H
8#include "QXmppGlobal.h"
12#include <QSharedDataPointer>
14class QXmppPubSubSubscriptionPrivate;
15class QXmlStreamWriter;
36 static QString stateToString(State);
37 static State stateFromString(
const QString &);
56 const QString &node = {},
57 const QString &subId = {},
58 State state = Invalid,
59 ConfigurationSupport configurationSupport = Unavailable,
60 const QDateTime &expiry = {});
69 void setJid(
const QString &jid);
72 void setNode(
const QString &node);
74 QString subId()
const;
75 void setSubId(
const QString &subId);
77 QDateTime expiry()
const;
78 void setExpiry(
const QDateTime &expiry);
81 void setState(
State state);
85 bool isConfigurationSupported()
const;
86 bool isConfigurationRequired()
const;
88 static bool isSubscription(
const QDomElement &);
91 void parse(
const QDomElement &);
92 void toXml(QXmlStreamWriter *writer)
const;
96 QSharedDataPointer<QXmppPubSubSubscriptionPrivate> d;
Definition: QXmppPubSubSubscription.h:19
QXmppPubSubSubscription & operator=(const QXmppPubSubSubscription &)
Copy assignment operator.
QXmppPubSubSubscription(QXmppPubSubSubscription &&)
Move contructor.
QXmppPubSubSubscription & operator=(QXmppPubSubSubscription &&)
Move-assignment operator.
State
Definition: QXmppPubSubSubscription.h:24
@ Pending
A subscription is pending.
Definition: QXmppPubSubSubscription.h:30
@ Subscribed
The user is subscribed to the node.
Definition: QXmppPubSubSubscription.h:32
@ Unconfigured
The subscription requires configuration before it becomes active.
Definition: QXmppPubSubSubscription.h:34
@ Invalid
No state information is included.
Definition: QXmppPubSubSubscription.h:26
@ None
There is no subscription with the node.
Definition: QXmppPubSubSubscription.h:28
ConfigurationSupport
Definition: QXmppPubSubSubscription.h:44
@ Required
Definition: QXmppPubSubSubscription.h:52
@ Available
Configuration of the subscription is possible, but not required.
Definition: QXmppPubSubSubscription.h:48
@ Unavailable
A subscription configuration is not advertised.
Definition: QXmppPubSubSubscription.h:46
QXmppPubSubSubscription(const QXmppPubSubSubscription &)
Copy contructor.