QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppMamManager.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Niels Ole Salscheider
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPMAMMANAGER_H
25#define QXMPPMAMMANAGER_H
26
27#include "QXmppClientExtension.h"
28#include "QXmppResultSet.h"
29
30#include <QDateTime>
31
32class QXmppMessage;
33
50class QXMPP_EXPORT QXmppMamManager : public QXmppClientExtension
51{
52 Q_OBJECT
53
54public:
55 QString retrieveArchivedMessages(const QString &to = QString(),
56 const QString &node = QString(),
57 const QString &jid = QString(),
58 const QDateTime &start = QDateTime(),
59 const QDateTime &end = QDateTime(),
60 const QXmppResultSetQuery &resultSetQuery = QXmppResultSetQuery());
61
63 QStringList discoveryFeatures() const override;
64 bool handleStanza(const QDomElement &element) override;
66
67Q_SIGNALS:
69 void archivedMessageReceived(const QString &queryId,
70 const QXmppMessage &message);
71
73 void resultsRecieved(const QString &queryId,
74 const QXmppResultSetReply &resultSetReply,
75 bool complete);
76};
77
78#endif
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:47
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:54
virtual bool handleStanza(const QDomElement &stanza)=0
You need to implement this method to process incoming XMPP stanzas.
The QXmppMamManager class makes it possible to access message archives as defined by XEP-0313: Messag...
Definition QXmppMamManager.h:51
void resultsRecieved(const QString &queryId, const QXmppResultSetReply &resultSetReply, bool complete)
This signal is emitted when all results for a request have been received.
void archivedMessageReceived(const QString &queryId, const QXmppMessage &message)
This signal is emitted when an archived message is received.
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:46
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:35
The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:69