QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppStartTlsPacket.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Authors:
5 * Linus Jahn
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 QXMPPSTARTTLSPACKET_H
25#define QXMPPSTARTTLSPACKET_H
26
27#include "QXmppStanza.h"
28
35class QXMPP_EXPORT QXmppStartTlsPacket : public QXmppStanza
36{
37public:
39 enum Type {
42 Failure
43 };
44
45 QXmppStartTlsPacket(Type type = StartTls);
46 ~QXmppStartTlsPacket() override;
47
48 Type type() const;
49 void setType(Type type);
50
52 void parse(const QDomElement &element) override;
53 void toXml(QXmlStreamWriter *writer) const override;
55
56 static bool isStartTlsPacket(const QDomElement &element);
57 static bool isStartTlsPacket(const QDomElement &element, Type type);
58
59private:
60 Type m_type;
61};
62
63Q_DECLARE_METATYPE(QXmppStartTlsPacket::Type);
64
65#endif // QXMPPSTARTTLSPACKET_H
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:100
The QXmppStartTlsPacket represents packets used for initiating STARTTLS negotiation when connecting.
Definition: QXmppStartTlsPacket.h:36
Type
The type of the STARTTLS packet.
Definition: QXmppStartTlsPacket.h:39
@ Proceed
Used by the server to accept STARTTLS.
Definition: QXmppStartTlsPacket.h:41
@ StartTls
Used by the client to initiate STARTTLS.
Definition: QXmppStartTlsPacket.h:40