QXmpp: QXmppMamIq.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppMamIq.h
1// SPDX-FileCopyrightText: 2016 Niels Ole Salscheider <niels_ole@salscheider-online.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPMAMIQ_H
6#define QXMPPMAMIQ_H
7
8#include "QXmppDataForm.h"
9#include "QXmppIq.h"
10#include "QXmppResultSet.h"
11
12#include <QSharedDataPointer>
13
14class QXmppMamQueryIqPrivate;
15class QXmppMamResultIqPrivate;
16
17 class QXMPP_EXPORT QXmppMamQueryIq : public QXmppIq
18{
19public:
20 QXmppMamQueryIq();
21 QXmppMamQueryIq(const QXmppMamQueryIq &);
22 QXmppMamQueryIq(QXmppMamQueryIq &&);
23 ~QXmppMamQueryIq() override;
24
25 QXmppMamQueryIq &operator=(const QXmppMamQueryIq &);
26 QXmppMamQueryIq &operator=(QXmppMamQueryIq &&);
27
28 QXmppDataForm form() const;
29 void setForm(const QXmppDataForm &form);
30 QXmppResultSetQuery resultSetQuery() const;
31 void setResultSetQuery(const QXmppResultSetQuery &resultSetQuery);
32 QString node() const;
33 void setNode(const QString &node);
34 QString queryId() const;
35 void setQueryId(const QString &id);
36
38 static constexpr std::tuple PayloadXmlTag = { u"query", QXmpp::Private::ns_mam };
39 [[deprecated("Use QXmpp::isIqElement()")]]
40 static bool isMamQueryIq(const QDomElement &element);
41
42protected:
43 void parseElementFromChild(const QDomElement &element) override;
44 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
46
47private:
48 QSharedDataPointer<QXmppMamQueryIqPrivate> d;
49};
50
51class QXMPP_EXPORT QXmppMamResultIq : public QXmppIq
52{
53public:
54 QXmppMamResultIq();
55 QXmppMamResultIq(const QXmppMamResultIq &);
56 QXmppMamResultIq(QXmppMamResultIq &&);
57 ~QXmppMamResultIq() override;
58
59 QXmppMamResultIq &operator=(const QXmppMamResultIq &);
60 QXmppMamResultIq &operator=(QXmppMamResultIq &&);
61
62 QXmppResultSetReply resultSetReply() const;
63 void setResultSetReply(const QXmppResultSetReply &resultSetReply);
64 bool complete() const;
65 void setComplete(bool complete);
66
68 static constexpr std::tuple PayloadXmlTag = { u"fin", QXmpp::Private::ns_mam };
69 [[deprecated("Use QXmpp::isIqElement()")]]
70 static bool isMamResultIq(const QDomElement &element);
71
72protected:
73 void parseElementFromChild(const QDomElement &element) override;
74 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
76
77private:
78 QSharedDataPointer<QXmppMamResultIqPrivate> d;
79};
80
81#endif
QXmppDataForm
Definition QXmppDataForm.h:28
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppIq::operator=
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
QXmppMamQueryIq::setResultSetQuery
void setResultSetQuery(const QXmppResultSetQuery &resultSetQuery)
Definition QXmppMamIq.cpp:84
QXmppMamQueryIq::QXmppMamQueryIq
QXmppMamQueryIq(QXmppMamQueryIq &&)
Default move constructor.
QXmppMamQueryIq::QXmppMamQueryIq
QXmppMamQueryIq(const QXmppMamQueryIq &)
Default copy constructor.
QXmppMamQueryIq::operator=
QXmppMamQueryIq & operator=(const QXmppMamQueryIq &)
Default assignemnt operator.
QXmppMamQueryIq::queryId
QString queryId() const
Definition QXmppMamIq.cpp:110
QXmppMamQueryIq::operator=
QXmppMamQueryIq & operator=(QXmppMamQueryIq &&)
Default move-assignemnt operator.
QXmppMamQueryIq::setForm
void setForm(const QXmppDataForm &form)
Definition QXmppMamIq.cpp:66
QXmppMamQueryIq::setQueryId
void setQueryId(const QString &id)
Definition QXmppMamIq.cpp:120
QXmppMamQueryIq::resultSetQuery
QXmppResultSetQuery resultSetQuery() const
Definition QXmppMamIq.cpp:74
QXmppMamQueryIq::node
QString node() const
Definition QXmppMamIq.cpp:92
QXmppMamQueryIq::setNode
void setNode(const QString &node)
Definition QXmppMamIq.cpp:102
QXmppMamQueryIq::form
QXmppDataForm form() const
Definition QXmppMamIq.cpp:56
QXmppResultSetQuery
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:18