diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-08-25 19:58:18 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-08-25 19:59:20 +0200 |
commit | 376da43a29f3ebad807da2761e7a0c0b105587ec (patch) | |
tree | 363a75478136230343e273831293dce75134b176 /lib/keyverificationsession.h | |
parent | 2e1f179bf75da9705963be9305ab6db34afa4d6d (diff) | |
download | libquotient-376da43a29f3ebad807da2761e7a0c0b105587ec.tar.gz libquotient-376da43a29f3ebad807da2761e7a0c0b105587ec.zip |
More code reorganisation
- Common switchOnType() piece for key verification events is factored
out into processIfVerificationEvent()
- Bare event JSON removed from KeyVerificationSession into constructors
of respective events
- Connection::sendToDevice() uses assembleEncryptedContent() introduced
in the previous commit
- commonSupportedMethods() moved out to .cpp; error/string converters
made static
Diffstat (limited to 'lib/keyverificationsession.h')
-rw-r--r-- | lib/keyverificationsession.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/keyverificationsession.h b/lib/keyverificationsession.h index 2756fa0a..73c9384e 100644 --- a/lib/keyverificationsession.h +++ b/lib/keyverificationsession.h @@ -128,10 +128,8 @@ private: void init(std::chrono::milliseconds timeout); void setState(State state); void setError(Error error); - QStringList commonSupportedMethods(const QStringList& remoteSupportedMethods) const; - QString errorToString(Error error) const; - Error stringToError(const QString& error) const; - QStringList m_supportedMethods = { "m.sas.v1"_ls }; + static QString errorToString(Error error); + static Error stringToError(const QString& error); QByteArray macInfo(bool verifying, const QString& key = "KEY_IDS"_ls); QString calculateMac(const QString& input, bool verifying, const QString& keyId= "KEY_IDS"_ls); @@ -139,4 +137,4 @@ private: std::pair<QString, QString> emojiForCode(int code); }; -} +} // namespace Quotient |