aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppMessage.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2019-04-28 22:11:25 +0200
committerLNJ <lnj@kaidan.im>2019-09-06 21:18:51 +0200
commite7394afc6730b16673f4173fcbc55d54a810a80b (patch)
tree854b917a079c385e780a72f9465403b70d53dc57 /src/base/QXmppMessage.h
parenta0925867901052d97fe84c2fcf31c720e0443546 (diff)
downloadqxmpp-e7394afc6730b16673f4173fcbc55d54a810a80b.tar.gz
Implement XEP-0380: Explicit Message Encryption
This adds parsing and serialization for XEP-0380: Explicit Message Encryption in version 0.3.0. https://xmpp.org/extensions/xep-0380.html
Diffstat (limited to 'src/base/QXmppMessage.h')
-rw-r--r--src/base/QXmppMessage.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/base/QXmppMessage.h b/src/base/QXmppMessage.h
index 330c70fe..69e2d451 100644
--- a/src/base/QXmppMessage.h
+++ b/src/base/QXmppMessage.h
@@ -66,6 +66,18 @@ public:
Acknowledged
};
+ /// This enum describes different end-to-end encryption methods. These can
+ /// be used to mark a message explicitly as encrypted with a specific
+ /// algothim. See XEP-0380: Explicit Message Encryption for details.
+ enum EncryptionMethod {
+ NoEncryption, ///< No encryption
+ UnknownEncryption, ///< Unknown encryption
+ OTR, ///< XEP-0364: Current Off-the-Record Messaging Usage
+ LegacyOpenPGP, ///< XEP-0027: Current Jabber OpenPGP Usage
+ OX, ///< XEP-0373: OpenPGP for XMPP
+ OMEMO ///< XEP-0384: OMEMO Encryption
+ };
+
QXmppMessage(const QString& from = QString(), const QString& to = QString(),
const QString& body = QString(), const QString& thread = QString());
@@ -151,6 +163,15 @@ public:
QString mixUserNick() const;
void setMixUserNick(const QString&);
+ // XEP-0380: Explicit Message Encryption
+ EncryptionMethod encryptionMethod() const;
+ void setEncryptionMethod(EncryptionMethod);
+ QString encryptionMethodNs() const;
+ void setEncryptionMethodNs(const QString&);
+
+ QString encryptionName() const;
+ void setEncryptionName(const QString&);
+
// XEP-0382: Spoiler messages
bool isSpoiler() const;
void setIsSpoiler(bool);