diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-26 09:44:20 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-26 10:46:34 +0200 |
commit | 363a7e40e8aa12cb780b076cca8db4f47b70f4fa (patch) | |
tree | e5c8d796415114f46c84ba39f25a42c4ad400311 /lib/e2ee/qolmsession.h | |
parent | a923750c7a1efadaa66f24dc17010063776e6246 (diff) | |
download | libquotient-363a7e40e8aa12cb780b076cca8db4f47b70f4fa.tar.gz libquotient-363a7e40e8aa12cb780b076cca8db4f47b70f4fa.zip |
Replace QOlmError with OlmErrorCode
QOlmError represents a subset of OlmErrorCode, and the associated
fromString() function uses undocumented strings produced inside Olm;
meanwhile OlmErrorCode is documented in its own header file. Each QOlm*
class now has lastErrorCode() next to lastError() (that, from now,
returns a textual representation straight from Olm, not QOlmError enum).
Also: including olm/error.h in e2ee/e2ee.h required some rearrangement
of the code to make sure non-E2EE configuration still builds.
Diffstat (limited to 'lib/e2ee/qolmsession.h')
-rw-r--r-- | lib/e2ee/qolmsession.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/e2ee/qolmsession.h b/lib/e2ee/qolmsession.h index 021092c7..cc988a03 100644 --- a/lib/e2ee/qolmsession.h +++ b/lib/e2ee/qolmsession.h @@ -6,7 +6,6 @@ #include "e2ee/e2ee.h" #include "e2ee/qolmmessage.h" -#include "e2ee/qolmerrors.h" #include "e2ee/qolmaccount.h" struct OlmSession; @@ -71,6 +70,9 @@ public: return *lhs < *rhs; } + OlmErrorCode lastErrorCode() const; + const char* lastError() const; + OlmSession* raw() const { return m_session; } QOlmSession(OlmSession* session); |