QXmpp Version: 1.10.0
QXmppPubSubSubAuthorization.h
1// SPDX-FileCopyrightText: 2020 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPPUBSUBSUBAUTHORIZATION_H
6#define QXMPPPUBSUBSUBAUTHORIZATION_H
7
8#include "QXmppDataFormBase.h"
9
10class QXmppPubSubSubAuthorizationPrivate;
11
13{
14public:
15 static std::optional<QXmppPubSubSubAuthorization> fromDataForm(const QXmppDataForm &);
16
21
24
25 std::optional<bool> allowSubscription() const;
26 void setAllowSubscription(std::optional<bool> allowSubscription);
27
28 QString node() const;
29 void setNode(const QString &node);
30
31 QString subscriberJid() const;
32 void setSubscriberJid(const QString &subscriberJid);
33
34 QString subid() const;
35 void setSubid(const QString &subid);
36
37protected:
38 QString formType() const override;
39 bool parseField(const QXmppDataForm::Field &) override;
40 void serializeForm(QXmppDataForm &) const override;
41
42private:
43 QSharedDataPointer<QXmppPubSubSubAuthorizationPrivate> d;
44};
45
46#endif // QXMPPPUBSUBSUBAUTHORIZATION_H
static bool fromDataForm(const QXmppDataForm &form, QXmppDataFormBase &parent)
Definition: QXmppDataFormBase.cpp:55
virtual QString formType() const =0
Definition: QXmppDataForm.h:89
Definition: QXmppDataForm.h:27
Definition: QXmppDataFormBase.h:97
void serializeForm(QXmppDataForm &) const override
Definition: QXmppDataFormBase.cpp:204
virtual bool parseField(const QXmppDataForm::Field &)
Definition: QXmppDataFormBase.cpp:215
Definition: QXmppPubSubSubAuthorization.h:13
QXmppPubSubSubAuthorization(const QXmppPubSubSubAuthorization &)
Copy-constructor.
QXmppPubSubSubAuthorization & operator=(const QXmppPubSubSubAuthorization &)
Assignment operator.
QXmppPubSubSubAuthorization & operator=(QXmppPubSubSubAuthorization &&)
Move-assignment operator.
QXmppPubSubSubAuthorization(QXmppPubSubSubAuthorization &&)
Move-constructor.