QXmpp  Version: 1.10.4
QXmppPushEnableIq.h
1 // SPDX-FileCopyrightText: 2020 Robert Märkisch <zatrox@kaidan.im>
2 // SPDX-FileCopyrightText: 2020 Linus Jahn <lnj@kaidan.im>
3 // SPDX-FileCopyrightText: 2020 Jonah Brüchert <jbb@kaidan.im>
4 //
5 // SPDX-License-Identifier: LGPL-2.1-or-later
6 
7 #ifndef QXMPPPUSHENABLEIQ_H
8 #define QXMPPPUSHENABLEIQ_H
9 
10 #include <QXmppIq.h>
11 
12 class QXmppPushEnableIqPrivate;
13 class QXmppDataForm;
14 
23 class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq
24 {
25 public:
29  ~QXmppPushEnableIq() override;
32 
37  enum Mode : bool {
38  Enable = true,
39  Disable = false
40  };
41 
42  QString jid() const;
43  void setJid(const QString &jid);
44 
45  QString node() const;
46  void setNode(const QString &node);
47 
48  void setMode(Mode mode);
49  Mode mode();
50 
51  QXmppDataForm dataForm() const;
52  void setDataForm(const QXmppDataForm &form);
53 
54  static bool isPushEnableIq(const QDomElement &element);
55 
56 protected:
58  void parseElementFromChild(const QDomElement &element) override;
59  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
61 
62 private:
63  QSharedDataPointer<QXmppPushEnableIqPrivate> d;
64 };
65 
66 #endif // QXMPPPUSHENABLEIQ_H
This class represents an IQ to enable or disablepush notifications on the user server.
Definition: QXmppPushEnableIq.h:23
Mode
The Mode enum describes whether the IQ should enable or disable push notifications.
Definition: QXmppPushEnableIq.h:37
Definition: QXmppDataForm.h:26
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:22
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.