QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppPushEnableIq.h
1/*
2 * Copyright (C) 2008-2021 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
30class QXmppPushEnableIqPrivate;
31class QXmppDataForm;
32
41class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq
42{
43public:
48
53 enum Mode : bool {
54 Enable = true,
55 Disable = false
56 };
57
58 QString jid() const;
59 void setJid(const QString &jid);
60
61 QString node() const;
62 void setNode(const QString &node);
63
64 void setMode(Mode mode);
65 Mode mode();
66
67 QXmppDataForm dataForm() const;
68 void setDataForm(const QXmppDataForm &form);
69
70 static bool isPushEnableIq(const QDomElement &element);
71
72protected:
74 void parseElementFromChild(const QDomElement &element) override;
75 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
77
78private:
79 QSharedDataPointer<QXmppPushEnableIqPrivate> d;
80};
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition QXmppDataForm.h:49
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:42
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
Definition QXmppIq.cpp:68
This class represents an IQ to enable or disablepush notifications on the user server.
Definition QXmppPushEnableIq.h:42
Mode
The Mode enum describes whether the IQ should enable or disable push notifications.
Definition QXmppPushEnableIq.h:53