QXmpp: QXmppPubSubSubAuthorization.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
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
12 class QXMPP_EXPORT QXmppPubSubSubAuthorization : public QXmppExtensibleDataFormBase
13{
14public:
15 static std::optional<QXmppPubSubSubAuthorization> fromDataForm(const QXmppDataForm &);
16
17 QXmppPubSubSubAuthorization();
18 QXmppPubSubSubAuthorization(const QXmppPubSubSubAuthorization &);
19 QXmppPubSubSubAuthorization(QXmppPubSubSubAuthorization &&);
20 ~QXmppPubSubSubAuthorization();
21
22 QXmppPubSubSubAuthorization &operator=(const QXmppPubSubSubAuthorization &);
23 QXmppPubSubSubAuthorization &operator=(QXmppPubSubSubAuthorization &&);
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
QXmppDataForm::Field
Definition QXmppDataForm.h:93
QXmppDataFormBase::fromDataForm
static bool fromDataForm(const QXmppDataForm &form, QXmppDataFormBase &parent)
Definition QXmppDataFormBase.cpp:55
QXmppDataFormBase::formType
virtual QString formType() const =0
QXmppDataForm
Definition QXmppDataForm.h:28
QXmppExtensibleDataFormBase::serializeForm
void serializeForm(QXmppDataForm &) const override
Definition QXmppDataFormBase.cpp:204
QXmppExtensibleDataFormBase::parseField
virtual bool parseField(const QXmppDataForm::Field &)
Definition QXmppDataFormBase.cpp:215
QXmppPubSubSubAuthorization::setSubscriberJid
void setSubscriberJid(const QString &subscriberJid)
Definition QXmppPubSubSubAuthorization.cpp:104
QXmppPubSubSubAuthorization::QXmppPubSubSubAuthorization
QXmppPubSubSubAuthorization(const QXmppPubSubSubAuthorization &)
Copy-constructor.
QXmppPubSubSubAuthorization::subscriberJid
QString subscriberJid() const
Definition QXmppPubSubSubAuthorization.cpp:96
QXmppPubSubSubAuthorization::operator=
QXmppPubSubSubAuthorization & operator=(const QXmppPubSubSubAuthorization &)
Assignment operator.
QXmppPubSubSubAuthorization::operator=
QXmppPubSubSubAuthorization & operator=(QXmppPubSubSubAuthorization &&)
Move-assignment operator.
QXmppPubSubSubAuthorization::setAllowSubscription
void setAllowSubscription(std::optional< bool > allowSubscription)
Definition QXmppPubSubSubAuthorization.cpp:72
QXmppPubSubSubAuthorization::QXmppPubSubSubAuthorization
QXmppPubSubSubAuthorization(QXmppPubSubSubAuthorization &&)
Move-constructor.
QXmppPubSubSubAuthorization::node
QString node() const
Definition QXmppPubSubSubAuthorization.cpp:80
QXmppPubSubSubAuthorization::setNode
void setNode(const QString &node)
Definition QXmppPubSubSubAuthorization.cpp:88
QXmppPubSubSubAuthorization::subid
QString subid() const
Definition QXmppPubSubSubAuthorization.cpp:112
QXmppPubSubSubAuthorization::allowSubscription
std::optional< bool > allowSubscription() const
Definition QXmppPubSubSubAuthorization.cpp:64
QXmppPubSubSubAuthorization::setSubid
void setSubid(const QString &subid)
Definition QXmppPubSubSubAuthorization.cpp:120