QXmpp Version: 1.10.0
QXmppStartTlsPacket.h
1// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPSTARTTLSPACKET_H
6#define QXMPPSTARTTLSPACKET_H
7
8#include "QXmppStanza.h"
9
18class QXMPP_EXPORT QXmppStartTlsPacket : public QXmppNonza
19{
20public:
22 enum Type {
27 };
28
29 [[deprecated]] QXmppStartTlsPacket(Type type = StartTls);
30 ~QXmppStartTlsPacket() override;
31
32 Type type() const;
33 void setType(Type type);
34
36 void parse(const QDomElement &element) override;
37 void toXml(QXmlStreamWriter *writer) const override;
39
40 [[deprecated]] static bool isStartTlsPacket(const QDomElement &element);
41 [[deprecated]] static bool isStartTlsPacket(const QDomElement &element, Type type);
42
43private:
44 Type m_type;
45};
46
47Q_DECLARE_METATYPE(QXmppStartTlsPacket::Type);
48
49#endif // QXMPPSTARTTLSPACKET_H
Definition: QXmppNonza.h:14
virtual void parse(const QDomElement &)=0
virtual void toXml(QXmlStreamWriter *writer) const =0
The QXmppStartTlsPacket represents packets used for initiating STARTTLS negotiation when connecting.
Definition: QXmppStartTlsPacket.h:19
Type
The type of the STARTTLS packet.
Definition: QXmppStartTlsPacket.h:22
@ Proceed
Used by the server to accept STARTTLS.
Definition: QXmppStartTlsPacket.h:24
@ Invalid
Invalid type.
Definition: QXmppStartTlsPacket.h:26
@ Failure
Used by the server to reject STARTTLS.
Definition: QXmppStartTlsPacket.h:25
@ StartTls
Used by the client to initiate STARTTLS.
Definition: QXmppStartTlsPacket.h:23