Add SAS Method choice and Add send_to_device API call
This commit is contained in:
parent
b628f485ff
commit
cd5dd0e39b
4 changed files with 148 additions and 28 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <MatrixClient.h>
|
||||
#include <QObject>
|
||||
|
||||
class QTimer;
|
||||
|
|
@ -8,6 +9,9 @@ class DeviceVerificationFlow : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
// Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
|
||||
Q_PROPERTY(QString userId READ getUserId WRITE setUserId)
|
||||
Q_PROPERTY(QString deviceId READ getDeviceId WRITE setDeviceId)
|
||||
Q_PROPERTY(Method method READ getMethod WRITE setMethod)
|
||||
|
||||
public:
|
||||
enum Method
|
||||
|
|
@ -18,6 +22,12 @@ public:
|
|||
Q_ENUM(Method)
|
||||
|
||||
DeviceVerificationFlow(QObject *parent = nullptr);
|
||||
QString getUserId();
|
||||
QString getDeviceId();
|
||||
Method getMethod();
|
||||
void setUserId(QString userID);
|
||||
void setDeviceId(QString deviceID);
|
||||
void setMethod(Method method_);
|
||||
|
||||
public slots:
|
||||
//! sends a verification request
|
||||
|
|
@ -38,9 +48,11 @@ signals:
|
|||
void verificationCanceled();
|
||||
|
||||
private:
|
||||
//! generates a unique transaction id
|
||||
std::string generate_txn_id();
|
||||
QString userId;
|
||||
QString deviceId;
|
||||
Method method;
|
||||
|
||||
QTimer *timeout = nullptr;
|
||||
std::string transaction_id;
|
||||
mtx::identifiers::User toClient;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue