From c8d67f737e84bbec98a54fc19a8aa56dbc39d542 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 23 Jan 2021 21:46:26 +0100 Subject: Implement Inboundsession --- lib/olm/errors.h | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) (limited to 'lib/olm/errors.h') 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 -//! 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 -- cgit v1.2.3