diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-17 10:20:45 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-17 10:20:45 +0200 |
| commit | 83575163cf11cbdc093685bca13fb9de3c3caa24 (patch) | |
| tree | 34fa482533eab489be1ef1e04a6857a7e8f0aeaa /src/client/QXmppArchiveManager.cpp | |
| parent | ac8355268857aa50c3be0fed19edaf654c08b651 (diff) | |
| download | qxmpp-83575163cf11cbdc093685bca13fb9de3c3caa24.tar.gz | |
add full result-set management to retrieveCollection()
Diffstat (limited to 'src/client/QXmppArchiveManager.cpp')
| -rw-r--r-- | src/client/QXmppArchiveManager.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/client/QXmppArchiveManager.cpp b/src/client/QXmppArchiveManager.cpp index 3e3087ec..065e42c8 100644 --- a/src/client/QXmppArchiveManager.cpp +++ b/src/client/QXmppArchiveManager.cpp @@ -61,10 +61,10 @@ bool QXmppArchiveManager::handleStanza(const QDomElement &element) /// Retrieves the list of available collections. Once the results are /// received, the archiveListReceived() signal will be emitted. /// -/// \param jid Optional JID if you only want conversations with a specific JID. +/// \param jid JID you want conversations with. /// \param start Optional start time. /// \param end Optional end time. -/// \param rsm Result Set Management query +/// \param rsm Optional Result Set Management query /// void QXmppArchiveManager::listCollections(const QString& jid, const QDateTime& start, const QDateTime& end, const QXmppResultSetQuery &rsm) @@ -81,10 +81,10 @@ void QXmppArchiveManager::listCollections(const QString& jid, const QDateTime& s /// Retrieves the list of available collections. Once the results are /// received, the archiveListReceived() signal will be emitted. /// -/// \param jid Optional JID if you only want conversations with a specific JID. -/// \param start Optional start time. -/// \param end Optional end time. -/// \param max Optional maximum number of collections to list. +/// \param jid JID you want conversations with. +/// \param start Start time. +/// \param end End time. +/// \param max Maximum number of collections to list. /// void QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max) { @@ -115,13 +115,10 @@ void QXmppArchiveManager::removeCollections(const QString &jid, const QDateTime /// /// \param jid The JID of the collection /// \param start The start time of the collection. -/// \param max Optional maximum number of messages to retrieve. +/// \param rsm Optional Result Set Management query /// -void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, int max) +void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm) { - QXmppResultSetQuery rsm; - rsm.setMax(max); - QXmppArchiveRetrieveIq packet; packet.setResultSetQuery(rsm); packet.setStart(start); @@ -129,6 +126,21 @@ void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime client()->sendPacket(packet); } +/// \overload +/// Retrieves the specified collection. Once the results are received, +/// the archiveChatReceived() will be emitted. +/// +/// \param jid The JID of the collection +/// \param start The start time of the collection. +/// \param max Maximum number of messages to retrieve. +/// +void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, int max) +{ + QXmppResultSetQuery rsm; + rsm.setMax(max); + retrieveCollection(jid, start, rsm); +} + #if 0 void QXmppArchiveManager::getPreferences() { |
