5#ifndef QXMPPPUBSUBSUBSCRIBEOPTIONS_H
6#define QXMPPPUBSUBSUBSCRIBEOPTIONS_H
8#include "QXmppDataForm.h"
9#include "QXmppDataFormBase.h"
10#include "QXmppGlobal.h"
13#include <QSharedDataPointer>
17class QXmlStreamWriter;
19class QXmppPubSubSubscribeOptionsPrivate;
24 enum PresenceState : uint8_t {
32 Q_DECLARE_FLAGS(PresenceStates, PresenceState)
33 static PresenceStates presenceStatesFromStringList(
const QStringList &);
34 static QStringList presenceStatesToStringList(PresenceStates);
36 enum SubscriptionType : uint8_t {
41 enum SubscriptionDepth : uint8_t {
48 QXmppPubSubSubscribeOptions();
49 QXmppPubSubSubscribeOptions(
const QXmppPubSubSubscribeOptions &);
50 QXmppPubSubSubscribeOptions(QXmppPubSubSubscribeOptions &&);
51 virtual ~QXmppPubSubSubscribeOptions();
53 QXmppPubSubSubscribeOptions &operator=(
const QXmppPubSubSubscribeOptions &);
54 QXmppPubSubSubscribeOptions &operator=(QXmppPubSubSubscribeOptions &&);
56 std::optional<bool> notificationsEnabled()
const;
57 void setNotificationsEnabled(std::optional<bool> notifying);
59 std::optional<bool> digestsEnabled()
const;
60 void setDigestsEnabled(std::optional<bool> digestsEnabled);
62 std::optional<quint32> digestFrequencyMs()
const;
63 void setDigestFrequencyMs(std::optional<quint32> digestFrequencyMs);
65 QDateTime expire()
const;
66 void setExpire(
const QDateTime &expire);
68 std::optional<bool> bodyIncluded()
const;
69 void setBodyIncluded(std::optional<bool> bodyIncluded);
71 PresenceStates notificationRules()
const;
72 void setNotificationRules(PresenceStates notificationRules);
74 std::optional<SubscriptionType> subscriptionType()
const;
75 void setSubscriptionType(std::optional<SubscriptionType> subscriptionType);
77 std::optional<SubscriptionDepth> subscriptionDepth()
const;
78 void setSubscriptionDepth(std::optional<SubscriptionDepth> subscriptionDepth);
86 QSharedDataPointer<QXmppPubSubSubscribeOptionsPrivate> d;
89Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppPubSubSubscribeOptions::PresenceStates)
90Q_DECLARE_METATYPE(QXmppPubSubSubscribeOptions)