From 215f8b8378d5447cf8204203e370e37587df78cc Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Mon, 20 May 2024 18:27:17 +0200 Subject: [PATCH] Bump to version v0.0.1-qr-code-login (matrix-rust-sdk/poljar/qr-login c4fd07f2f30f56b7d7fa93b18f403ebdd427017c) --- Package.swift | 4 +- Sources/MatrixRustSDK/matrix_sdk.swift | 104 ++++ Sources/MatrixRustSDK/matrix_sdk_ffi.swift | 624 +++++++++++++++++++-- 3 files changed, 668 insertions(+), 64 deletions(-) diff --git a/Package.swift b/Package.swift index a3d3f57..57f8e24 100644 --- a/Package.swift +++ b/Package.swift @@ -1,8 +1,8 @@ // swift-tools-version:5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription -let checksum = "ade40f5f1512366a82bd00799da99684ce8a1d909ef1e0a861187973d5dcedd6" -let version = "v1.0.1" +let checksum = "dd29992cd975edae91c71d45372a7c413189b4437485fa8c11026d26810ff662" +let version = "v0.0.1-qr-code-login" let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip" let package = Package( name: "MatrixRustSDK", diff --git a/Sources/MatrixRustSDK/matrix_sdk.swift b/Sources/MatrixRustSDK/matrix_sdk.swift index bc5c9cf..4da02d9 100644 --- a/Sources/MatrixRustSDK/matrix_sdk.swift +++ b/Sources/MatrixRustSDK/matrix_sdk.swift @@ -789,6 +789,110 @@ extension PaginatorState: Equatable, Hashable {} +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. + +public enum QrCodeLoginError { + + case oidc + case sessionTokens + case userIdDiscovery + case secretImport + case loginFailure + case unexpectedMessage + case crossProcessRefreshLock + case secureChannel + case deviceKeyUpload +} + + +public struct FfiConverterTypeQRCodeLoginError: FfiConverterRustBuffer { + typealias SwiftType = QrCodeLoginError + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrCodeLoginError { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .oidc + + case 2: return .sessionTokens + + case 3: return .userIdDiscovery + + case 4: return .secretImport + + case 5: return .loginFailure + + case 6: return .unexpectedMessage + + case 7: return .crossProcessRefreshLock + + case 8: return .secureChannel + + case 9: return .deviceKeyUpload + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: QrCodeLoginError, into buf: inout [UInt8]) { + switch value { + + + case .oidc: + writeInt(&buf, Int32(1)) + + + case .sessionTokens: + writeInt(&buf, Int32(2)) + + + case .userIdDiscovery: + writeInt(&buf, Int32(3)) + + + case .secretImport: + writeInt(&buf, Int32(4)) + + + case .loginFailure: + writeInt(&buf, Int32(5)) + + + case .unexpectedMessage: + writeInt(&buf, Int32(6)) + + + case .crossProcessRefreshLock: + writeInt(&buf, Int32(7)) + + + case .secureChannel: + writeInt(&buf, Int32(8)) + + + case .deviceKeyUpload: + writeInt(&buf, Int32(9)) + + } + } +} + + +public func FfiConverterTypeQRCodeLoginError_lift(_ buf: RustBuffer) throws -> QrCodeLoginError { + return try FfiConverterTypeQRCodeLoginError.lift(buf) +} + +public func FfiConverterTypeQRCodeLoginError_lower(_ value: QrCodeLoginError) -> RustBuffer { + return FfiConverterTypeQRCodeLoginError.lower(value) +} + + + +extension QrCodeLoginError: Equatable, Hashable {} + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** diff --git a/Sources/MatrixRustSDK/matrix_sdk_ffi.swift b/Sources/MatrixRustSDK/matrix_sdk_ffi.swift index 840df8d..6838115 100644 --- a/Sources/MatrixRustSDK/matrix_sdk_ffi.swift +++ b/Sources/MatrixRustSDK/matrix_sdk_ffi.swift @@ -1789,6 +1789,12 @@ public protocol ClientBuilderProtocol : AnyObject { func build() async throws -> Client + /** + * Finish the building of the client and attempt to log in using the + * provided [`QrCodeData`]. + */ + func buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener) async throws -> Client + func disableAutomaticTokenRefresh() -> ClientBuilder func disableSslVerification() -> ClientBuilder @@ -1931,6 +1937,27 @@ open func build()async throws -> Client { ) } + /** + * Finish the building of the client and attempt to log in using the + * provided [`QrCodeData`]. + */ +open func buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener)async throws -> Client { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( + self.uniffiClonePointer(), + FfiConverterTypeQrCodeData.lower(qrCodeData),FfiConverterTypeOidcConfiguration.lower(oidcConfiguration),FfiConverterCallbackInterfaceQrLoginProgressListener.lower(progressListener) + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer, + liftFunc: FfiConverterTypeClient.lift, + errorHandler: FfiConverterTypeQrLoginError.lift + ) +} + open func disableAutomaticTokenRefresh() -> ClientBuilder { return try! FfiConverterTypeClientBuilder.lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh(self.uniffiClonePointer(),$0 @@ -2101,20 +2128,8 @@ public protocol EncryptionProtocol : AnyObject { func backupStateListener(listener: BackupStateListener) -> TaskHandle - /** - * Get the public curve25519 key of our own device in base64. This is - * usually what is called the identity key of the device. - */ - func curve25519Key() async -> String? - func disableRecovery() async throws - /** - * Get the public ed25519 key of our own device. This is usually what is - * called the fingerprint of the device. - */ - func ed25519Key() async -> String? - func enableBackups() async throws func enableRecovery(waitForBackupsToUpload: Bool, progressListener: EnableRecoveryProgressListener) async throws -> String @@ -2229,28 +2244,6 @@ open func backupStateListener(listener: BackupStateListener) -> TaskHandle { }) } - /** - * Get the public curve25519 key of our own device in base64. This is - * usually what is called the identity key of the device. - */ -open func curve25519Key()async -> String? { - return - try! await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( - self.uniffiClonePointer() - - ) - }, - pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, - completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, - freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, - liftFunc: FfiConverterOptionString.lift, - errorHandler: nil - - ) -} - open func disableRecovery()async throws { return try await uniffiRustCallAsync( @@ -2268,28 +2261,6 @@ open func disableRecovery()async throws { ) } - /** - * Get the public ed25519 key of our own device. This is usually what is - * called the fingerprint of the device. - */ -open func ed25519Key()async -> String? { - return - try! await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( - self.uniffiClonePointer() - - ) - }, - pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, - completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, - freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, - liftFunc: FfiConverterOptionString.lift, - errorHandler: nil - - ) -} - open func enableBackups()async throws { return try await uniffiRustCallAsync( @@ -4168,6 +4139,107 @@ public func FfiConverterTypeOidcAuthenticationData_lower(_ value: OidcAuthentica +public protocol QrCodeDataProtocol : AnyObject { + +} + +open class QrCodeData: + QrCodeDataProtocol { + fileprivate let pointer: UnsafeMutableRawPointer! + + /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + public struct NoPointer { + public init() {} + } + + // TODO: We'd like this to be `private` but for Swifty reasons, + // we can't implement `FfiConverter` without making this `required` and we can't + // make it `required` without making it `public`. + required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { + self.pointer = pointer + } + + /// This constructor can be used to instantiate a fake object. + /// - Parameter noPointer: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. + /// + /// - Warning: + /// Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing [Pointer] the FFI lower functions will crash. + public init(noPointer: NoPointer) { + self.pointer = nil + } + + public func uniffiClonePointer() -> UnsafeMutableRawPointer { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(self.pointer, $0) } + } + // No primary constructor declared for this class. + + deinit { + guard let pointer = pointer else { + return + } + + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_qrcodedata(pointer, $0) } + } + + +public static func fromBytes(bytes: Data)throws -> QrCodeData { + return try FfiConverterTypeQrCodeData.lift(try rustCallWithError(FfiConverterTypeQrCodeDecodeError.lift) { + uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( + FfiConverterData.lower(bytes),$0 + ) +}) +} + + + + +} + +public struct FfiConverterTypeQrCodeData: FfiConverter { + + typealias FfiType = UnsafeMutableRawPointer + typealias SwiftType = QrCodeData + + public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> QrCodeData { + return QrCodeData(unsafeFromRawPointer: pointer) + } + + public static func lower(_ value: QrCodeData) -> UnsafeMutableRawPointer { + return value.uniffiClonePointer() + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrCodeData { + let v: UInt64 = try readInt(&buf) + // The Rust code won't compile if a pointer won't fit in a UInt64. + // We have to go via `UInt` because that's the thing that's the size of a pointer. + let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: v)) + if (ptr == nil) { + throw UniffiInternalError.unexpectedNullPointer + } + return try lift(ptr!) + } + + public static func write(_ value: QrCodeData, into buf: inout [UInt8]) { + // This fiddling is because `Int` is the thing that's the same size as a pointer. + // The Rust code won't compile if a pointer won't fit in a `UInt64`. + writeInt(&buf, UInt64(bitPattern: Int64(Int(bitPattern: lower(value))))) + } +} + + + + +public func FfiConverterTypeQrCodeData_lift(_ pointer: UnsafeMutableRawPointer) throws -> QrCodeData { + return try FfiConverterTypeQrCodeData.lift(pointer) +} + +public func FfiConverterTypeQrCodeData_lower(_ value: QrCodeData) -> UnsafeMutableRawPointer { + return FfiConverterTypeQrCodeData.lower(value) +} + + + + public protocol RoomProtocol : AnyObject { func activeMembersCount() -> UInt64 @@ -15081,6 +15153,96 @@ extension FocusEventError: Equatable, Hashable {} extension FocusEventError: Error { } +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. + +public enum HumanQrLoginError { + + case linkingNotSupported + case cancelled + case expired + case connectionInsecure + case declined + case unknown + case invalidQrCode +} + + +public struct FfiConverterTypeHumanQrLoginError: FfiConverterRustBuffer { + typealias SwiftType = HumanQrLoginError + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HumanQrLoginError { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .linkingNotSupported + + case 2: return .cancelled + + case 3: return .expired + + case 4: return .connectionInsecure + + case 5: return .declined + + case 6: return .unknown + + case 7: return .invalidQrCode + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: HumanQrLoginError, into buf: inout [UInt8]) { + switch value { + + + case .linkingNotSupported: + writeInt(&buf, Int32(1)) + + + case .cancelled: + writeInt(&buf, Int32(2)) + + + case .expired: + writeInt(&buf, Int32(3)) + + + case .connectionInsecure: + writeInt(&buf, Int32(4)) + + + case .declined: + writeInt(&buf, Int32(5)) + + + case .unknown: + writeInt(&buf, Int32(6)) + + + case .invalidQrCode: + writeInt(&buf, Int32(7)) + + } + } +} + + +public func FfiConverterTypeHumanQrLoginError_lift(_ buf: RustBuffer) throws -> HumanQrLoginError { + return try FfiConverterTypeHumanQrLoginError.lift(buf) +} + +public func FfiConverterTypeHumanQrLoginError_lower(_ value: HumanQrLoginError) -> RustBuffer { + return FfiConverterTypeHumanQrLoginError.lower(value) +} + + + +extension HumanQrLoginError: Equatable, Hashable {} + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -17034,6 +17196,241 @@ extension PusherKind: Equatable, Hashable {} + +public enum QrCodeDecodeError { + + + + case Crypto(error: LoginQrCodeDecodeError + ) +} + + +public struct FfiConverterTypeQrCodeDecodeError: FfiConverterRustBuffer { + typealias SwiftType = QrCodeDecodeError + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrCodeDecodeError { + let variant: Int32 = try readInt(&buf) + switch variant { + + + + + case 1: return .Crypto( + error: try FfiConverterTypeLoginQrCodeDecodeError.read(from: &buf) + ) + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: QrCodeDecodeError, into buf: inout [UInt8]) { + switch value { + + + + + + case let .Crypto(error): + writeInt(&buf, Int32(1)) + FfiConverterTypeLoginQrCodeDecodeError.write(error, into: &buf) + + } + } +} + + +extension QrCodeDecodeError: Equatable, Hashable {} + +extension QrCodeDecodeError: Error { } + + +public enum QrLoginError { + + + + case ClientBuilder(error: ClientBuildError + ) + case SlidingSyncNotAvailable + case OidcMetadataInvalid + case StorageSetup(reason: String + ) + case InvalidIntent + case LoginError(error: QrCodeLoginError + ) +} + + +public struct FfiConverterTypeQrLoginError: FfiConverterRustBuffer { + typealias SwiftType = QrLoginError + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrLoginError { + let variant: Int32 = try readInt(&buf) + switch variant { + + + + + case 1: return .ClientBuilder( + error: try FfiConverterTypeClientBuildError.read(from: &buf) + ) + case 2: return .SlidingSyncNotAvailable + case 3: return .OidcMetadataInvalid + case 4: return .StorageSetup( + reason: try FfiConverterString.read(from: &buf) + ) + case 5: return .InvalidIntent + case 6: return .LoginError( + error: try FfiConverterTypeQRCodeLoginError.read(from: &buf) + ) + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: QrLoginError, into buf: inout [UInt8]) { + switch value { + + + + + + case let .ClientBuilder(error): + writeInt(&buf, Int32(1)) + FfiConverterTypeClientBuildError.write(error, into: &buf) + + + case .SlidingSyncNotAvailable: + writeInt(&buf, Int32(2)) + + + case .OidcMetadataInvalid: + writeInt(&buf, Int32(3)) + + + case let .StorageSetup(reason): + writeInt(&buf, Int32(4)) + FfiConverterString.write(reason, into: &buf) + + + case .InvalidIntent: + writeInt(&buf, Int32(5)) + + + case let .LoginError(error): + writeInt(&buf, Int32(6)) + FfiConverterTypeQRCodeLoginError.write(error, into: &buf) + + } + } +} + + +extension QrLoginError: Equatable, Hashable {} + +extension QrLoginError: Error { } + +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. +/** + * Enum describing the progress of the QR-code login. + */ + +public enum QrLoginProgress { + + /** + * The login process is starting. + */ + case starting + /** + * We established a secure channel with the other device. + */ + case establishingSecureChannel( + /** + * The check code that the device should display so the other device + * can confirm that the channel is secure as well. + */checkCode: UInt8, + /** + * The string representation of the check code, will be guaranteed to + * be 2 characters long, preserving the leading zero if the + * first digit is a zero. + */checkCodeString: String + ) + /** + * We are waiting for the login and for the OIDC provider to give us an + * access token. + */ + case waitingForToken(userCode: String + ) + /** + * The login has successfully finished. + */ + case done +} + + +public struct FfiConverterTypeQrLoginProgress: FfiConverterRustBuffer { + typealias SwiftType = QrLoginProgress + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrLoginProgress { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .starting + + case 2: return .establishingSecureChannel(checkCode: try FfiConverterUInt8.read(from: &buf), checkCodeString: try FfiConverterString.read(from: &buf) + ) + + case 3: return .waitingForToken(userCode: try FfiConverterString.read(from: &buf) + ) + + case 4: return .done + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: QrLoginProgress, into buf: inout [UInt8]) { + switch value { + + + case .starting: + writeInt(&buf, Int32(1)) + + + case let .establishingSecureChannel(checkCode,checkCodeString): + writeInt(&buf, Int32(2)) + FfiConverterUInt8.write(checkCode, into: &buf) + FfiConverterString.write(checkCodeString, into: &buf) + + + case let .waitingForToken(userCode): + writeInt(&buf, Int32(3)) + FfiConverterString.write(userCode, into: &buf) + + + case .done: + writeInt(&buf, Int32(4)) + + } + } +} + + +public func FfiConverterTypeQrLoginProgress_lift(_ buf: RustBuffer) throws -> QrLoginProgress { + return try FfiConverterTypeQrLoginProgress.lift(buf) +} + +public func FfiConverterTypeQrLoginProgress_lower(_ value: QrLoginProgress) -> RustBuffer { + return FfiConverterTypeQrLoginProgress.lower(value) +} + + + +extension QrLoginProgress: Equatable, Hashable {} + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -20459,6 +20856,87 @@ extension FfiConverterCallbackInterfaceProgressWatcher : FfiConverter { +public protocol QrLoginProgressListener : AnyObject { + + func onUpdate(state: QrLoginProgress) + +} + + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceQrLoginProgressListener { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + static var vtable: UniffiVTableCallbackInterfaceQrLoginProgressListener = UniffiVTableCallbackInterfaceQrLoginProgressListener( + onUpdate: { ( + uniffiHandle: UInt64, + state: RustBuffer, + uniffiOutReturn: UnsafeMutableRawPointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> () in + guard let uniffiObj = try? FfiConverterCallbackInterfaceQrLoginProgressListener.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.onUpdate( + state: try FfiConverterTypeQrLoginProgress.lift(state) + ) + } + + + let writeReturn = { () } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + }, + uniffiFree: { (uniffiHandle: UInt64) -> () in + let result = try? FfiConverterCallbackInterfaceQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) + if result == nil { + print("Uniffi callback interface QrLoginProgressListener: handle missing in uniffiFree") + } + } + ) +} + +private func uniffiCallbackInitQrLoginProgressListener() { + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener(&UniffiCallbackInterfaceQrLoginProgressListener.vtable) +} + +// FfiConverter protocol for callback interfaces +fileprivate struct FfiConverterCallbackInterfaceQrLoginProgressListener { + fileprivate static var handleMap = UniffiHandleMap() +} + +extension FfiConverterCallbackInterfaceQrLoginProgressListener : FfiConverter { + typealias SwiftType = QrLoginProgressListener + typealias FfiType = UInt64 + + public static func lift(_ handle: UInt64) throws -> SwiftType { + try handleMap.get(handle: handle) + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + + public static func lower(_ v: SwiftType) -> UInt64 { + return handleMap.insert(obj: v) + } + + public static func write(_ v: SwiftType, into buf: inout [UInt8]) { + writeInt(&buf, lower(v)) + } +} + + + + public protocol RecoveryStateListener : AnyObject { func onUpdate(status: RecoveryState) @@ -23475,6 +23953,10 @@ fileprivate struct FfiConverterDictionaryStringSequenceString: FfiConverterRustB + + + + private let UNIFFI_RUST_FUTURE_POLL_READY: Int8 = 0 private let UNIFFI_RUST_FUTURE_POLL_MAYBE_READY: Int8 = 1 @@ -23697,6 +24179,17 @@ public func parseMatrixEntityFrom(uri: String) -> MatrixEntity? { ) }) } +/** + * Convert the error the [`ClientBuilder::build_with_qr_code()`] method returns + * into a more user-friendly error type. + */ +public func qrLoginErrorToHumanError(error: QrLoginError) -> HumanQrLoginError { + return try! FfiConverterTypeHumanQrLoginError.lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_qr_login_error_to_human_error( + FfiConverterTypeQrLoginError.lower(error),$0 + ) +}) +} public func sdkGitSha() -> String { return try! FfiConverterString.lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha($0 @@ -23784,6 +24277,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 49710) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_func_qr_login_error_to_human_error() != 49077) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038) { return InitializationResult.apiChecksumMismatch } @@ -23973,6 +24469,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 56018) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code() != 17628) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() != 43839) { return InitializationResult.apiChecksumMismatch } @@ -24021,15 +24520,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() != 14246) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() != 58425) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() != 18699) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() != 11864) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() != 55446) { return InitializationResult.apiChecksumMismatch } @@ -24732,6 +25225,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 27991) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 22720) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 53698) { return InitializationResult.apiChecksumMismatch } @@ -24777,6 +25273,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() != 41133) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() != 9758) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() != 64575) { return InitializationResult.apiChecksumMismatch } @@ -24844,6 +25343,7 @@ private var initializationResult: InitializationResult { uniffiCallbackInitNotificationSettingsDelegate() uniffiCallbackInitPaginationStatusListener() uniffiCallbackInitProgressWatcher() + uniffiCallbackInitQrLoginProgressListener() uniffiCallbackInitRecoveryStateListener() uniffiCallbackInitRoomDirectorySearchEntriesListener() uniffiCallbackInitRoomInfoListener()