QXmpp  Version:1.3.1
QXmppMamIq.h
1 /*
2  * Copyright (C) 2008-2020 The QXmpp developers
3  *
4  * Author:
5  * Niels Ole Salscheider
6  *
7  * Source:
8  * https://github.com/qxmpp-project/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPMAMIQ_H
25 #define QXMPPMAMIQ_H
26 
27 #include "QXmppDataForm.h"
28 #include "QXmppIq.h"
29 #include "QXmppResultSet.h"
30 
31 #include <QSharedDataPointer>
32 
33 class QXmppMamQueryIqPrivate;
34 class QXmppMamResultIqPrivate;
35 
44 class QXmppMamQueryIq : public QXmppIq
45 {
46 public:
49  ~QXmppMamQueryIq();
50 
51  QXmppMamQueryIq &operator=(const QXmppMamQueryIq &);
52 
53  QXmppDataForm form() const;
54  void setForm(const QXmppDataForm &form);
57  QString node() const;
58  void setNode(const QString &node);
59  QString queryId() const;
60  void setQueryId(const QString &id);
61 
62  static bool isMamQueryIq(const QDomElement &element);
63 
64 protected:
65  void parseElementFromChild(const QDomElement &element) override;
66  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
67 
68 private:
69  QSharedDataPointer<QXmppMamQueryIqPrivate> d;
70 };
71 
80 class QXmppMamResultIq : public QXmppIq
81 {
82 public:
86 
87  QXmppMamResultIq &operator=(const QXmppMamResultIq &);
88 
91  bool complete() const;
92  void setComplete(bool complete);
93 
94  static bool isMamResultIq(const QDomElement &element);
95 
96 protected:
97  void parseElementFromChild(const QDomElement &element) override;
98  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
99 
100 private:
101  QSharedDataPointer<QXmppMamResultIqPrivate> d;
102 };
103 
104 #endif
QXmppMamQueryIq::form
QXmppDataForm form() const
Returns the form that specifies the query.
Definition: QXmppMamIq.cpp:52
QXmppMamResultIq
The QXmppMamQueryIq class represents the result IQ for XEP-0313: Message Archive Management.
Definition: QXmppMamIq.h:80
QXmppMamQueryIq::queryId
QString queryId() const
Returns the queryid that will be included in the results.
Definition: QXmppMamIq.cpp:94
QXmppMamResultIq::setResultSetReply
void setResultSetReply(const QXmppResultSetReply &resultSetReply)
Sets the result set reply for result set management.
Definition: QXmppMamIq.cpp:176
QXmppMamQueryIq::setResultSetQuery
void setResultSetQuery(const QXmppResultSetQuery &resultSetQuery)
Definition: QXmppMamIq.cpp:74
QXmppDataForm
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition: QXmppDataForm.h:48
QXmppMamQueryIq::setQueryId
void setQueryId(const QString &id)
Definition: QXmppMamIq.cpp:102
QXmppMamResultIq::resultSetReply
QXmppResultSetReply resultSetReply() const
Returns the result set reply for result set management.
Definition: QXmppMamIq.cpp:170
QXmppResultSetQuery
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition: QXmppResultSet.h:34
QXmppMamResultIq::complete
bool complete() const
Definition: QXmppMamIq.cpp:183
QXmppResultSetReply
The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set ...
Definition: QXmppResultSet.h:68
QXmppMamQueryIq
The QXmppMamQueryIq class represents the query IQ for XEP-0313: Message Archive Management.
Definition: QXmppMamIq.h:44
QXmppMamQueryIq::setForm
void setForm(const QXmppDataForm &form)
Definition: QXmppMamIq.cpp:60
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:41
QXmppMamQueryIq::setNode
void setNode(const QString &node)
Definition: QXmppMamIq.cpp:88
QXmppMamResultIq::setComplete
void setComplete(bool complete)
Definition: QXmppMamIq.cpp:190
QXmppMamQueryIq::resultSetQuery
QXmppResultSetQuery resultSetQuery() const
Returns the result set query for result set management.
Definition: QXmppMamIq.cpp:66
QXmppMamQueryIq::node
QString node() const
Returns the node to query.
Definition: QXmppMamIq.cpp:80