mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Security settings: Improve the state of the secure backup section to be exhaustive
This commit is contained in:
@@ -16,22 +16,30 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// SettingsSecureBackup view state
|
||||
/// State of the Secure Backup section in securtiy settings.
|
||||
///
|
||||
/// - checkingBackup: Load current backup on the homeserver
|
||||
/// - checkError: Fail to load current backup data
|
||||
/// - noKeyBackup: There is no backup on the homeserver
|
||||
/// - keyBackup: There is a valid backup on the homeserver. All keys have been backed up to it
|
||||
/// - keyBackupAndRunning: There is a valid backup on the homeserver. Keys are being sent to it
|
||||
/// - keyBackupNotTrusted: There is a backup on the homeserver but it is not trusted
|
||||
/// It is a mixed of the state of the Secure Backup(4S) and the state of the Key Backup.
|
||||
///
|
||||
/// - loading: Load current state
|
||||
/// - noSecureBackup: The account has no secure backup
|
||||
/// - secureBackup: The account has a secure backup
|
||||
enum SettingsSecureBackupViewState {
|
||||
case checkingBackup
|
||||
case noSecureBackup
|
||||
case noSecureBackupButKeyBackup(MXKeyBackupVersion, MXKeyBackupVersionTrust)
|
||||
case noKeyBackup
|
||||
case keyBackup(MXKeyBackupVersion, MXKeyBackupVersionTrust)
|
||||
case keyBackupAndRunning(MXKeyBackupVersion, MXKeyBackupVersionTrust, Progress)
|
||||
case keyBackupNotTrusted(MXKeyBackupVersion, MXKeyBackupVersionTrust)
|
||||
case loading
|
||||
case noSecureBackup(KeyBackupState)
|
||||
case secureBackup(KeyBackupState)
|
||||
|
||||
/// Internal key backup state. It is independent from the secure backup state.
|
||||
///
|
||||
/// - noKeyBackup: There is no backup on the homeserver
|
||||
/// - keyBackup: There is a valid backup on the homeserver. All keys have been backed up to it
|
||||
/// - keyBackupAndRunning: There is a valid backup on the homeserver. Keys are being sent to it
|
||||
/// - keyBackupNotTrusted: There is a backup on the homeserver but it is not trusted
|
||||
enum KeyBackupState {
|
||||
case noKeyBackup
|
||||
case keyBackup(MXKeyBackupVersion, MXKeyBackupVersionTrust)
|
||||
case keyBackupAndRunning(MXKeyBackupVersion, MXKeyBackupVersionTrust, Progress)
|
||||
case keyBackupNotTrusted(MXKeyBackupVersion, MXKeyBackupVersionTrust)
|
||||
}
|
||||
}
|
||||
|
||||
/// State representing a network request made by the module
|
||||
|
||||
Reference in New Issue
Block a user