aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppGlobal.h
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2022-03-26 12:00:17 +0100
committerLinus Jahn <lnj@kaidan.im>2022-04-06 15:02:47 +0200
commit66b718973a9d32cecdabf1c54799e605fca00fbb (patch)
tree910794533bb182f8b1ccc67bf325b69777811e0d /src/base/QXmppGlobal.h
parent12ef960435bb718c48325ee05754e548ee6528a5 (diff)
downloadqxmpp-66b718973a9d32cecdabf1c54799e605fca00fbb.tar.gz
E2eeMetadata: Add enum and attribute for the used encryption
Diffstat (limited to 'src/base/QXmppGlobal.h')
-rw-r--r--src/base/QXmppGlobal.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/base/QXmppGlobal.h b/src/base/QXmppGlobal.h
index 2e403bd6..40f88801 100644
--- a/src/base/QXmppGlobal.h
+++ b/src/base/QXmppGlobal.h
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2010 Manjeet Dahiya <manjeetdahiya@gmail.com>
// SPDX-FileCopyrightText: 2017 Niels Ole Salscheider <niels_ole@salscheider-online.de>
// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
+// SPDX-FileCopyrightText: 2022 Melvin Keskin <melvo@olomono.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
@@ -49,6 +50,50 @@
namespace QXmpp {
///
+/// This enum describes different end-to-end encryption methods. These can
+/// be used to mark a stanza as encrypted or decrypted with a specific algorithm
+/// (e.g., for \xep{0380, Explicit Message Encryption}).
+///
+/// \since QXmpp 1.5
+///
+enum Encryption {
+ /// No encryption
+ NoEncryption,
+ /// Unknown encryption
+ UnknownEncryption,
+ /// \xep{0364, Current Off-the-Record Messaging Usage}
+ Otr,
+ /// \xep{0027, Current Jabber OpenPGP Usage}
+ LegacyOpenPgp,
+ /// \xep{0373, OpenPGP for XMPP}
+ Ox,
+ /// \xep{0384, OMEMO Encryption}
+ Omemo,
+ /// \xep{0384, OMEMO Encryption} since version 0.4
+ Omemo1,
+ /// \xep{0384, OMEMO Encryption} since version 0.8
+ Omemo2,
+#if QXMPP_DEPRECATED_SINCE(1, 5)
+ /// \xep{0364, Current Off-the-Record Messaging Usage}
+ /// \deprecated This enum is deprecated since QXmpp 1.5. Use
+ /// \c QXmpp::Otr instead.
+ OTR = Otr,
+ /// \xep{0027, Current Jabber OpenPGP Usage}
+ /// \deprecated This enum is deprecated since QXmpp 1.5. Use
+ /// \c QXmpp::LegacyOpenPgp instead.
+ LegacyOpenPGP = LegacyOpenPgp,
+ /// \xep{0373, OpenPGP for XMPP}
+ /// \deprecated This enum is deprecated since QXmpp 1.5. Use
+ /// \c QXmpp::Ox instead.
+ OX = Ox,
+ /// \xep{0384, OMEMO Encryption}
+ /// \deprecated This enum is deprecated since QXmpp 1.5. Use
+ /// \c QXmpp::Omemo instead.
+ OMEMO = Omemo,
+#endif
+};
+
+///
/// Parsing/serialization mode when using Stanza Content Encryption.
///
/// \sa \xep{0420, Stanza Content Encryption}