QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
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
12class QXmppPushEnableIqPrivate;
13class QXmppDataForm;
14
23class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq
24{
25public:
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
56protected:
58 void parseElementFromChild(const QDomElement &element) override;
59 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
61
62private:
63 QSharedDataPointer<QXmppPushEnableIqPrivate> d;
64};
65
66#endif // QXMPPPUSHENABLEIQ_H
Definition QXmppDataForm.h:27
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
This class represents an IQ to enable or disablepush notifications on the user server.
Definition QXmppPushEnableIq.h:24
QXmppPushEnableIq(const QXmppPushEnableIq &)
Default copy-constructor.
QXmppPushEnableIq & operator=(const QXmppPushEnableIq &)
Default assignment operator.
QXmppPushEnableIq(QXmppPushEnableIq &&)
Default move-constructor.
Mode
The Mode enum describes whether the IQ should enable or disable push notifications.
Definition QXmppPushEnableIq.h:37
QXmppPushEnableIq & operator=(QXmppPushEnableIq &&)
Default move-assignment operator.