QXmpp  Version:1.2.0
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 
38 class QXmppMamQueryIq : public QXmppIq
39 {
40 public:
43  ~QXmppMamQueryIq();
44 
45  QXmppMamQueryIq &operator=(const QXmppMamQueryIq &);
46 
47  QXmppDataForm form() const;
48  void setForm(const QXmppDataForm &form);
51  QString node() const;
52  void setNode(const QString &node);
53  QString queryId() const;
54  void setQueryId(const QString &id);
55 
56  static bool isMamQueryIq(const QDomElement &element);
57 
58 protected:
59  void parseElementFromChild(const QDomElement &element) override;
60  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
61 
62 private:
63  QSharedDataPointer<QXmppMamQueryIqPrivate> d;
64 };
65 
68 class QXmppMamResultIq : public QXmppIq
69 {
70 public:
74 
75  QXmppMamResultIq &operator=(const QXmppMamResultIq &);
76 
79  bool complete() const;
80  void setComplete(bool complete);
81 
82  static bool isMamResultIq(const QDomElement &element);
83 
84 protected:
85  void parseElementFromChild(const QDomElement &element) override;
86  void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
87 
88 private:
89  QSharedDataPointer<QXmppMamResultIqPrivate> d;
90 };
91 
92 #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:68
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:47
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:38
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