aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 09:44:20 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 10:46:34 +0200
commit363a7e40e8aa12cb780b076cca8db4f47b70f4fa (patch)
treee5c8d796415114f46c84ba39f25a42c4ad400311 /lib/events
parenta923750c7a1efadaa66f24dc17010063776e6246 (diff)
downloadlibquotient-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/events')
-rw-r--r--lib/events/encryptedevent.cpp1
-rw-r--r--lib/events/encryptedevent.h7
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp
index 94b44901..114addb5 100644
--- a/lib/events/encryptedevent.cpp
+++ b/lib/events/encryptedevent.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "encryptedevent.h"
+#include "e2ee/e2ee.h"
#include "logging.h"
using namespace Quotient;
diff --git a/lib/events/encryptedevent.h b/lib/events/encryptedevent.h
index 02d4c7aa..e24e5745 100644
--- a/lib/events/encryptedevent.h
+++ b/lib/events/encryptedevent.h
@@ -3,10 +3,15 @@
#pragma once
-#include "e2ee/e2ee.h"
#include "roomevent.h"
namespace Quotient {
+
+constexpr auto CiphertextKeyL = "ciphertext"_ls;
+constexpr auto SenderKeyKeyL = "sender_key"_ls;
+constexpr auto DeviceIdKeyL = "device_id"_ls;
+constexpr auto SessionIdKeyL = "session_id"_ls;
+
/*
* While the specification states:
*