diff options
| author | Melvin Keskin <melvo@olomono.de> | 2022-05-09 21:45:49 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-08-13 15:55:03 +0200 |
| commit | ceb62dd9d0d86bc8327ace116930962cf7fad1e9 (patch) | |
| tree | 35bdcccf3e1bebddadcdab6205383975ca66e4c4 /src/base/QXmppMessage.h | |
| parent | ec0669845b9072ea6cdc0fefb66f1d07511386a4 (diff) | |
Implement XEP-0384: OMEMO Encryption v0.8
This implements XEP-0384 in version v0.8 with a manager and storage
classes to be user-implemented for persistant storage.
The license of the code is LGPL-2.1-or-later as usual. However since
libomemo-c (libsignal-protocol-c) is GPL-3.0, the built binary is always
licensed under GPL-3.0. Having our code LGPL licensed will make it
avoids relicensing in the future in case we port it to an LGPL
compatible omemo library.
Closes #133.
Co-authored-by: Linus Jahn <lnj@kaidan.im>
Diffstat (limited to 'src/base/QXmppMessage.h')
| -rw-r--r-- | src/base/QXmppMessage.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/base/QXmppMessage.h b/src/base/QXmppMessage.h index e9d442c1..ba6917c4 100644 --- a/src/base/QXmppMessage.h +++ b/src/base/QXmppMessage.h @@ -18,7 +18,9 @@ class QXmppMessagePrivate; class QXmppBitsOfBinaryDataList; class QXmppMixInvitation; +#ifdef BUILD_OMEMO class QXmppOmemoElement; +#endif class QXmppTrustMessageElement; /// @@ -232,10 +234,6 @@ public: QString spoilerHint() const; void setSpoilerHint(const QString &); - // XEP-0384: OMEMO Encryption - std::optional<QXmppOmemoElement> omemoElement() const; - void setOmemoElement(const std::optional<QXmppOmemoElement> &omemoElement); - // XEP-0407: Mediated Information eXchange (MIX): Miscellaneous Capabilities std::optional<QXmppMixInvitation> mixInvitation() const; void setMixInvitation(const std::optional<QXmppMixInvitation> &mixInvitation); @@ -249,6 +247,12 @@ public: void setTrustMessageElement(const std::optional<QXmppTrustMessageElement> &trustMessageElement); /// \cond +#ifdef BUILD_OMEMO + // XEP-0384: OMEMO Encryption + std::optional<QXmppOmemoElement> omemoElement() const; + void setOmemoElement(const std::optional<QXmppOmemoElement> &omemoElement); +#endif + void parse(const QDomElement &element) override final; virtual void parse(const QDomElement &element, QXmpp::SceMode); void toXml(QXmlStreamWriter *writer) const override final; |
