QXmpp Version: 0.9.3
Loading...
Searching...
No Matches
QXmppStreamFeatures.h
1/*
2 * Copyright (C) 2008-2014 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
29class QXMPP_EXPORT QXmppStreamFeatures : public QXmppStanza
30{
31public:
32 QXmppStreamFeatures();
33
34 enum Mode
35 {
36 Disabled = 0,
37 Enabled,
38 Required
39 };
40
41 Mode bindMode() const;
42 void setBindMode(Mode mode);
43
44 Mode sessionMode() const;
45 void setSessionMode(Mode mode);
46
47 Mode nonSaslAuthMode() const;
48 void setNonSaslAuthMode(Mode mode);
49
50 QStringList authMechanisms() const;
51 void setAuthMechanisms(const QStringList &mechanisms);
52
53 QStringList compressionMethods() const;
54 void setCompressionMethods(const QStringList &methods);
55
56 Mode tlsMode() const;
57 void setTlsMode(Mode mode);
58
60 void parse(const QDomElement &element);
61 void toXml(QXmlStreamWriter *writer) const;
63
64 static bool isStreamFeatures(const QDomElement &element);
65
66private:
67 Mode m_bindMode;
68 Mode m_sessionMode;
69 Mode m_nonSaslAuthMode;
70 Mode m_tlsMode;
71 QStringList m_authMechanisms;
72 QStringList m_compressionMethods;
73};
74
75#endif
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:91