QXmpp  Version: 1.5.3
QXmppDialback.h
1 // SPDX-FileCopyrightText: 2010 Jeremy LainĂ© <jeremy.laine@m4x.org>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPDIALBACK_H
6 #define QXMPPDIALBACK_H
7 
8 #include "QXmppStanza.h"
9 
14 
15 class QXMPP_EXPORT QXmppDialback : public QXmppStanza
16 {
17 public:
19  enum Command {
20  Result,
21  Verify
23  };
25 
26  QXmppDialback();
27 
28  Command command() const;
29  void setCommand(Command command);
30 
31  QString key() const;
32  void setKey(const QString &key);
33 
34  QString type() const;
35  void setType(const QString &type);
36 
38  void parse(const QDomElement &element) override;
39  void toXml(QXmlStreamWriter *writer) const override;
40 
41  static bool isDialback(const QDomElement &element);
43 
44 private:
45  Command m_command;
46  QString m_key;
47  QString m_type;
48 };
49 
50 #endif
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:87
Command
This enum is used to describe a dialback command.
Definition: QXmppDialback.h:19
The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP...
Definition: QXmppDialback.h:15
virtual void parse(const QDomElement &)=0
virtual void toXml(QXmlStreamWriter *writer) const =0