aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-26 11:03:16 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-29 08:17:56 +0200
commit841846ea5efad80ce20e0d42b1885def224e58ad (patch)
tree5833bece7a87848234ee4ebc72574eac7308b53c /lib/connection.h
parent0b5e72a2c6502f22a752b72b4df5fa25746fdd25 (diff)
downloadlibquotient-841846ea5efad80ce20e0d42b1885def224e58ad.tar.gz
libquotient-841846ea5efad80ce20e0d42b1885def224e58ad.zip
Cleanup and fix Sonar warnings
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/connection.h b/lib/connection.h
index 656e597c..72383abb 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -330,8 +330,11 @@ public:
//This assumes that an olm session with (user, device) exists
- QPair<QOlmMessage::Type, QByteArray> olmEncryptMessage(const QString& userId, const QString& device, const QByteArray& message);
- void createOlmSession(const QString& theirIdentityKey, const QString& theirOneTimeKey);
+ std::pair<QOlmMessage::Type, QByteArray> olmEncryptMessage(
+ const QString& userId, const QString& device,
+ const QByteArray& message) const;
+ void createOlmSession(const QString& theirIdentityKey,
+ const QString& theirOneTimeKey) const;
#endif // Quotient_E2EE_ENABLED
Q_INVOKABLE Quotient::SyncJob* syncJob() const;
Q_INVOKABLE int millisToReconnect() const;
@@ -695,10 +698,12 @@ public Q_SLOTS:
PicklingMode picklingMode() const;
QJsonObject decryptNotification(const QJsonObject &notification);
- QStringList devicesForUser(const QString& user) const;
- QString curveKeyForUserDevice(const QString &user, const QString& device) const;
- QString edKeyForUserDevice(const QString& user, const QString& device) const;
- bool isKnownCurveKey(const QString& user, const QString& curveKey);
+ QStringList devicesForUser(const QString& userId) const;
+ QString curveKeyForUserDevice(const QString& userId,
+ const QString& device) const;
+ QString edKeyForUserDevice(const QString& userId,
+ const QString& device) const;
+ bool isKnownCurveKey(const QString& userId, const QString& curveKey) const;
#endif
Q_SIGNALS:
/// \brief Initial server resolution has failed