diff options
| author | Melvin Keskin <melvo@olomono.de> | 2022-10-16 19:59:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-16 19:59:49 +0200 |
| commit | 66e5f060abe831fa08a758b9de44b29bfec8b3ba (patch) | |
| tree | 0fab0a2b20d6563c3522172129f0c5520c6028b7 /src/base/QXmppMessageReaction.h | |
| parent | ecce762e109bc9d88f3f6b7925e8b33ffcc0f57d (diff) | |
| download | qxmpp-66e5f060abe831fa08a758b9de44b29bfec8b3ba.tar.gz | |
Implement XEP-0444: Message Reactions (#492)
https://xmpp.org/extensions/xep-0444.html
Diffstat (limited to 'src/base/QXmppMessageReaction.h')
| -rw-r--r-- | src/base/QXmppMessageReaction.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/base/QXmppMessageReaction.h b/src/base/QXmppMessageReaction.h new file mode 100644 index 00000000..ce8fdfc1 --- /dev/null +++ b/src/base/QXmppMessageReaction.h @@ -0,0 +1,40 @@ +// SPDX-FileCopyrightText: 2022 Melvin Keskin <melvo@olomono.de> +// +// SPDX-License-Identifier: LGPL-2.1-or-later + +#ifndef QXMPPMESSAGEREACTION_H +#define QXMPPMESSAGEREACTION_H + +#include "QXmppGlobal.h" + +#include <QSharedDataPointer> + +class QDomElement; +class QXmlStreamWriter; +class QXmppMessageReactionPrivate; + +class QXMPP_EXPORT QXmppMessageReaction +{ +public: + QXmppMessageReaction(); + + QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMessageReaction) + + QString messageId() const; + void setMessageId(const QString &messageId); + + QVector<QString> emojis() const; + void setEmojis(const QVector<QString> &emojis); + + /// \cond + void parse(const QDomElement &element); + void toXml(QXmlStreamWriter *writer) const; + /// \endcond + + static bool isMessageReaction(const QDomElement &element); + +private: + QSharedDataPointer<QXmppMessageReactionPrivate> d; +}; + +#endif // QXMPPMESSAGEREACTION_H |
