QXmpp  Version: 1.15.1
QXmppResultSet.h
1 // SPDX-FileCopyrightText: 2012 Oliver Goffart <ogoffart@woboq.com>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPRESULTSET_H
6 #define QXMPPRESULTSET_H
7 
8 #include "QXmppConstants_p.h"
9 #include "QXmppStanza.h"
10 
11 #include <QDateTime>
12 
17 class QXMPP_EXPORT QXmppResultSetQuery
18 {
19 public:
21 
22  int max() const;
23  void setMax(int max);
24 
25  int index() const;
26  void setIndex(int index);
27 
28  QString before() const;
29  void setBefore(const QString &before);
30 
31  QString after() const;
32  void setAfter(const QString &after);
33 
34  bool isNull() const;
35 
37  void parse(const QDomElement &element);
38  void toXml(QXmlStreamWriter *writer) const;
40 
41 private:
42  int m_index;
43  int m_max;
44  QString m_after;
45  QString m_before;
46 };
47 
52 class QXMPP_EXPORT QXmppResultSetReply
53 {
54 public:
56 
57  QString first() const;
58  void setFirst(const QString &first);
59 
60  QString last() const;
61  void setLast(const QString &last);
62 
63  int count() const;
64  void setCount(int count);
65 
66  int index() const;
67  void setIndex(int index);
68 
69  bool isNull() const;
70 
72  static constexpr std::tuple XmlTag = { u"set", QXmpp::Private::ns_rsm };
73  void parse(const QDomElement &element);
74  void toXml(QXmlStreamWriter *writer) const;
76 
77 private:
78  int m_count;
79  int m_index;
80  QString m_first;
81  QString m_last;
82 };
83 
84 #endif // QXMPPRESULTSET_H
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition: QXmppResultSet.h:17
The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set ...
Definition: QXmppResultSet.h:52