Add DeviceVerificationFlow dummy and verification test button
This commit is contained in:
parent
488cc5e73b
commit
2088053d26
9 changed files with 163 additions and 33 deletions
38
src/DeviceVerificationFlow.h
Normal file
38
src/DeviceVerificationFlow.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class QTimer;
|
||||
|
||||
class DeviceVerificationFlow : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
// Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
|
||||
|
||||
public:
|
||||
enum Method
|
||||
{
|
||||
Decimal,
|
||||
Emoji
|
||||
};
|
||||
Q_ENUM(Method)
|
||||
|
||||
DeviceVerificationFlow(QObject *parent = nullptr);
|
||||
|
||||
public slots:
|
||||
//! accepts a verification and starts the verification flow
|
||||
void acceptVerificationRequest();
|
||||
//! cancels a verification flow
|
||||
void cancelVerification();
|
||||
//! Completes the verification flow
|
||||
void acceptDevice();
|
||||
|
||||
signals:
|
||||
void verificationRequestAccepted(Method method);
|
||||
void deviceVerified();
|
||||
void timedout();
|
||||
void verificationCanceled();
|
||||
|
||||
private:
|
||||
QTimer *timeout = nullptr;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue