11#include "QXmppFileShare.h"
12#include "QXmppStanza.h"
19class QXmppMessagePrivate;
24class QXmppOmemoElement;
37#if QXMPP_DEPRECATED_SINCE(1, 5)
41 static const EncryptionMethod NoEncryption = EncryptionMethod::NoEncryption;
42 static const EncryptionMethod UnknownEncryption = EncryptionMethod::UnknownEncryption;
43 static const EncryptionMethod OTR = EncryptionMethod::Otr;
44 static const EncryptionMethod LegacyOpenPGP = EncryptionMethod::LegacyOpenPgp;
45 static const EncryptionMethod OX = EncryptionMethod::Ox;
46 static const EncryptionMethod OMEMO = EncryptionMethod::Omemo0;
92 NoPermanentStore = 1 << 0,
98 QXmppMessage(
const QString &from = QString(),
const QString &to = QString(),
99 const QString &body = QString(),
const QString &thread = QString());
110 QString body()
const;
111 void setBody(
const QString &);
113 QString e2eeFallbackBody()
const;
114 void setE2eeFallbackBody(
const QString &fallbackBody);
116 QString subject()
const;
117 void setSubject(
const QString &);
119 QString thread()
const;
120 void setThread(
const QString &);
122 QString parentThread()
const;
123 void setParentThread(
const QString &);
129 QString outOfBandUrl()
const;
130 void setOutOfBandUrl(
const QString &);
132 QVector<QXmppOutOfBandUrl> outOfBandUrls()
const;
133 void setOutOfBandUrls(
const QVector<QXmppOutOfBandUrl> &urls);
136 QString xhtml()
const;
137 void setXhtml(
const QString &xhtml);
144 QDateTime stamp()
const;
145 void setStamp(
const QDateTime &stamp);
148 bool isReceiptRequested()
const;
149 void setReceiptRequested(
bool requested);
151 QString receiptId()
const;
152 void setReceiptId(
const QString &
id);
155 bool isAttentionRequested()
const;
156 void setAttentionRequested(
bool requested);
164 static bool isSlashMeCommand(
const QString &body);
165 bool isSlashMeCommand()
const;
166 static QString slashMeCommandText(
const QString &body);
167 QString slashMeCommandText()
const;
170 QString mucInvitationJid()
const;
171 void setMucInvitationJid(
const QString &jid);
173 QString mucInvitationPassword()
const;
174 void setMucInvitationPassword(
const QString &password);
176 QString mucInvitationReason()
const;
177 void setMucInvitationReason(
const QString &reason);
180 bool isPrivate()
const;
181 void setPrivate(
const bool);
182 bool isCarbonForwarded()
const;
183 void setCarbonForwarded(
bool);
186 QString replaceId()
const;
187 void setReplaceId(
const QString &);
190 bool isMarkable()
const;
191 void setMarkable(
const bool);
193 QString markedId()
const;
194 void setMarkerId(
const QString &);
196 QString markedThread()
const;
197 void setMarkedThread(
const QString &);
200 void setMarker(
const Marker);
203 bool hasHint(
const Hint hint)
const;
204 void addHint(
const Hint hint);
205 void removeHint(
const Hint hint);
206 void removeAllHints();
209 QString stanzaId()
const;
210 void setStanzaId(
const QString &
id);
212 QString stanzaIdBy()
const;
213 void setStanzaIdBy(
const QString &
id);
215 QString originId()
const;
216 void setOriginId(
const QString &
id);
219 QString attachId()
const;
220 void setAttachId(
const QString &);
223 QString mixUserJid()
const;
224 void setMixUserJid(
const QString &);
226 QString mixUserNick()
const;
227 void setMixUserNick(
const QString &);
232 QString encryptionMethodNs()
const;
233 void setEncryptionMethodNs(
const QString &);
235 QString encryptionName()
const;
236 void setEncryptionName(
const QString &);
239 bool isSpoiler()
const;
240 void setIsSpoiler(
bool);
242 QString spoilerHint()
const;
243 void setSpoilerHint(
const QString &);
246 std::optional<QXmppMixInvitation> mixInvitation()
const;
247 void setMixInvitation(
const std::optional<QXmppMixInvitation> &mixInvitation);
250 bool isFallback()
const;
251 void setIsFallback(
bool isFallback);
254 std::optional<QXmppTrustMessageElement> trustMessageElement()
const;
255 void setTrustMessageElement(
const std::optional<QXmppTrustMessageElement> &trustMessageElement);
258 std::optional<QXmppMessageReaction> reaction()
const;
259 void setReaction(
const std::optional<QXmppMessageReaction> &reaction);
262 const QVector<QXmppFileShare> &sharedFiles()
const;
263 void setSharedFiles(
const QVector<QXmppFileShare> &sharedFiles);
268 std::optional<QXmppOmemoElement> omemoElement()
const;
269 void setOmemoElement(
const std::optional<QXmppOmemoElement> &omemoElement);
272 void parse(
const QDomElement &element)
override final;
274 void toXml(QXmlStreamWriter *writer)
const override final;
278 void parseExtensions(
const QDomElement &element,
QXmpp::SceMode sceMode);
279 virtual bool parseExtension(
const QDomElement &element,
QXmpp::SceMode);
280 virtual void serializeExtensions(QXmlStreamWriter *writer,
QXmpp::SceMode,
const QString &baseNamespace = {})
const;
283 QSharedDataPointer<QXmppMessagePrivate> d;
Definition QXmppBitsOfBinaryDataList.h:16
The QXmppMessageReaction class represents a reaction to a message in the form of emojis as specified ...
Definition QXmppMessageReaction.h:17
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:35
QXmppMessage & operator=(QXmppMessage &&)
Move-assignment operator.
QXmppMessage & operator=(const QXmppMessage &other)
Assignment operator.
Type
This enum describes a message type.
Definition QXmppMessage.h:51
QXmppMessage(QXmppMessage &&)
Move-constructor.
Marker
Definition QXmppMessage.h:79
Hint
Definition QXmppMessage.h:91
State
Definition QXmppMessage.h:65
@ Active
User is actively participating in the chat session.
Definition QXmppMessage.h:67
@ Inactive
User has not been actively participating in the chat session.
Definition QXmppMessage.h:68
@ Composing
User is composing a message.
Definition QXmppMessage.h:70
@ Gone
User has effectively ended their participation in the chat session.
Definition QXmppMessage.h:69
QXmppMessage(const QXmppMessage &other)
Constructs a copy of other.
The QXmppMixInvitation class is used to invite a user to a XEP-0369: Mediated Information eXchange (M...
Definition QXmppMixInvitation.h:24
virtual void parse(const QDomElement &)=0
virtual bool isXmppStanza() const
Definition QXmppNonza.h:19
virtual void toXml(QXmlStreamWriter *writer) const =0
Definition QXmppOutOfBandUrl.h:19
The Error class represents a stanza error.
Definition QXmppStanza.h:94
The QXmppStanza class is the base class for all XMPP stanzas.
Definition QXmppStanza.h:88
The QXmppTrustMessageElement class represents a trust message element as defined by XEP-0434: Trust M...
Definition QXmppTrustMessageElement.h:18
SceMode
Definition QXmppGlobal.h:136
EncryptionMethod
Definition QXmppGlobal.h:89