aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-02-16 17:57:30 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-02-16 17:58:17 +0100
commit52a787eefb3fb3d147648d08fc439a4b8a966fd3 (patch)
tree90758ec437c5d1a0c79d5b0500453bf607c14ce0 /lib/e2ee
parent044ae4a029b710571420f830a497647f7a54698a (diff)
downloadlibquotient-52a787eefb3fb3d147648d08fc439a4b8a966fd3.tar.gz
libquotient-52a787eefb3fb3d147648d08fc439a4b8a966fd3.zip
Add a few missing QUOTIENT_API stanzas
Also, removed Q_GADGET macros from key verification events as those don't seem to do anything (no Q_ENUM/Q_FLAG things, namely).
Diffstat (limited to 'lib/e2ee')
-rw-r--r--lib/e2ee/e2ee.h2
-rw-r--r--lib/e2ee/qolmaccount.h14
-rw-r--r--lib/e2ee/qolmerrors.h4
-rw-r--r--lib/e2ee/qolminboundsession.h2
-rw-r--r--lib/e2ee/qolmmessage.h4
-rw-r--r--lib/e2ee/qolmoutboundsession.h2
-rw-r--r--lib/e2ee/qolmsession.h2
-rw-r--r--lib/e2ee/qolmutility.h2
-rw-r--r--lib/e2ee/qolmutils.h4
9 files changed, 20 insertions, 16 deletions
diff --git a/lib/e2ee/e2ee.h b/lib/e2ee/e2ee.h
index 41cd2878..4c825376 100644
--- a/lib/e2ee/e2ee.h
+++ b/lib/e2ee/e2ee.h
@@ -65,7 +65,7 @@ struct IdentityKeys
};
//! Struct representing the one-time keys.
-struct OneTimeKeys
+struct QUOTIENT_API OneTimeKeys
{
QMap<QString, QMap<QString, QString>> keys;
diff --git a/lib/e2ee/qolmaccount.h b/lib/e2ee/qolmaccount.h
index 00afc0e6..17aca8aa 100644
--- a/lib/e2ee/qolmaccount.h
+++ b/lib/e2ee/qolmaccount.h
@@ -25,7 +25,7 @@ using QOlmSessionPtr = std::unique_ptr<QOlmSession>;
//! \code{.cpp}
//! const auto olmAccount = new QOlmAccount(this);
//! \endcode
-class QOlmAccount : public QObject
+class QUOTIENT_API QOlmAccount : public QObject
{
Q_OBJECT
public:
@@ -111,13 +111,13 @@ private:
QString m_deviceId;
};
-bool verifyIdentitySignature(const DeviceKeys &deviceKeys,
- const QString &deviceId,
- const QString &userId);
+QUOTIENT_API bool verifyIdentitySignature(const DeviceKeys& deviceKeys,
+ const QString& deviceId,
+ const QString& userId);
//! checks if the signature is signed by the signing_key
-bool ed25519VerifySignature(const QString &signingKey,
- const QJsonObject &obj,
- const QString &signature);
+QUOTIENT_API bool ed25519VerifySignature(const QString& signingKey,
+ const QJsonObject& obj,
+ const QString& signature);
} // namespace Quotient
diff --git a/lib/e2ee/qolmerrors.h b/lib/e2ee/qolmerrors.h
index 24e87d95..20e61c12 100644
--- a/lib/e2ee/qolmerrors.h
+++ b/lib/e2ee/qolmerrors.h
@@ -4,6 +4,8 @@
#pragma once
+#include "quotient_export.h"
+
namespace Quotient {
//! All errors that could be caused by an operation regarding Olm
//! Errors are named exactly like the ones in libolm.
@@ -21,6 +23,6 @@ enum QOlmError
Unknown,
};
-QOlmError fromString(const char* error_raw);
+QUOTIENT_API QOlmError fromString(const char* error_raw);
} //namespace Quotient
diff --git a/lib/e2ee/qolminboundsession.h b/lib/e2ee/qolminboundsession.h
index 7d52991c..1f5dadd3 100644
--- a/lib/e2ee/qolminboundsession.h
+++ b/lib/e2ee/qolminboundsession.h
@@ -15,7 +15,7 @@ namespace Quotient {
//! An in-bound group session is responsible for decrypting incoming
//! communication in a Megolm session.
-struct QOlmInboundGroupSession
+class QUOTIENT_API QOlmInboundGroupSession
{
public:
~QOlmInboundGroupSession();
diff --git a/lib/e2ee/qolmmessage.h b/lib/e2ee/qolmmessage.h
index 52aba78c..557c02b1 100644
--- a/lib/e2ee/qolmmessage.h
+++ b/lib/e2ee/qolmmessage.h
@@ -4,6 +4,8 @@
#pragma once
+#include "quotient_export.h"
+
#include <QObject>
#include <QByteArray>
@@ -16,7 +18,7 @@ namespace Quotient {
*
* The class provides functions to get a type and the ciphertext.
*/
-class QOlmMessage : public QByteArray {
+class QUOTIENT_API QOlmMessage : public QByteArray {
Q_GADGET
public:
enum Type {
diff --git a/lib/e2ee/qolmoutboundsession.h b/lib/e2ee/qolmoutboundsession.h
index 39263c77..0122bbfd 100644
--- a/lib/e2ee/qolmoutboundsession.h
+++ b/lib/e2ee/qolmoutboundsession.h
@@ -13,7 +13,7 @@ namespace Quotient {
//! An out-bound group session is responsible for encrypting outgoing
//! communication in a Megolm session.
-class QOlmOutboundGroupSession
+class QUOTIENT_API QOlmOutboundGroupSession
{
public:
~QOlmOutboundGroupSession();
diff --git a/lib/e2ee/qolmsession.h b/lib/e2ee/qolmsession.h
index 1febfa0f..889a606d 100644
--- a/lib/e2ee/qolmsession.h
+++ b/lib/e2ee/qolmsession.h
@@ -18,7 +18,7 @@ class QOlmSession;
//! Either an outbound or inbound session for secure communication.
-class QOlmSession
+class QUOTIENT_API QOlmSession
{
public:
~QOlmSession();
diff --git a/lib/e2ee/qolmutility.h b/lib/e2ee/qolmutility.h
index b360d625..b2e79e29 100644
--- a/lib/e2ee/qolmutility.h
+++ b/lib/e2ee/qolmutility.h
@@ -17,7 +17,7 @@ class Connection;
//! Allows you to make use of crytographic hashing via SHA-2 and
//! verifying ed25519 signatures.
-class QOlmUtility
+class QUOTIENT_API QOlmUtility
{
public:
QOlmUtility();
diff --git a/lib/e2ee/qolmutils.h b/lib/e2ee/qolmutils.h
index bbd71332..f218e628 100644
--- a/lib/e2ee/qolmutils.h
+++ b/lib/e2ee/qolmutils.h
@@ -10,6 +10,6 @@
namespace Quotient {
// Convert PicklingMode to key
-QByteArray toKey(const PicklingMode &mode);
-QByteArray getRandom(size_t bufferSize);
+QUOTIENT_API QByteArray toKey(const PicklingMode &mode);
+QUOTIENT_API QByteArray getRandom(size_t bufferSize);
}