Loading...
Searching...
No Matches
QXmppResultSet.h
// SPDX-FileCopyrightText: 2012 Oliver Goffart <ogoffart@woboq.com>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPRESULTSET_H
#define QXMPPRESULTSET_H
#include "QXmppConstants_p.h"
#include "QXmppStanza.h"
#include <QDateTime>
class QXMPP_EXPORT QXmppResultSetQuery
{
public:
QXmppResultSetQuery();
int max() const;
void setMax(int max);
int index() const;
void setIndex(int index);
QString before() const;
void setBefore(const QString &before);
QString after() const;
void setAfter(const QString &after);
bool isNull() const;
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
private:
int m_index;
int m_max;
QString m_after;
QString m_before;
};
class QXMPP_EXPORT QXmppResultSetReply
{
public:
QXmppResultSetReply();
QString first() const;
void setFirst(const QString &first);
QString last() const;
void setLast(const QString &last);
int count() const;
void setCount(int count);
int index() const;
void setIndex(int index);
bool isNull() const;
static constexpr std::tuple XmlTag = { u"set", QXmpp::Private::ns_rsm };
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
private:
int m_count;
int m_index;
QString m_first;
QString m_last;
};
#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