diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-12 22:02:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 22:02:18 +0200 |
commit | 95d3f0607556e66666b3974486b061fc4372ede0 (patch) | |
tree | cb9d8f9c8465b11f0f4c71ea9d54eb6216be360f /lib/keyverificationsession.h | |
parent | 0d0a91b4438d68c833f480f45017847829bf6088 (diff) | |
parent | 79f995da07ca240c768281bf1d040eb94c07583e (diff) | |
download | libquotient-95d3f0607556e66666b3974486b061fc4372ede0.tar.gz libquotient-95d3f0607556e66666b3974486b061fc4372ede0.zip |
Merge #568: Add autotest for key verification and fix several edge-cases
Diffstat (limited to 'lib/keyverificationsession.h')
-rw-r--r-- | lib/keyverificationsession.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/keyverificationsession.h b/lib/keyverificationsession.h index 075ea1e2..32a91cfc 100644 --- a/lib/keyverificationsession.h +++ b/lib/keyverificationsession.h @@ -19,6 +19,9 @@ struct QUOTIENT_API EmojiEntry { Q_GADGET Q_PROPERTY(QString emoji MEMBER emoji CONSTANT) Q_PROPERTY(QString description MEMBER description CONSTANT) + +public: + bool operator==(const EmojiEntry& rhs) const = default; }; /** A key verification session. Listen for incoming sessions by connecting to Connection::newKeyVerificationSession. @@ -88,11 +91,15 @@ public: ~KeyVerificationSession() override; Q_DISABLE_COPY_MOVE(KeyVerificationSession) + void handleEvent(const KeyVerificationEvent& baseEvent); + QVector<EmojiEntry> sasEmojis() const; State state() const; Error error() const; + QString remoteDeviceId() const; + public Q_SLOTS: void sendRequest(); void sendReady(); @@ -103,7 +110,6 @@ public Q_SLOTS: void cancelVerification(Error error); Q_SIGNALS: - void startReceived(); void keyReceived(); void sasEmojisChanged(); void stateChanged(); @@ -130,11 +136,8 @@ private: void handleReady(const KeyVerificationReadyEvent& event); void handleStart(const KeyVerificationStartEvent& event); - void handleAccept(const KeyVerificationAcceptEvent& event); void handleKey(const KeyVerificationKeyEvent& event); void handleMac(const KeyVerificationMacEvent& event); - void handleDone(const KeyVerificationDoneEvent&); - void handleCancel(const KeyVerificationCancelEvent& event); void init(std::chrono::milliseconds timeout); void setState(State state); void setError(Error error); |