aboutsummaryrefslogtreecommitdiff
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
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).
-rw-r--r--lib/database.h3
-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
-rw-r--r--lib/events/encryptedfile.h2
-rw-r--r--lib/events/keyverificationevent.h16
12 files changed, 27 insertions, 30 deletions
diff --git a/lib/database.h b/lib/database.h
index 96256a55..d244dc0b 100644
--- a/lib/database.h
+++ b/lib/database.h
@@ -10,10 +10,9 @@
#include "e2ee/e2ee.h"
namespace Quotient {
-class Database : public QObject
+class QUOTIENT_API Database : public QObject
{
Q_OBJECT
-
public:
Database(const QString& matrixId, QObject* parent);
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);
}
diff --git a/lib/events/encryptedfile.h b/lib/events/encryptedfile.h
index 6199be8e..43bafc49 100644
--- a/lib/events/encryptedfile.h
+++ b/lib/events/encryptedfile.h
@@ -29,7 +29,7 @@ public:
bool ext;
};
-struct EncryptedFile
+struct QUOTIENT_API EncryptedFile
{
Q_GADGET
Q_PROPERTY(QUrl url MEMBER url CONSTANT)
diff --git a/lib/events/keyverificationevent.h b/lib/events/keyverificationevent.h
index 13e7dcdd..497e56a2 100644
--- a/lib/events/keyverificationevent.h
+++ b/lib/events/keyverificationevent.h
@@ -7,8 +7,7 @@ namespace Quotient {
/// Requests a key verification with another user's devices.
/// Typically sent as a to-device event.
-class KeyVerificationRequestEvent : public Event {
- Q_GADGET
+class QUOTIENT_API KeyVerificationRequestEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.key.verification.request", KeyVerificationRequestEvent)
@@ -33,8 +32,7 @@ public:
REGISTER_EVENT_TYPE(KeyVerificationRequestEvent)
/// Begins a key verification process.
-class KeyVerificationStartEvent : public Event {
- Q_GADGET
+class QUOTIENT_API KeyVerificationStartEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.key.verification.start", KeyVerificationStartEvent)
@@ -76,8 +74,7 @@ REGISTER_EVENT_TYPE(KeyVerificationStartEvent)
/// Accepts a previously sent m.key.verification.start message.
/// Typically sent as a to-device event.
-class KeyVerificationAcceptEvent : public Event {
- Q_GADGET
+class QUOTIENT_API KeyVerificationAcceptEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.key.verification.accept", KeyVerificationAcceptEvent)
@@ -111,8 +108,7 @@ public:
};
REGISTER_EVENT_TYPE(KeyVerificationAcceptEvent)
-class KeyVerificationCancelEvent : public Event {
- Q_GADGET
+class QUOTIENT_API KeyVerificationCancelEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.key.verification.cancel", KeyVerificationCancelEvent)
@@ -133,7 +129,6 @@ REGISTER_EVENT_TYPE(KeyVerificationCancelEvent)
/// Sends the ephemeral public key for a device to the partner device.
/// Typically sent as a to-device event.
class KeyVerificationKeyEvent : public Event {
- Q_GADGET
public:
DEFINE_EVENT_TYPEID("m.key.verification.key", KeyVerificationKeyEvent)
@@ -148,8 +143,7 @@ public:
REGISTER_EVENT_TYPE(KeyVerificationKeyEvent)
/// Sends the MAC of a device's key to the partner device.
-class KeyVerificationMacEvent : public Event {
- Q_GADGET
+class QUOTIENT_API KeyVerificationMacEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.key.verification.mac", KeyVerificationMacEvent)