aboutsummaryrefslogtreecommitdiff
path: root/lib/olm/errors.h
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-01-23 21:46:26 +0100
committerTobias Fella <fella@posteo.de>2021-12-01 21:34:52 +0100
commitc8d67f737e84bbec98a54fc19a8aa56dbc39d542 (patch)
tree094704820b91f7f31bbb0562e2e01f3f1fd2a311 /lib/olm/errors.h
parente2075a1f33f7987385fc61338ce1756715fdaf6a (diff)
downloadlibquotient-c8d67f737e84bbec98a54fc19a8aa56dbc39d542.tar.gz
libquotient-c8d67f737e84bbec98a54fc19a8aa56dbc39d542.zip
Implement Inboundsession
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