aboutsummaryrefslogtreecommitdiff
path: root/lib/olm/errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/olm/errors.h')
-rw-r--r--lib/olm/errors.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/lib/olm/errors.h b/lib/olm/errors.h
index e51400ef..fc2ae2e9 100644
--- a/lib/olm/errors.h
+++ b/lib/olm/errors.h
@@ -2,22 +2,16 @@
//
// SPDX-License-Identifier: LGPL-2.1-or-later
-#pragma once
+#ifndef QUOTIENT_OLM_ERROR_H
+#define QUOTIENT_OLM_ERROR_H
-//! All errors that could be caused by an operation regarding an `QOlmAccount`.
-//! Errors are named exactly like the ones in libolm.
-enum OlmAccountError {
- BadAccountKey,
- BadMessageKeyId,
- InvalidBase64,
- NotEnoughRandom,
- OutputBufferTooSmall,
- Unknown,
-};
+#include <string>
-//! All errors that could be caused by an operation regarding an `QOlmSession`.
+namespace Quotient {
+//! All errors that could be caused by an operation regarding Olm
//! Errors are named exactly like the ones in libolm.
-enum OlmSessionError {
+enum OlmError
+{
BadAccountKey,
BadMessageFormat,
BadMessageKeyId,
@@ -26,21 +20,10 @@ enum OlmSessionError {
InvalidBase64,
NotEnoughRandom,
OutputBufferTooSmall,
- Unknown,
-};
-
-//! All errors that could be caused by an operation
-//! regarding QOlmOutboundGroupSession and QOlmInboundGroupSession.
-//! Errors are named exactly like the ones in libolm.
-enum OlmGroupSessionError {
- BadAccountKey,
- BadMessageFormat,
- BadMessageMac,
- BadMessageVersion,
- BadSessionKey,
- InvalidBase64,
- NotEnoughRandom,
- OutputBufferTooSmall,
UnknownMessageIndex,
Unknown,
};
+
+} //namespace Quotient
+
+#endif