QXmpp: QXmppResultSet.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
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{
19public:
20 QXmppResultSetQuery();
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
41private:
42 int m_index;
43 int m_max;
44 QString m_after;
45 QString m_before;
46};
47
52 class QXMPP_EXPORT QXmppResultSetReply
53{
54public:
55 QXmppResultSetReply();
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
77private:
78 int m_count;
79 int m_index;
80 QString m_first;
81 QString m_last;
82};
83
84#endif // QXMPPRESULTSET_H
QXmppResultSetQuery::isNull
bool isNull() const
Returns true if no result set information is present.
Definition QXmppResultSet.cpp:115
QXmppResultSetQuery::after
QString after() const
Definition QXmppResultSet.cpp:99
QXmppResultSetQuery::setBefore
void setBefore(const QString &before)
Definition QXmppResultSet.cpp:89
QXmppResultSetQuery::setMax
void setMax(int max)
Definition QXmppResultSet.cpp:49
QXmppResultSetQuery::max
int max() const
Definition QXmppResultSet.cpp:39
QXmppResultSetQuery::setIndex
void setIndex(int index)
Definition QXmppResultSet.cpp:69
QXmppResultSetQuery::index
int index() const
Definition QXmppResultSet.cpp:59
QXmppResultSetQuery::before
QString before() const
Definition QXmppResultSet.cpp:79
QXmppResultSetQuery::setAfter
void setAfter(const QString &after)
Definition QXmppResultSet.cpp:109
QXmppResultSetReply::last
QString last() const
Returns the UID of the last result in the page.
Definition QXmppResultSet.cpp:166
QXmppResultSetReply::first
QString first() const
Returns the UID of the first result in the page.
Definition QXmppResultSet.cpp:154
QXmppResultSetReply::setFirst
void setFirst(const QString &first)
Sets the UID of the first result in the page.
Definition QXmppResultSet.cpp:160
QXmppResultSetReply::count
int count() const
Definition QXmppResultSet.cpp:182
QXmppResultSetReply::isNull
bool isNull() const
Returns true if no result set information is present.
Definition QXmppResultSet.cpp:222
QXmppResultSetReply::index
int index() const
Definition QXmppResultSet.cpp:204
QXmppResultSetReply::setCount
void setCount(int count)
Definition QXmppResultSet.cpp:192
QXmppResultSetReply::setLast
void setLast(const QString &last)
Sets the UID of the last result in the page.
Definition QXmppResultSet.cpp:172
QXmppResultSetReply::setIndex
void setIndex(int index)
Definition QXmppResultSet.cpp:216