QXmppArchiveManager Class Reference
Managers

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:
[legend]
Collaboration diagram for QXmppArchiveManager:
[legend]

## Signals

void | archiveListReceived (const QList< QXmppArchiveChat > &, const QXmppResultSetReply &rsm=QXmppResultSetReply())
void | archiveChatReceived (const QXmppArchiveChat &, const QXmppResultSetReply &rsm=QXmppResultSetReply())
Signals inherited from QXmppLoggable
void | setGauge (const QString &gauge, double value)
| Sets the given gauge to value.
void | logMessage (QXmppLogger::MessageType type, const QString &msg)
| This signal is emitted to send logging messages.
void | updateCounter (const QString &counter, qint64 amount=1)
| Updates the given counter by amount.

## 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)
Public Member Functions inherited from QXmppClientExtension
| QXmppClientExtension ()
virtual | ~QXmppClientExtension ()
virtual QStringList | discoveryFeatures () const
virtual QList< QXmppDiscoveryIq::Identity > | discoveryIdentities () const
virtual bool | handleStanza (const QDomElement &stanza)=0
| You need to implement this method to process incoming XMPP stanzas. More...
Public Member Functions inherited from QXmppLoggable
| QXmppLoggable (QObject *parent=0)

## Additional Inherited Members

Protected Member Functions inherited from QXmppClientExtension
QXmppClient * | client ()
virtual void | setClient (QXmppClient *client)
Protected Member Functions inherited from QXmppLoggable
void | debug (const QString &message)
void | info (const QString &message)
void | warning (const QString &message)
void | logReceived (const QString &message)
void | logSent (const QString &message)

## 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:

QXmppArchiveManager *manager = new QXmppArchiveManager;
client->addExtension(manager);

Note
  Few servers support message archiving. Check if the server in use supports this XEP.

## Member Function Documentation

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

signal

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

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

signal

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

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

  jid | JID you want conversations with.
  start | Optional start time.
  end | Optional end time.
  rsm | Optional Result Set Management query

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

  jid | JID you want conversations with.
  start | Start time.
  end | End time.
  max | Maximum number of collections to list.

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

Removes the specified collection(s).

Parameters

  jid | The JID of the collection
  start | Optional start time.
  end | Optional end time.

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

  jid | The JID of the collection
  start | The start time of the collection.
  rsm | Optional Result Set Management query

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

  jid | The JID of the collection
  start | The start time of the collection.
  max | Maximum number of messages to retrieve.

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

- QXmppArchiveManager.h
- QXmppArchiveManager.cpp