QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppStreamFeatures.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPSTREAMFEATURES_H
25#define QXMPPSTREAMFEATURES_H
26
27#include "QXmppStanza.h"
28
29#include <QSharedDataPointer>
30
31class QXmppStreamFeaturesPrivate;
32
37class QXMPP_EXPORT QXmppStreamFeatures : public QXmppStanza
38{
39public:
43
45
46 enum Mode {
47 Disabled = 0,
48 Enabled,
49 Required
50 };
51
52 Mode bindMode() const;
53 void setBindMode(Mode mode);
54
55 Mode sessionMode() const;
56 void setSessionMode(Mode mode);
57
58 Mode nonSaslAuthMode() const;
59 void setNonSaslAuthMode(Mode mode);
60
61 QStringList authMechanisms() const;
62 void setAuthMechanisms(const QStringList &mechanisms);
63
64 QStringList compressionMethods() const;
65 void setCompressionMethods(const QStringList &methods);
66
67 Mode tlsMode() const;
68 void setTlsMode(Mode mode);
69
70 Mode streamManagementMode() const;
71 void setStreamManagementMode(Mode mode);
72
73 Mode clientStateIndicationMode() const;
74 void setClientStateIndicationMode(Mode mode);
75
76 Mode registerMode() const;
77 void setRegisterMode(const Mode &registerMode);
78
79 bool preApprovedSubscriptionsSupported() const;
80 void setPreApprovedSubscriptionsSupported(bool);
81
82 bool rosterVersioningSupported() const;
83 void setRosterVersioningSupported(bool);
84
86 void parse(const QDomElement &element) override;
87 void toXml(QXmlStreamWriter *writer) const override;
89
90 static bool isStreamFeatures(const QDomElement &element);
91
92private:
93 QSharedDataPointer<QXmppStreamFeaturesPrivate> d;
94};
95
96#endif
The QXmppStanza class is the base class for all XMPP stanzas.
Definition QXmppStanza.h:100
QXmppStanza & operator=(const QXmppStanza &other)
Assigns other to this stanza.
Definition QXmppStanza.cpp:544
The QXmppStreamFeatures class represents the features returned by an XMPP server or client.
Definition QXmppStreamFeatures.h:38