5#ifndef QXMPPARCHIVEIQ_H
6#define QXMPPARCHIVEIQ_H
9#include "QXmppResultSet.h"
17class QXMPP_EXPORT QXmppArchiveMessage
20 QXmppArchiveMessage();
25 QDateTime
date()
const;
41class QXMPP_EXPORT QXmppArchiveChat
46 QList<QXmppArchiveMessage>
messages()
const;
49 QDateTime
start()
const;
65 static constexpr std::tuple XmlTag = { u
"chat", QXmpp::Private::ns_archive };
66 void parse(
const QDomElement &element);
67 void toXml(QXmlStreamWriter *writer)
const { toXml(writer, {}); }
72 QList<QXmppArchiveMessage> m_messages;
97 static constexpr std::tuple PayloadXmlTag = { u
"chat", QXmpp::Private::ns_archive };
98 [[deprecated(
"Use QXmpp::isIqElement()")]]
99 static bool isArchiveChatIq(
const QDomElement &element);
102 void parseElementFromChild(
const QDomElement &element)
override;
103 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
121 QList<QXmppArchiveChat>
chats()
const;
124 QString
with()
const;
127 QDateTime
start()
const;
130 QDateTime
end()
const;
140 static constexpr std::tuple PayloadXmlTag = { u
"list", QXmpp::Private::ns_archive };
141 [[deprecated(
"Use QXmpp::isIqElement()")]]
142 static bool isArchiveListIq(
const QDomElement &element);
147 void parseElementFromChild(
const QDomElement &element)
override;
148 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
155 QList<QXmppArchiveChat> m_chats;
168 QString
with()
const;
171 QDateTime
start()
const;
174 QDateTime
end()
const;
178 static constexpr std::tuple PayloadXmlTag = { u
"remove", QXmpp::Private::ns_archive };
179 [[deprecated(
"Use QXmpp::isIqElement()")]]
180 static bool isArchiveRemoveIq(
const QDomElement &element);
183 void parseElementFromChild(
const QDomElement &element)
override;
184 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
198class QXMPP_EXPORT QXmppArchiveRetrieveIq :
public QXmppIq
201 QXmppArchiveRetrieveIq();
203 QDateTime
start()
const;
206 QString
with()
const;
213 static constexpr std::tuple PayloadXmlTag = { u
"retrieve", QXmpp::Private::ns_archive };
214 [[deprecated(
"Use QXmpp::isIqElement()")]]
215 static bool isArchiveRetrieveIq(
const QDomElement &element);
218 void parseElementFromChild(
const QDomElement &element)
override;
219 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
237 static constexpr std::tuple PayloadXmlTag = { u
"pref", QXmpp::Private::ns_archive };
238 [[deprecated(
"Use QXmpp::isIqElement()")]]
239 static bool isArchivePrefIq(
const QDomElement &element);
242 void parseElementFromChild(
const QDomElement &element)
override;
243 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
Represents an archive chat as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:88
QXmppResultSetReply resultSetReply() const
Definition QXmppArchiveIq.cpp:204
void setResultSetReply(const QXmppResultSetReply &rsm)
Definition QXmppArchiveIq.cpp:214
QXmppArchiveChat chat() const
Returns the chat conversation carried by this IQ.
Definition QXmppArchiveIq.cpp:188
void setChat(const QXmppArchiveChat &chat)
Sets the chat conversation carried by this IQ.
Definition QXmppArchiveIq.cpp:194
The QXmppArchiveChat class represents an archived conversation as defined by XEP-0136: Message Archiv...
Definition QXmppArchiveIq.h:42
void setVersion(int version)
Sets the conversation's version.
Definition QXmppArchiveIq.cpp:170
int version() const
Returns the conversation's version.
Definition QXmppArchiveIq.cpp:164
QString subject() const
Returns the conversation's subject.
Definition QXmppArchiveIq.cpp:140
QString thread() const
Returns the conversation's thread.
Definition QXmppArchiveIq.cpp:152
void setThread(const QString &thread)
Sets the conversation's thread.
Definition QXmppArchiveIq.cpp:158
void setStart(const QDateTime &start)
Sets the start of this conversation.
Definition QXmppArchiveIq.cpp:134
QList< QXmppArchiveMessage > messages() const
Returns the conversation's messages.
Definition QXmppArchiveIq.cpp:116
QDateTime start() const
Returns the start of this conversation.
Definition QXmppArchiveIq.cpp:128
void setWith(const QString &with)
Sets the JID of the remote party.
Definition QXmppArchiveIq.cpp:182
QString with() const
Returns the JID of the remote party.
Definition QXmppArchiveIq.cpp:176
void setSubject(const QString &subject)
Sets the conversation's subject.
Definition QXmppArchiveIq.cpp:146
void setMessages(const QList< QXmppArchiveMessage > &messages)
Sets the conversation's messages.
Definition QXmppArchiveIq.cpp:122
QDateTime end() const
Returns the end date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:276
void setResultSetReply(const QXmppResultSetReply &rsm)
Definition QXmppArchiveIq.cpp:322
QDateTime start() const
Returns the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:264
QXmppResultSetQuery resultSetQuery() const
Definition QXmppArchiveIq.cpp:292
QList< QXmppArchiveChat > chats() const
Returns the list of chat conversations.
Definition QXmppArchiveIq.cpp:240
void setStart(const QDateTime &start)
Sets the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:270
QXmppResultSetReply resultSetReply() const
Definition QXmppArchiveIq.cpp:312
void setResultSetQuery(const QXmppResultSetQuery &rsm)
Definition QXmppArchiveIq.cpp:302
QXmppArchiveListIq()
Constructs a QXmppArchiveListIq.
Definition QXmppArchiveIq.cpp:234
QString with() const
Returns the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:252
void setChats(const QList< QXmppArchiveChat > &chats)
Sets the list of chat conversations.
Definition QXmppArchiveIq.cpp:246
void setEnd(const QDateTime &end)
Sets the end date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:282
void setWith(const QString &with)
Sets the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:258
bool isReceived() const
Returns true if the archived message was received, false if it was sent.
Definition QXmppArchiveIq.cpp:48
void setBody(const QString &body)
Sets the archived message's body.
Definition QXmppArchiveIq.cpp:30
QString body() const
Returns the archived message's body.
Definition QXmppArchiveIq.cpp:24
void setDate(const QDateTime &date)
Sets the archived message's date.
Definition QXmppArchiveIq.cpp:42
void setReceived(bool isReceived)
Set to true if the archived message was received, false if it was sent.
Definition QXmppArchiveIq.cpp:54
QDateTime date() const
Returns the archived message's date.
Definition QXmppArchiveIq.cpp:36
Represents an archive preference IQ as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:234
Represents an archive remove IQ as defined by XEP-0136: Message Archiving.
Definition QXmppArchiveIq.h:166
QString with() const
Returns the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:367
QDateTime start() const
Returns the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:379
void setEnd(const QDateTime &end)
Sets the end date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:397
QDateTime end() const
Returns the end date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:391
void setWith(const QString &with)
Sets the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:373
void setStart(const QDateTime &start)
Sets the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:385
void setWith(const QString &with)
Sets the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:446
QString with() const
Returns the JID which archived conversations must match.
Definition QXmppArchiveIq.cpp:440
QDateTime start() const
Returns the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:428
void setStart(const QDateTime &start)
Sets the start date/time for the archived conversations.
Definition QXmppArchiveIq.cpp:434
QXmppResultSetQuery resultSetQuery() const
Definition QXmppArchiveIq.cpp:456
void setResultSetQuery(const QXmppResultSetQuery &rsm)
Definition QXmppArchiveIq.cpp:466
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:18
The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set ...
Definition QXmppResultSet.h:53