QXmpp::Mam::Query Struct
struct QXmpp::Mam::Query| Header: | #include <QXmppMamManager.h> |
| Since: | QXmpp 1.18 |
Public Variables
| QList<QXmppDataForm::Field> | additionalFields |
| QString | afterId |
| QString | beforeId |
| QDateTime | end |
| bool | flipPage |
| QList<QString> | ids |
| std::optional<bool> | includeGroupchat |
| QString | node |
| QXmppResultSetQuery | resultSetQuery |
| QDateTime | start |
| QXmpp::Jid | to |
| QXmpp::Jid | with |
Detailed Description
Archive query of QXmppMamManager::retrieve().
Member Variable Documentation
QList<QXmppDataForm::Field> Query::additionalFields
Further fields of the query form, e.g. fields specific to a server. The fields supported by an archive can be requested using QXmppMamManager::requestQueryForm().
QString Query::afterId
Only returns messages after the message with this archive ID if set. Together with beforeId, the messages between two known messages can be retrieved.
This requires the archive to support QXmpp::Namespace::Mam2Extended. The query fails with QXmppStanza::Error::ItemNotFound if the archive does not contain the message.
QString Query::beforeId
Only returns messages before the message with this archive ID if set. In contrast to QXmppResultSetQuery::before(), this does not page backwards through the results.
This requires the archive to support QXmpp::Namespace::Mam2Extended. The query fails with QXmppStanza::Error::ItemNotFound if the archive does not contain the message.
QDateTime Query::end
Only returns messages before this time if valid.
bool Query::flipPage
Whether the archive should send the messages of the page in reverse order, i.e. the newest message first. This can be used to show the newest messages first via the QXmpp::Mam::MessageReceived hook when loading older messages. It does not change which messages are returned and the messages of QXmpp::Mam::Page are still in chronological order.
This requires the archive to support QXmpp::Namespace::Mam2Extended. Other archives may ignore it, the QXmpp::Mam::MessageReceived hook then gets the oldest message first. The order of QXmpp::Mam::Page::messages is checked against the result set reply, so it is chronological either way, unless the archive sends no result set reply.
QList<QString> Query::ids
Only returns the messages with these archive IDs if set.
This requires the archive to support QXmpp::Namespace::Mam2Extended. The query fails with QXmppStanza::Error::ItemNotFound if the archive does not contain one of the messages.
std::optional<bool> Query::includeGroupchat
Whether messages of type groupchat should be returned from the archive of the account. If unset, it depends on the server whether they are returned.
This must only be set if the archive supports QXmpp::Namespace::Mam2GroupchatField. Servers that store groupchat messages in the archive of the account support QXmpp::Namespace::Mam2GroupchatAvailable.
QString Query::node
The PubSub node to query, usually empty.
QXmppResultSetQuery Query::resultSetQuery
Limits the number of results and pages through the archive (XEP-0059: Result Set Management).
QDateTime Query::start
Only returns messages after this time if valid.
QXmpp::Jid Query::to
The archive to query, null for the archive of the own account.
QXmpp::Jid Query::with
Only returns messages exchanged with this JID if set.