// SPDX-FileCopyrightText: 2021 Nheko Contributors // SPDX-FileCopyrightText: 2022 Nheko Contributors // // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include #include #include class DeviceVerificationFlow; class TimelineModel; class TimelineModel; class TimelineViewManager; class RoomlistModel; class VerificationManager final : public QObject { Q_OBJECT public: VerificationManager(TimelineViewManager *o = nullptr); Q_INVOKABLE void removeVerificationFlow(DeviceVerificationFlow *flow); void verifyUser(QString userid); void verifyDevice(QString userid, QString deviceid); void verifyOneOfDevices(QString userid, std::vector deviceids); signals: void newDeviceVerificationRequest(DeviceVerificationFlow *flow); public slots: void receivedRoomDeviceVerificationRequest( const mtx::events::RoomEvent &message, TimelineModel *model); void receivedDeviceVerificationRequest(const mtx::events::msg::KeyVerificationRequest &msg, std::string sender); void receivedDeviceVerificationStart(const mtx::events::msg::KeyVerificationStart &msg, std::string sender); private: QHash> dvList; bool isInitialSync_ = false; RoomlistModel *rooms_; };