mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
5ea4b46604
* implemented the content scanner service with caching and a way to use in the state store context * fix swiftformat comment enforcing * pr suggestions
35 lines
1.1 KiB
Swift
35 lines
1.1 KiB
Swift
//
|
|
// Copyright 2025 Element Creations Ltd.
|
|
// Copyright 2022-2025 New Vector Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
|
// Please see LICENSE files in the repository root for full details.
|
|
//
|
|
|
|
import Combine
|
|
import Foundation
|
|
|
|
enum UserSessionCallback {
|
|
case didReceiveAuthError(isSoftLogout: Bool)
|
|
}
|
|
|
|
struct SessionSecurityState: Equatable {
|
|
let verificationState: SessionVerificationState
|
|
let recoveryState: SecureBackupRecoveryState
|
|
}
|
|
|
|
// sourcery: AutoMockable
|
|
protocol UserSessionProtocol: Sendable {
|
|
var clientProxy: ClientProxyProtocol { get }
|
|
var mediaProvider: MediaProviderProtocol { get }
|
|
var voiceMessageMediaManager: VoiceMessageMediaManagerProtocol { get }
|
|
var liveLocationManager: LiveLocationManagerProtocol { get }
|
|
|
|
/// Scans media content, `nil` when no content scanner is configured for the server.
|
|
var contentScannerService: ContentScannerServiceProtocol? { get }
|
|
|
|
var sessionSecurityStatePublisher: CurrentValuePublisher<SessionSecurityState, Never> { get }
|
|
|
|
var callbacks: PassthroughSubject<UserSessionCallback, Never> { get }
|
|
}
|