From d4718ed72ea2610b8cd584ea82016c8fc0fda2de Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Tue, 17 Jul 2012 10:01:50 +0200 Subject: add some documentation to QXmppResultSetQuery/Reply --- src/base/QXmppResultSet.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'src/base/QXmppResultSet.cpp') diff --git a/src/base/QXmppResultSet.cpp b/src/base/QXmppResultSet.cpp index 5d41e901..ecf11bbe 100644 --- a/src/base/QXmppResultSet.cpp +++ b/src/base/QXmppResultSet.cpp @@ -35,11 +35,22 @@ QXmppResultSetQuery::QXmppResultSetQuery() , m_max(-1) {} +/// Returns the maximum number of results. +/// +/// \note -1 means no limit, 0 means no results are wanted. +/// + int QXmppResultSetQuery::max() const { return m_max; } +/// Sets the maximum number of results. +/// +/// \note -1 means no limit, 0 means no results are wanted. +/// +/// \param max + void QXmppResultSetQuery::setMax(int max) { m_max = max; @@ -55,21 +66,37 @@ void QXmppResultSetQuery::setIndex(int index) m_index=index; } +/// Returns the UID of the first result in the next page. +/// +/// This is used for for paging backwards through results. + QString QXmppResultSetQuery::before() const { return m_before; } +/// Sets the UID of the first result in the next page. +/// +/// This is used for for paging backwards through results. + void QXmppResultSetQuery::setBefore(const QString& before) { m_before=before; } +/// Returns the UID of the last result in the previous page. +/// +/// This is used for for paging forwards through results. + QString QXmppResultSetQuery::after() const { return m_after; } +/// Sets the UID of the last result in the previous page. +/// +/// This is used for for paging forwards through results. + void QXmppResultSetQuery::setAfter(const QString& after) { m_after=after; @@ -116,31 +143,47 @@ QXmppResultSetReply::QXmppResultSetReply() , m_index(-1) {} +/// Returns the UID of the first result in the set. + QString QXmppResultSetReply::first() const { return m_first; } +/// Sets the UID of the first result in the set. + void QXmppResultSetReply::setFirst(const QString& first) { m_first=first; } +/// Returns the UID of the last result in the set. + QString QXmppResultSetReply::last() const { return m_last; } +/// Sets the UID of the last result in the set. + void QXmppResultSetReply::setLast(const QString& last) { m_last=last; } +/// Returns the number of items in the set. +/// +/// \note This may be an approximate count. + int QXmppResultSetReply::count() const { return m_count; } +/// Sets the number of items in the set. +/// +/// \note This may be an approximate count. + void QXmppResultSetReply::setCount(int count) { m_count = count; @@ -153,7 +196,7 @@ int QXmppResultSetReply::index() const void QXmppResultSetReply::setIndex(int index) { - m_index=index; + m_index = index; } bool QXmppResultSetReply::isNull() const -- cgit v1.2.3