Refactor SecureBackupControllerListener into SDKListener and use it everywhere. (#4030)

This commit is contained in:
Doug
2025-04-16 08:36:57 +01:00
committed by GitHub
parent b1b2b6bf8a
commit fb104a4077
11 changed files with 125 additions and 171 deletions

View File

@@ -13,7 +13,7 @@ protocol AuthenticationClientBuilderProtocol {
func build(homeserverAddress: String) async throws -> ClientProtocol
func buildWithQRCode(qrCodeData: QrCodeData,
oidcConfiguration: OIDCConfigurationProxy,
progressListener: QrLoginProgressListenerProxy) async throws -> ClientProtocol
progressListener: SDKListener<QrLoginProgress>) async throws -> ClientProtocol
}
/// A wrapper around `ClientBuilder` to share reusable code between Normal and QR logins.
@@ -33,7 +33,7 @@ struct AuthenticationClientBuilder: AuthenticationClientBuilderProtocol {
/// Builds a Client, authenticating with the given QR code data.
func buildWithQRCode(qrCodeData: QrCodeData,
oidcConfiguration: OIDCConfigurationProxy,
progressListener: QrLoginProgressListenerProxy) async throws -> ClientProtocol {
progressListener: SDKListener<QrLoginProgress>) async throws -> ClientProtocol {
try await makeClientBuilder().buildWithQrCode(qrCodeData: qrCodeData,
oidcConfiguration: oidcConfiguration.rustValue,
progressListener: progressListener)