@@ -854,6 +854,21 @@ public protocol ClientProtocol : AnyObject {
854854 */
855855 func loginWithOidcCallback(callbackUrl: String) async throws
856856
857+ /**
858+ * Log in using the provided [`QrCodeData`]. The `Client` must be built
859+ * by providing [`QrCodeData::server_name`] as the server name for this
860+ * login to succeed.
861+ *
862+ * This method uses the login mechanism described in [MSC4108]. As such
863+ * this method requires OAuth 2.0 support as well as sliding sync support.
864+ *
865+ * The usage of the progress_listener is required to transfer the
866+ * [`CheckCode`] to the existing client.
867+ *
868+ * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108
869+ */
870+ func loginWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener) async throws
871+
857872 /**
858873 * Log the current user out.
859874 */
@@ -2021,6 +2036,36 @@ open func loginWithOidcCallback(callbackUrl: String)async throws {
20212036 )
20222037}
20232038
2039+ /**
2040+ * Log in using the provided [`QrCodeData`]. The `Client` must be built
2041+ * by providing [`QrCodeData::server_name`] as the server name for this
2042+ * login to succeed.
2043+ *
2044+ * This method uses the login mechanism described in [MSC4108]. As such
2045+ * this method requires OAuth 2.0 support as well as sliding sync support.
2046+ *
2047+ * The usage of the progress_listener is required to transfer the
2048+ * [`CheckCode`] to the existing client.
2049+ *
2050+ * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108
2051+ */
2052+ open func loginWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener)async throws {
2053+ return
2054+ try await uniffiRustCallAsync(
2055+ rustFutureFunc: {
2056+ uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code(
2057+ self.uniffiClonePointer(),
2058+ FfiConverterTypeQrCodeData.lower(qrCodeData),FfiConverterTypeOidcConfiguration.lower(oidcConfiguration),FfiConverterCallbackInterfaceQrLoginProgressListener.lower(progressListener)
2059+ )
2060+ },
2061+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
2062+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
2063+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
2064+ liftFunc: { $0 },
2065+ errorHandler: FfiConverterTypeHumanQrLoginError.lift
2066+ )
2067+ }
2068+
20242069 /**
20252070 * Log the current user out.
20262071 */
@@ -2733,22 +2778,6 @@ public protocol ClientBuilderProtocol : AnyObject {
27332778
27342779 func build() async throws -> Client
27352780
2736- /**
2737- * Finish the building of the client and attempt to log in using the
2738- * provided [`QrCodeData`].
2739- *
2740- * This method will build the client and immediately attempt to log the
2741- * client in using the provided [`QrCodeData`] using the login
2742- * mechanism described in [MSC4108]. As such this methods requires OAuth
2743- * 2.0 support as well as sliding sync support.
2744- *
2745- * The usage of the progress_listener is required to transfer the
2746- * [`CheckCode`] to the existing client.
2747- *
2748- * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108
2749- */
2750- func buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener) async throws -> Client
2751-
27522781 func crossProcessStoreLocksHolderName(holderName: String) -> ClientBuilder
27532782
27542783 /**
@@ -2981,37 +3010,6 @@ open func build()async throws -> Client {
29813010 )
29823011}
29833012
2984- /**
2985- * Finish the building of the client and attempt to log in using the
2986- * provided [`QrCodeData`].
2987- *
2988- * This method will build the client and immediately attempt to log the
2989- * client in using the provided [`QrCodeData`] using the login
2990- * mechanism described in [MSC4108]. As such this methods requires OAuth
2991- * 2.0 support as well as sliding sync support.
2992- *
2993- * The usage of the progress_listener is required to transfer the
2994- * [`CheckCode`] to the existing client.
2995- *
2996- * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108
2997- */
2998- open func buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener)async throws -> Client {
2999- return
3000- try await uniffiRustCallAsync(
3001- rustFutureFunc: {
3002- uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code(
3003- self.uniffiClonePointer(),
3004- FfiConverterTypeQrCodeData.lower(qrCodeData),FfiConverterTypeOidcConfiguration.lower(oidcConfiguration),FfiConverterCallbackInterfaceQrLoginProgressListener.lower(progressListener)
3005- )
3006- },
3007- pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
3008- completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
3009- freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
3010- liftFunc: FfiConverterTypeClient.lift,
3011- errorHandler: FfiConverterTypeHumanQrLoginError.lift
3012- )
3013- }
3014-
30153013open func crossProcessStoreLocksHolderName(holderName: String) -> ClientBuilder {
30163014 return try! FfiConverterTypeClientBuilder.lift(try! rustCall() {
30173015 uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name(self.uniffiClonePointer(),
@@ -36832,6 +36830,19 @@ public func parseMatrixEntityFrom(uri: String) -> MatrixEntity? {
3683236830 )
3683336831})
3683436832}
36833+ /**
36834+ * Updates the tracing subscriber with a new file writer based on the provided
36835+ * configuration.
36836+ *
36837+ * This method will throw if `init_platform` hasn't been called, or if it was
36838+ * called with `write_to_files` set to `None`.
36839+ */
36840+ public func reloadTracingFileWriter(configuration: TracingFileConfiguration)throws {try rustCallWithError(FfiConverterTypeClientError.lift) {
36841+ uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer(
36842+ FfiConverterTypeTracingFileConfiguration.lower(configuration),$0
36843+ )
36844+ }
36845+ }
3683536846/**
3683636847 * Transforms a Room's display name into a valid room alias name.
3683736848 */
@@ -36935,6 +36946,9 @@ private var initializationResult: InitializationResult = {
3693536946 if (uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 49710) {
3693636947 return InitializationResult.apiChecksumMismatch
3693736948 }
36949+ if (uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() != 1447) {
36950+ return InitializationResult.apiChecksumMismatch
36951+ }
3693836952 if (uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() != 65010) {
3693936953 return InitializationResult.apiChecksumMismatch
3694036954 }
@@ -37088,6 +37102,9 @@ private var initializationResult: InitializationResult = {
3708837102 if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 32591) {
3708937103 return InitializationResult.apiChecksumMismatch
3709037104 }
37105+ if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code() != 3481) {
37106+ return InitializationResult.apiChecksumMismatch
37107+ }
3709137108 if (uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 42911) {
3709237109 return InitializationResult.apiChecksumMismatch
3709337110 }
@@ -37214,9 +37231,6 @@ private var initializationResult: InitializationResult = {
3721437231 if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 56018) {
3721537232 return InitializationResult.apiChecksumMismatch
3721637233 }
37217- if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code() != 42452) {
37218- return InitializationResult.apiChecksumMismatch
37219- }
3722037234 if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 46627) {
3722137235 return InitializationResult.apiChecksumMismatch
3722237236 }
0 commit comments