Loading...
Searching...
No Matches
QXmppArchiveIq.h
// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPARCHIVEIQ_H
#define QXMPPARCHIVEIQ_H
#include "QXmppIq.h"
#include "QXmppResultSet.h"
#include <QDateTime>
class QXMPP_EXPORT QXmppArchiveMessage
{
public:
QXmppArchiveMessage();
QString body() const;
void setBody(const QString &body);
QDateTime date() const;
void setDate(const QDateTime &date);
bool isReceived() const;
void setReceived(bool isReceived);
private:
QString m_body;
QDateTime m_date;
bool m_received;
};
class QXMPP_EXPORT QXmppArchiveChat
{
public:
QXmppArchiveChat();
QList<QXmppArchiveMessage> messages() const;
void setMessages(const QList<QXmppArchiveMessage> &messages);
QDateTime start() const;
void setStart(const QDateTime &start);
QString subject() const;
void setSubject(const QString &subject);
QString thread() const;
void setThread(const QString &thread);
int version() const;
void setVersion(int version);
QString with() const;
void setWith(const QString &with);
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer, const QXmppResultSetReply &rsm = QXmppResultSetReply()) const;
private:
QList<QXmppArchiveMessage> m_messages;
QDateTime m_start;
QString m_subject;
QString m_thread;
int m_version;
QString m_with;
};
class QXMPP_EXPORT QXmppArchiveChatIq : public QXmppIq
{
public:
QXmppArchiveChat chat() const;
void setChat(const QXmppArchiveChat &chat);
QXmppResultSetReply resultSetReply() const;
void setResultSetReply(const QXmppResultSetReply &rsm);
static bool isArchiveChatIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QXmppArchiveChat m_chat;
QXmppResultSetReply m_rsmReply;
};
class QXMPP_EXPORT QXmppArchiveListIq : public QXmppIq
{
public:
QXmppArchiveListIq();
QList<QXmppArchiveChat> chats() const;
void setChats(const QList<QXmppArchiveChat> &chats);
QString with() const;
void setWith(const QString &with);
QDateTime start() const;
void setStart(const QDateTime &start);
QDateTime end() const;
void setEnd(const QDateTime &end);
QXmppResultSetQuery resultSetQuery() const;
void setResultSetQuery(const QXmppResultSetQuery &rsm);
QXmppResultSetReply resultSetReply() const;
void setResultSetReply(const QXmppResultSetReply &rsm);
static bool isArchiveListIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QString m_with;
QDateTime m_start;
QDateTime m_end;
QList<QXmppArchiveChat> m_chats;
QXmppResultSetQuery m_rsmQuery;
QXmppResultSetReply m_rsmReply;
};
class QXMPP_EXPORT QXmppArchiveRemoveIq : public QXmppIq
{
public:
QString with() const;
void setWith(const QString &with);
QDateTime start() const;
void setStart(const QDateTime &start);
QDateTime end() const;
void setEnd(const QDateTime &end);
static bool isArchiveRemoveIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QString m_with;
QDateTime m_start;
QDateTime m_end;
};
class QXMPP_EXPORT QXmppArchiveRetrieveIq : public QXmppIq
{
public:
QXmppArchiveRetrieveIq();
QDateTime start() const;
void setStart(const QDateTime &start);
QString with() const;
void setWith(const QString &with);
QXmppResultSetQuery resultSetQuery() const;
void setResultSetQuery(const QXmppResultSetQuery &rsm);
static bool isArchiveRetrieveIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QString m_with;
QDateTime m_start;
QXmppResultSetQuery m_rsmQuery;
};
class QXMPP_EXPORT QXmppArchivePrefIq : public QXmppIq
{
public:
static bool isArchivePrefIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
};
#endif // QXMPPARCHIVEIQ_H
QXmppArchiveChatIq
Represents an archive chat as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:83
QXmppArchiveChat
The QXmppArchiveChat class represents an archived conversation as defined by XEP-0136: Message Archiv...
Definition QXmppArchiveIq.h:40
QXmppArchiveListIq
Represents an archive list as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:109
QXmppArchiveMessage
The QXmppArchiveMessage class represents an archived message as defined by XEP-0136: Message Archivin...
Definition QXmppArchiveIq.h:17
QXmppArchivePrefIq
Represents an archive preference IQ as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:217
QXmppArchiveRemoveIq
Represents an archive remove IQ as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:155
QXmppArchiveRetrieveIq
Represents an archive retrieve IQ as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:185
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
QXmppResultSetQuery
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:16
QXmppResultSetReply
The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:50