QXmpp  Version:1.3.1
QXmppPushEnableIq.h
1 /*
2  * Copyright (C) 2008-2020 The QXmpp developers
3  *
4  * Author:
5  * Robert Märkisch
6  * Linus Jahn
7  * Jonah Brüchert
8  *
9  * Source:
10  * https://github.com/qxmpp-project/qxmpp
11  *
12  * This file is a part of QXmpp library.
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  */
25 
26 #pragma once
27 
28 #include <QXmppIq.h>
29 
30 class QXmppPushEnableIqPrivate;
31 class QXmppDataForm;
32 
39 class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq
40 {
41 public:
46 
51  enum Mode : bool {
52  Enable = true,
53  Disable = false
54  };
55 
56  QString jid() const;
57  void setJid(const QString &jid);
58 
59  QString node() const;
60  void setNode(const QString &node);
61 
62  void setMode(Mode mode);
63  Mode mode();
64 
65  QXmppDataForm dataForm() const;
66  void setDataForm(const QXmppDataForm &form);
67 
68  static bool isPushEnableIq(const QDomElement &element);
69 
70 protected:
72  void parseElementFromChild(const QDomElement &element) override;
73  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
75 
76 private:
77  QSharedDataPointer<QXmppPushEnableIqPrivate> d;
78 };
QXmppDataForm
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition: QXmppDataForm.h:48
QXmppPushEnableIq
This class represents an IQ to enable or disablepush notifications on the user server.
Definition: QXmppPushEnableIq.h:39
QXmppPushEnableIq::Mode
Mode
The Mode enum describes whether the IQ should enable or disable push notifications.
Definition: QXmppPushEnableIq.h:51
QXmppIq::operator=
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
Definition: QXmppIq.cpp:68
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:41