QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppPubSubAffiliation.h
1// SPDX-FileCopyrightText: 2020 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPPUBSUBAFFILIATION_H
6#define QXMPPPUBSUBAFFILIATION_H
7
8#include "QXmppGlobal.h"
9
10#include <QMetaType>
11#include <QSharedDataPointer>
12
13class QXmppPubSubAffiliationPrivate;
14class QDomElement;
15class QXmlStreamWriter;
16
17class QXMPP_EXPORT QXmppPubSubAffiliation
18{
19public:
32
33 QXmppPubSubAffiliation(Affiliation = None,
34 const QString &node = {},
35 const QString &jid = {});
39
42
43 Affiliation type() const;
44 void setType(Affiliation type);
45
46 QString node() const;
47 void setNode(const QString &node);
48
49 QString jid() const;
50 void setJid(const QString &jid);
51
52 static bool isAffiliation(const QDomElement &);
53
55 void parse(const QDomElement &);
56 void toXml(QXmlStreamWriter *) const;
58
59private:
60 QSharedDataPointer<QXmppPubSubAffiliationPrivate> d;
61};
62
63Q_DECLARE_METATYPE(QXmppPubSubAffiliation)
65
66#endif // QXMPPPUBSUBAFFILIATION_H
Definition QXmppPubSubAffiliation.h:18
QXmppPubSubAffiliation(const QXmppPubSubAffiliation &)
Copy constructor.
QXmppPubSubAffiliation & operator=(QXmppPubSubAffiliation &&)
Move-assignment operator.
QXmppPubSubAffiliation & operator=(const QXmppPubSubAffiliation &)
Assignment operator.
QXmppPubSubAffiliation(QXmppPubSubAffiliation &&)
Move-constructor.
Affiliation
Definition QXmppPubSubAffiliation.h:24
@ None
No affiliation, but may subscribe.
Definition QXmppPubSubAffiliation.h:25
@ Member
Active member, is subscribed, can read.
Definition QXmppPubSubAffiliation.h:26
@ Publisher
May read and publish, but cannot configure node.
Definition QXmppPubSubAffiliation.h:29
@ Outcast
Cannot subscribe, cannot read, 'banned'.
Definition QXmppPubSubAffiliation.h:27
@ Owner
Highest privileges, can read, publish & configure.
Definition QXmppPubSubAffiliation.h:28
@ PublishOnly
Can only publish, cannot subscribe.
Definition QXmppPubSubAffiliation.h:30