QXmpp Version: 1.13.0
Loading...
Searching...
No Matches
QXmppArchiveManager Class Reference

The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveManager.h>

Inheritance diagram for QXmppArchiveManager:
Collaboration diagram for QXmppArchiveManager:

Public Member Functions

void listCollections (const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime(), const QXmppResultSetQuery &rsm=QXmppResultSetQuery())
void listCollections (const QString &jid, const QDateTime &start, const QDateTime &end, int max)
void removeCollections (const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime())
void retrieveCollection (const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm=QXmppResultSetQuery())
void retrieveCollection (const QString &jid, const QDateTime &start, int max)
Q_SIGNAL void archiveListReceived (const QList< QXmppArchiveChat > &, const QXmppResultSetReply &rsm=QXmppResultSetReply())
Q_SIGNAL void archiveChatReceived (const QXmppArchiveChat &, const QXmppResultSetReply &rsm=QXmppResultSetReply())
Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList< QXmppDiscoIdentitydiscoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)
 You need to implement this method to process incoming XMPP stanzas.
virtual bool handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
 You need to implement this method to process incoming XMPP stanzas.
Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=nullptr)
Q_SIGNAL void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
Q_SIGNAL void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
Q_SIGNAL void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Additional Inherited Members

Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient () const
virtual void setClient (QXmppClient *client)
virtual void onRegistered (QXmppClient *client)
virtual void onUnregistered (QXmppClient *client)
void injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
bool injectMessage (QXmppMessage &&message)
Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
 Logs a debugging message.
void info (const QString &message)
 Logs an informational message.
void warning (const QString &message)
 Logs a warning message.
void logReceived (const QString &message)
 Logs a received packet.
void logSent (const QString &message)
 Logs a sent packet.

Detailed Description

The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Message Archiving.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

client->addExtension(manager);
The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Me...
Definition QXmppArchiveManager.h:31
QXmppClient * client() const
Definition QXmppClientExtension.cpp:57
Note
Few servers support message archiving. Check if the server in use supports this XEP.

Member Function Documentation

◆ archiveChatReceived()

Q_SIGNAL void QXmppArchiveManager::archiveChatReceived ( const QXmppArchiveChat & ,
const QXmppResultSetReply & rsm = QXmppResultSetReply() )

This signal is emitted when archive chat is received after calling retrieveCollection()

◆ archiveListReceived()

Q_SIGNAL void QXmppArchiveManager::archiveListReceived ( const QList< QXmppArchiveChat > & ,
const QXmppResultSetReply & rsm = QXmppResultSetReply() )

This signal is emitted when archive list is received after calling listCollections()

◆ listCollections() [1/2]

void QXmppArchiveManager::listCollections ( const QString & jid,
const QDateTime & start,
const QDateTime & end,
int max )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Retrieves the list of available collections. Once the results are received, the archiveListReceived() signal will be emitted.

Parameters
jidJID you want conversations with.
startStart time.
endEnd time.
maxMaximum number of collections to list.

◆ listCollections() [2/2]

void QXmppArchiveManager::listCollections ( const QString & jid,
const QDateTime & start = QDateTime(),
const QDateTime & end = QDateTime(),
const QXmppResultSetQuery & rsm = QXmppResultSetQuery() )

Retrieves the list of available collections. Once the results are received, the archiveListReceived() signal will be emitted.

Parameters
jidJID you want conversations with.
startOptional start time.
endOptional end time.
rsmOptional Result Set Management query

◆ removeCollections()

void QXmppArchiveManager::removeCollections ( const QString & jid,
const QDateTime & start = QDateTime(),
const QDateTime & end = QDateTime() )

Removes the specified collection(s).

Parameters
jidThe JID of the collection
startOptional start time.
endOptional end time.

◆ retrieveCollection() [1/2]

void QXmppArchiveManager::retrieveCollection ( const QString & jid,
const QDateTime & start,
const QXmppResultSetQuery & rsm = QXmppResultSetQuery() )

Retrieves the specified collection. Once the results are received, the archiveChatReceived() will be emitted.

Parameters
jidThe JID of the collection
startThe start time of the collection.
rsmOptional Result Set Management query

◆ retrieveCollection() [2/2]

void QXmppArchiveManager::retrieveCollection ( const QString & jid,
const QDateTime & start,
int max )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Retrieves the specified collection. Once the results are received, the archiveChatReceived() will be emitted.

Parameters
jidThe JID of the collection
startThe start time of the collection.
maxMaximum number of messages to retrieve.

The documentation for this class was generated from the following files: