From e2075a1f33f7987385fc61338ce1756715fdaf6a Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 23 Jan 2021 15:57:39 +0100 Subject: Start inboundsession wrapper --- lib/olm/errors.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lib/olm/errors.h (limited to 'lib/olm/errors.h') diff --git a/lib/olm/errors.h b/lib/olm/errors.h new file mode 100644 index 00000000..e51400ef --- /dev/null +++ b/lib/olm/errors.h @@ -0,0 +1,46 @@ +// SPDX-FileCopyrightText: 2021 Carl Schwan +// +// SPDX-License-Identifier: LGPL-2.1-or-later + +#pragma once + +//! 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, +}; + +//! All errors that could be caused by an operation regarding an `QOlmSession`. +//! Errors are named exactly like the ones in libolm. +enum OlmSessionError { + BadAccountKey, + BadMessageFormat, + BadMessageKeyId, + BadMessageMac, + BadMessageVersion, + 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, +}; -- cgit v1.2.3