QXmpp: QXmppPushEnableIq.h Source File

QXmpp Version: 1.14.4

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
23 class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq
24{
25public:
26 QXmppPushEnableIq();
27 QXmppPushEnableIq(const QXmppPushEnableIq &);
28 QXmppPushEnableIq(QXmppPushEnableIq &&);
29 ~QXmppPushEnableIq() override;
30 QXmppPushEnableIq &operator=(const QXmppPushEnableIq &);
31 QXmppPushEnableIq &operator=(QXmppPushEnableIq &&);
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
QXmppDataForm
Definition QXmppDataForm.h:28
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppPushEnableIq::QXmppPushEnableIq
QXmppPushEnableIq(const QXmppPushEnableIq &)
Default copy-constructor.
QXmppPushEnableIq::operator=
QXmppPushEnableIq & operator=(const QXmppPushEnableIq &)
Default assignment operator.
QXmppPushEnableIq::QXmppPushEnableIq
QXmppPushEnableIq(QXmppPushEnableIq &&)
Default move-constructor.
QXmppPushEnableIq::Mode
Mode
The Mode enum describes whether the IQ should enable or disable push notifications.
Definition QXmppPushEnableIq.h:37
QXmppPushEnableIq::operator=
QXmppPushEnableIq & operator=(QXmppPushEnableIq &&)
Default move-assignment operator.