libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
sssshandler.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
2
// SPDX-License-Identifier: LGPL-2.0-or-later
3
4
#
pragma
once
5
6
#
include
"../connection.h"
7
8
#
include
<
QtCore
/
QObject
>
9
#
include
<
QtCore
/
QPointer
>
10
11
namespace
Quotient
{
12
class
QUOTIENT_API
SSSSHandler
:
public
QObject
13
{
14
Q_OBJECT
15
QML_ELEMENT
16
Q_PROPERTY
(
Quotient
::
Connection
*
connection
READ
connection
WRITE
setConnection
NOTIFY
connectionChanged
)
17
18
public
:
19
enum
Error
20
{
21
WrongKeyError
,
22
NoKeyError
,
23
DecryptionError
,
24
InvalidSignatureError
,
25
UnsupportedAlgorithmError
,
26
};
27
Q_ENUM
(
Error
)
28
29
using
QObject
::
QObject
;
30
31
//! \brief Unlock the secret backup from the given passprhase
32
Q_INVOKABLE
void
unlockSSSSWithPassphrase
(
const
QString
&
passphrase
);
33
34
//! \brief Unlock the secret backup by requesting the decryption keys from other devices
35
Q_INVOKABLE
void
unlockSSSSFromCrossSigning
();
36
37
//! \brief Unlock the secret backup from the given security key
38
Q_INVOKABLE
void
unlockSSSSFromSecurityKey
(
const
QString
&
encodedKey
);
39
40
Connection
*
connection
()
const
;
41
void
setConnection
(
Connection
*
connection
);
42
43
Q_SIGNALS
:
44
void
keyBackupUnlocked
();
45
void
error
(
Error
error
);
46
void
connectionChanged
();
47
48
//! \brief Emitted after keys are loaded
49
void
finished
();
50
51
private
:
52
QPointer
<
Connection
>
m_connection
;
53
};
54
}
// namespace Quotient
Quotient::SSSSHandler
Definition
sssshandler.h:13
Quotient
Definition
accountregistry.h:13
QUOTIENT_API
#define QUOTIENT_API
Definition
quotient_export.h:22
Quotient
e2ee
sssshandler.h
Generated by
1.9.8