66#if QXMPP_DEPRECATED_SINCE(1, 5)
70 static const EncryptionMethod NoEncryption = EncryptionMethod::NoEncryption;
71 static const EncryptionMethod UnknownEncryption = EncryptionMethod::UnknownEncryption;
72 static const EncryptionMethod OTR = EncryptionMethod::Otr;
73 static const EncryptionMethod LegacyOpenPGP = EncryptionMethod::LegacyOpenPgp;
74 static const EncryptionMethod OX = EncryptionMethod::Ox;
75 static const EncryptionMethod OMEMO = EncryptionMethod::Omemo0;
121 NoPermanentStore = 1 << 0,
126 Q_DECLARE_FLAGS(Hints, Hint)
128 QXmppMessage(
const QString &from = QString(),
const QString &to = QString(),
129 const QString &body = QString(),
const QString &thread = QString());
140 QString body()
const;
141 void setBody(
const QString &);
143 QString e2eeFallbackBody()
const;
144 void setE2eeFallbackBody(
const QString &fallbackBody);
146 QString subject()
const;
147 void setSubject(
const QString &);
149 QString thread()
const;
150 void setThread(
const QString &);
152 QString parentThread()
const;
153 void setParentThread(
const QString &);
159 QString outOfBandUrl()
const;
160 void setOutOfBandUrl(
const QString &);
162 QVector<QXmppOutOfBandUrl> outOfBandUrls()
const;
163 void setOutOfBandUrls(
const QVector<QXmppOutOfBandUrl> &urls);
166 QString xhtml()
const;
167 void setXhtml(
const QString &xhtml);
174 QDateTime stamp()
const;
175 void setStamp(
const QDateTime &stamp);
178 bool isReceiptRequested()
const;
179 void setReceiptRequested(
bool requested);
181 QString receiptId()
const;
182 void setReceiptId(
const QString &
id);
185 bool isAttentionRequested()
const;
186 void setAttentionRequested(
bool requested);
194 static bool isSlashMeCommand(
const QString &body);
195 bool isSlashMeCommand()
const;
196 static QString slashMeCommandText(
const QString &body);
197 QString slashMeCommandText()
const;
200 QString mucInvitationJid()
const;
201 void setMucInvitationJid(
const QString &jid);
203 QString mucInvitationPassword()
const;
204 void setMucInvitationPassword(
const QString &password);
206 QString mucInvitationReason()
const;
207 void setMucInvitationReason(
const QString &reason);
210 bool isPrivate()
const;
211 void setPrivate(
const bool);
212 bool isCarbonForwarded()
const;
213 void setCarbonForwarded(
bool);
216 QString replaceId()
const;
217 void setReplaceId(
const QString &);
220 bool isMarkable()
const;
221 void setMarkable(
const bool);
223 QString markedId()
const;
224 void setMarkerId(
const QString &);
226 QString markedThread()
const;
227 void setMarkedThread(
const QString &);
230 void setMarker(
const Marker);
233 bool hasHint(
const Hint hint)
const;
234 void addHint(
const Hint hint);
235 void removeHint(
const Hint hint);
236 void removeAllHints();
239 std::optional<QXmppJingleMessageInitiationElement> jingleMessageInitiationElement()
const;
240 void setJingleMessageInitiationElement(
const std::optional<QXmppJingleMessageInitiationElement> &jingleMessageInitiationElement);
243#if QXMPP_DEPRECATED_SINCE(1, 8)
244 [[deprecated(
"Use stanzaIds() instead.")]]
245 QString stanzaId()
const;
246 [[deprecated(
"Use setStanzaIds() instead.")]]
247 void setStanzaId(
const QString &
id);
249 [[deprecated(
"Use stanzaIds() instead.")]]
250 QString stanzaIdBy()
const;
251 [[deprecated(
"Use setStanzaIds() instead.")]]
252 void setStanzaIdBy(
const QString &
id);
255 QVector<QXmppStanzaId> stanzaIds()
const;
256 void setStanzaIds(
const QVector<QXmppStanzaId> &);
258 QString originId()
const;
259 void setOriginId(
const QString &
id);
262 QString attachId()
const;
263 void setAttachId(
const QString &);
266 QString mixParticipantId()
const;
268 QString mixUserJid()
const;
269 void setMixUserJid(
const QString &);
271 QString mixUserNick()
const;
272 void setMixUserNick(
const QString &);
277 QString encryptionMethodNs()
const;
278 void setEncryptionMethodNs(
const QString &);
280 QString encryptionName()
const;
281 void setEncryptionName(
const QString &);
284 bool isSpoiler()
const;
285 void setIsSpoiler(
bool);
287 QString spoilerHint()
const;
288 void setSpoilerHint(
const QString &);
291 std::optional<QXmppMixInvitation> mixInvitation()
const;
292 void setMixInvitation(
const std::optional<QXmppMixInvitation> &mixInvitation);
295#if QXMPP_DEPRECATED_SINCE(1, 7)
296 [[deprecated(
"Use fallbackMarkers()")]]
297 bool isFallback()
const;
298 [[deprecated(
"Use setFallbackMarkers()")]]
299 void setIsFallback(
bool isFallback);
301 const QVector<QXmppFallback> &fallbackMarkers()
const;
302 void setFallbackMarkers(
const QVector<QXmppFallback> &);
303 QString readFallbackRemovedText(
QXmppFallback::Element element,
const QVector<QString> &supportedNamespaces)
const;
307 std::optional<QXmppTrustMessageElement> trustMessageElement()
const;
308 void setTrustMessageElement(
const std::optional<QXmppTrustMessageElement> &trustMessageElement);
311 std::optional<QXmppMessageReaction> reaction()
const;
312 void setReaction(
const std::optional<QXmppMessageReaction> &reaction);
315 const QVector<QXmppFileShare> &sharedFiles()
const;
316 void setSharedFiles(
const QVector<QXmppFileShare> &sharedFiles);
317 QVector<QXmppFileSourcesAttachment> fileSourcesAttachments()
const;
318 void setFileSourcesAttachments(
const QVector<QXmppFileSourcesAttachment> &);
321 std::optional<QXmpp::Reply> reply()
const;
322 void setReply(
const std::optional<QXmpp::Reply> &);
323 QString readReplyQuoteFromBody()
const;
326 std::optional<QXmppCallInviteElement> callInviteElement()
const;
327 void setCallInviteElement(std::optional<QXmppCallInviteElement> callInviteElement);
332 std::optional<QXmppOmemoElement> omemoElement()
const;
333 void setOmemoElement(
const std::optional<QXmppOmemoElement> &omemoElement);
336 void parse(
const QDomElement &element)
override final;
338 void toXml(QXmlStreamWriter *writer)
const override final;
342 void parseExtensions(
const QDomElement &element,
QXmpp::SceMode sceMode);
343 virtual bool parseExtension(
const QDomElement &element,
QXmpp::SceMode);
344 virtual void serializeExtensions(QXmlStreamWriter *writer,
QXmpp::SceMode,
const QString &baseNamespace = {})
const;
347 QSharedDataPointer<QXmppMessagePrivate> d;