QXmpp  Version:1.0.0
QXmppMamIq.h
1 /*
2  * Copyright (C) 2008-2019 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 "QXmppIq.h"
28 #include "QXmppDataForm.h"
29 #include "QXmppResultSet.h"
30 
33 class QXmppMamQueryIq : public QXmppIq
34 {
35 public:
37 
38  QXmppDataForm form() const;
39  void setForm(const QXmppDataForm &form);
42  QString node() const;
43  void setNode(const QString &node);
44  QString queryId() const;
45  void setQueryId(const QString &id);
46 
47  static bool isMamQueryIq(const QDomElement &element);
48 
49 protected:
50  void parseElementFromChild(const QDomElement &element);
51  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
52 
53 private:
54  QXmppDataForm m_form;
55  QXmppResultSetQuery m_resultSetQuery;
56  QString m_node;
57  QString m_queryId;
58 };
59 
62 class QXmppMamResultIq : public QXmppIq
63 {
64 public:
66 
69  bool complete() const;
70  void setComplete(bool complete);
71 
72  static bool isMamResultIq(const QDomElement &element);
73 
74 protected:
75  void parseElementFromChild(const QDomElement &element);
76  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
77 
78 private:
79  QXmppResultSetReply m_resultSetReply;
80  bool m_complete;
81 };
82 
83 #endif
QXmppMamQueryIq::form
QXmppDataForm form() const
Returns the form that specifies the query.
Definition: QXmppMamIq.cpp:34
QXmppMamResultIq
The QXmppMamQueryIq class represents the result IQ for XEP-0313: Message Archive Management.
Definition: QXmppMamIq.h:62
QXmppMamQueryIq::queryId
QString queryId() const
Returns the queryid that will be included in the results.
Definition: QXmppMamIq.cpp:76
QXmppMamResultIq::setResultSetReply
void setResultSetReply(const QXmppResultSetReply &resultSetReply)
Sets the result set reply for result set management.
Definition: QXmppMamIq.cpp:144
QXmppMamQueryIq::setResultSetQuery
void setResultSetQuery(const QXmppResultSetQuery &resultSetQuery)
Definition: QXmppMamIq.cpp:56
QXmppDataForm
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition: QXmppDataForm.h:40
QXmppMamQueryIq::setQueryId
void setQueryId(const QString &id)
Definition: QXmppMamIq.cpp:84
QXmppMamResultIq::resultSetReply
QXmppResultSetReply resultSetReply() const
Returns the result set reply for result set management.
Definition: QXmppMamIq.cpp:138
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:151
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:33
QXmppMamQueryIq::setForm
void setForm(const QXmppDataForm &form)
Definition: QXmppMamIq.cpp:42
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:42
QXmppMamQueryIq::setNode
void setNode(const QString &node)
Definition: QXmppMamIq.cpp:70
QXmppMamResultIq::setComplete
void setComplete(bool complete)
Definition: QXmppMamIq.cpp:158
QXmppMamQueryIq::resultSetQuery
QXmppResultSetQuery resultSetQuery() const
Returns the result set query for result set management.
Definition: QXmppMamIq.cpp:48
QXmppMamQueryIq::node
QString node() const
Returns the node to query.
Definition: QXmppMamIq.cpp:62