aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmmessage.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 15:20:53 +0200
committerGitHub <noreply@github.com>2022-09-26 15:20:53 +0200
commit4c8dcbc308eb0f4900e416e698f5f30e71daaad8 (patch)
treeaa5fdaa81234a21c6919fac4958f84d7c26cd397 /lib/e2ee/qolmmessage.h
parent5904a61c59f0eef00aef07ef998658fd791ff139 (diff)
parent15b840d82d4794358fbf1271ea76e446b47db7e5 (diff)
downloadlibquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.tar.gz
libquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.zip
Merge #571: Unify reporting and handling of Olm errors
Diffstat (limited to 'lib/e2ee/qolmmessage.h')
-rw-r--r--lib/e2ee/qolmmessage.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/e2ee/qolmmessage.h b/lib/e2ee/qolmmessage.h
index b4285a93..ea73b3e3 100644
--- a/lib/e2ee/qolmmessage.h
+++ b/lib/e2ee/qolmmessage.h
@@ -6,8 +6,9 @@
#include "quotient_export.h"
-#include <QObject>
-#include <QByteArray>
+#include <QtCore/QByteArray>
+#include <qobjectdefs.h>
+#include <olm/olm.h>
namespace Quotient {
@@ -22,15 +23,12 @@ class QUOTIENT_API QOlmMessage : public QByteArray {
Q_GADGET
public:
enum Type {
- PreKey = 0,
- General,
+ PreKey = OLM_MESSAGE_TYPE_PRE_KEY,
+ General = OLM_MESSAGE_TYPE_MESSAGE,
};
Q_ENUM(Type)
- QOlmMessage() = default;
explicit QOlmMessage(QByteArray ciphertext, Type type = General);
- explicit QOlmMessage(const QOlmMessage &message);
- ~QOlmMessage() = default;
static QOlmMessage fromCiphertext(const QByteArray &ciphertext);