QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppStreamFeatures.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPSTREAMFEATURES_H
6#define QXMPPSTREAMFEATURES_H
7
8#include "QXmppStanza.h"
9
10#include <QSharedDataPointer>
11
12class QXmppStreamFeaturesPrivate;
13
18class QXMPP_EXPORT QXmppStreamFeatures : public QXmppNonza
19{
20public:
25
28
30 enum Mode {
31 Disabled = 0,
32 Enabled,
33 Required
34 };
35
36 Mode bindMode() const;
37 void setBindMode(Mode mode);
38
39 Mode sessionMode() const;
40 void setSessionMode(Mode mode);
41
42 Mode nonSaslAuthMode() const;
43 void setNonSaslAuthMode(Mode mode);
44
45 QStringList authMechanisms() const;
46 void setAuthMechanisms(const QStringList &mechanisms);
47
48 QStringList compressionMethods() const;
49 void setCompressionMethods(const QStringList &methods);
50
51 Mode tlsMode() const;
52 void setTlsMode(Mode mode);
53
54 Mode streamManagementMode() const;
55 void setStreamManagementMode(Mode mode);
56
57 Mode clientStateIndicationMode() const;
58 void setClientStateIndicationMode(Mode mode);
59
60 Mode registerMode() const;
61 void setRegisterMode(const Mode &mode);
62
63 bool preApprovedSubscriptionsSupported() const;
64 void setPreApprovedSubscriptionsSupported(bool);
65
66 bool rosterVersioningSupported() const;
67 void setRosterVersioningSupported(bool);
68
70 void parse(const QDomElement &element) override;
71 void toXml(QXmlStreamWriter *writer) const override;
72
73 static bool isStreamFeatures(const QDomElement &element);
75
76private:
77 QSharedDataPointer<QXmppStreamFeaturesPrivate> d;
78};
79
80#endif
Definition QXmppNonza.h:14
virtual void parse(const QDomElement &)=0
virtual void toXml(QXmlStreamWriter *writer) const =0
The QXmppStreamFeatures class represents the features returned by an XMPP server or client.
Definition QXmppStreamFeatures.h:19
QXmppStreamFeatures(const QXmppStreamFeatures &)
Default copy-constructor.
Mode
Mode of a feature.
Definition QXmppStreamFeatures.h:30
QXmppStreamFeatures(QXmppStreamFeatures &&)
Default move-constructor.
QXmppStreamFeatures & operator=(const QXmppStreamFeatures &)
Default assignment operator.
QXmppStreamFeatures & operator=(QXmppStreamFeatures &&)
Default move-assignment operator.