aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmerrors.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2ee/qolmerrors.h')
-rw-r--r--lib/e2ee/qolmerrors.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/e2ee/qolmerrors.h b/lib/e2ee/qolmerrors.h
new file mode 100644
index 00000000..f8390d2a
--- /dev/null
+++ b/lib/e2ee/qolmerrors.h
@@ -0,0 +1,28 @@
+// SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+#pragma once
+
+#include <string>
+
+namespace Quotient {
+//! All errors that could be caused by an operation regarding Olm
+//! Errors are named exactly like the ones in libolm.
+enum QOlmError
+{
+ BadAccountKey,
+ BadMessageFormat,
+ BadMessageKeyId,
+ BadMessageMac,
+ BadMessageVersion,
+ InvalidBase64,
+ NotEnoughRandom,
+ OutputBufferTooSmall,
+ UnknownMessageIndex,
+ Unknown,
+};
+
+QOlmError fromString(const std::string &error_raw);
+
+} //namespace Quotient