From 9d86b6a842a23d2ec809d037e35a3a6b139ad9de Mon Sep 17 00:00:00 2001 From: Valentin Weiss <10179089+WeissDev@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:26:28 +0200 Subject: [PATCH] chore: update matrix-rust-sdk to 0.14.1 --- .../rustcomponents/sdk/matrix_sdk_ffi.kt | 4484 ++++++++++----- .../main/java/uniffi/matrix_sdk/matrix_sdk.kt | 137 +- .../uniffi/matrix_sdk_ui/matrix_sdk_ui.kt | 87 + cpp/generated/matrix_sdk_ffi.cpp | 3014 +++++++--- cpp/generated/matrix_sdk_ffi.hpp | 248 +- example/ios/Podfile.lock | 88 +- matrix-rust-sdk.patch | 4990 +---------------- src/generated/matrix_sdk.ts | 160 +- src/generated/matrix_sdk_ffi-ffi.ts | 245 +- src/generated/matrix_sdk_ffi.ts | 4893 +++++++++++----- src/generated/matrix_sdk_ui.ts | 132 + swift/matrix_sdk.swift | 239 +- swift/matrix_sdk_ffi.swift | 3379 +++++++---- swift/matrix_sdk_ui.swift | 97 + ubrn.yaml | 2 +- 15 files changed, 12691 insertions(+), 9504 deletions(-) diff --git a/android/src/main/java/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt b/android/src/main/java/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt index 94632f2..05d83d7 100644 --- a/android/src/main/java/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt +++ b/android/src/main/java/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt @@ -46,11 +46,13 @@ import uniffi.matrix_sdk.FfiConverterTypeOAuthAuthorizationData import uniffi.matrix_sdk.FfiConverterTypeRoomMemberRole import uniffi.matrix_sdk.FfiConverterTypeRoomPaginationStatus import uniffi.matrix_sdk.FfiConverterTypeRoomPowerLevelChanges +import uniffi.matrix_sdk.FfiConverterTypeServerVendorInfo import uniffi.matrix_sdk.FfiConverterTypeVirtualElementCallWidgetOptions import uniffi.matrix_sdk.OAuthAuthorizationData import uniffi.matrix_sdk.RoomMemberRole import uniffi.matrix_sdk.RoomPaginationStatus import uniffi.matrix_sdk.RoomPowerLevelChanges +import uniffi.matrix_sdk.ServerVendorInfo import uniffi.matrix_sdk.VirtualElementCallWidgetOptions import uniffi.matrix_sdk_base.EncryptionState import uniffi.matrix_sdk_base.FfiConverterTypeEncryptionState @@ -69,12 +71,15 @@ import uniffi.matrix_sdk_crypto.UtdCause import uniffi.matrix_sdk_ui.EventItemOrigin import uniffi.matrix_sdk_ui.FfiConverterTypeEventItemOrigin import uniffi.matrix_sdk_ui.FfiConverterTypeRoomPinnedEventsChange +import uniffi.matrix_sdk_ui.FfiConverterTypeSpaceRoomListPaginationState import uniffi.matrix_sdk_ui.RoomPinnedEventsChange +import uniffi.matrix_sdk_ui.SpaceRoomListPaginationState import uniffi.matrix_sdk.RustBuffer as RustBufferBackupDownloadStrategy import uniffi.matrix_sdk.RustBuffer as RustBufferOAuthAuthorizationData import uniffi.matrix_sdk.RustBuffer as RustBufferRoomMemberRole import uniffi.matrix_sdk.RustBuffer as RustBufferRoomPaginationStatus import uniffi.matrix_sdk.RustBuffer as RustBufferRoomPowerLevelChanges +import uniffi.matrix_sdk.RustBuffer as RustBufferServerVendorInfo import uniffi.matrix_sdk.RustBuffer as RustBufferVirtualElementCallWidgetOptions import uniffi.matrix_sdk_base.RustBuffer as RustBufferEncryptionState import uniffi.matrix_sdk_base.RustBuffer as RustBufferMediaRetentionPolicy @@ -85,6 +90,7 @@ import uniffi.matrix_sdk_crypto.RustBuffer as RustBufferIdentityState import uniffi.matrix_sdk_crypto.RustBuffer as RustBufferUtdCause import uniffi.matrix_sdk_ui.RustBuffer as RustBufferEventItemOrigin import uniffi.matrix_sdk_ui.RustBuffer as RustBufferRoomPinnedEventsChange +import uniffi.matrix_sdk_ui.RustBuffer as RustBufferSpaceRoomListPaginationState // This is a helper for safely working with byte buffers returned from the Rust code. // A rust-owned buffer is represented by its capacity, its current length, and a @@ -804,6 +810,15 @@ internal interface UniffiCallbackInterfaceSessionVerificationControllerDelegateM internal interface UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } +internal interface UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`rooms`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`paginationState`: RustBufferSpaceRoomListPaginationState.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`roomUpdates`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceSyncServiceStateObserverMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -1242,6 +1257,54 @@ internal open class UniffiVTableCallbackInterfaceSessionVerificationControllerDe `uniffiFree` = other.`uniffiFree` } +} +@Structure.FieldOrder("onUpdate", "uniffiFree") +internal open class UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener( + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, +) : Structure() { + class UniffiByValue( + `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + ): UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener) { + `onUpdate` = other.`onUpdate` + `uniffiFree` = other.`uniffiFree` + } + +} +@Structure.FieldOrder("onUpdate", "uniffiFree") +internal open class UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener( + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, +) : Structure() { + class UniffiByValue( + `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + ): UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener) { + `onUpdate` = other.`onUpdate` + `uniffiFree` = other.`uniffiFree` + } + +} +@Structure.FieldOrder("onUpdate", "uniffiFree") +internal open class UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener( + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, +) : Structure() { + class UniffiByValue( + `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + ): UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener) { + `onUpdate` = other.`onUpdate` + `uniffiFree` = other.`uniffiFree` + } + } @Structure.FieldOrder("onUpdate", "uniffiFree") internal open class UniffiVTableCallbackInterfaceSyncServiceStateObserver( @@ -2415,6 +2478,24 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider( + + + + + + + + + + + + + + + + + + @@ -2527,6 +2608,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_client_display_name( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_encryption( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config( @@ -2587,6 +2670,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_logout( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_notification_client( @@ -2615,6 +2700,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_client_search_users( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_server( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_session( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data( @@ -2635,6 +2722,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_client_space_service( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users( @@ -2671,8 +2760,6 @@ fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy ): Short fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code( -): Short fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings( @@ -2769,6 +2856,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_l ): Short fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( @@ -2885,6 +2974,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_forget( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels( @@ -2951,6 +3042,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_membership( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room( @@ -2979,10 +3072,6 @@ fun uniffi_matrix_sdk_ffi_checksum_method_room_room_info( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed( -): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_send_raw( @@ -2993,6 +3082,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_set_name( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_set_topic( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag( @@ -3165,6 +3256,22 @@ fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_span_enter( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_span_exit( @@ -3175,6 +3282,8 @@ fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_start( @@ -3257,24 +3366,6 @@ fun uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set( -): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate( -): Short fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( @@ -3395,6 +3486,12 @@ fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_ ): Short fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish( ): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( +): Short +fun uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( +): Short fun uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( ): Short fun uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( @@ -3470,6 +3567,9 @@ internal interface UniffiLib : Library { uniffiCallbackInterfaceRoomListServiceSyncIndicatorListener.register(lib) uniffiCallbackInterfaceSendQueueRoomErrorListener.register(lib) uniffiCallbackInterfaceSessionVerificationControllerDelegate.register(lib) + uniffiCallbackInterfaceSpaceRoomListEntriesListener.register(lib) + uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.register(lib) + uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.register(lib) uniffiCallbackInterfaceSyncServiceStateObserver.register(lib) uniffiCallbackInterfaceTimelineListener.register(lib) uniffiCallbackInterfaceTypingNotificationsListener.register(lib) @@ -3528,6 +3628,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_client_display_name(`ptr`: Pointer, ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues(`ptr`: Pointer,`enable`: Byte, ): Long +fun uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress(`ptr`: Pointer,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Unit fun uniffi_matrix_sdk_ffi_fn_method_client_encryption(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config(`ptr`: Pointer, @@ -3588,6 +3690,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_email(`ptr`: Pointer,`emai ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback(`ptr`: Pointer,`callbackUrl`: RustBuffer.ByValue, ): Long +fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code(`ptr`: Pointer,`qrCodeData`: Pointer,`oidcConfiguration`: RustBuffer.ByValue,`progressListener`: Long, +): Long fun uniffi_matrix_sdk_ffi_fn_method_client_logout(`ptr`: Pointer, ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_notification_client(`ptr`: Pointer,`processSetup`: RustBuffer.ByValue, @@ -3616,6 +3720,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_client_search_users(`ptr`: Pointer,`searchTe ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_server(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info(`ptr`: Pointer, +): Long fun uniffi_matrix_sdk_ffi_fn_method_client_session(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_method_client_set_account_data(`ptr`: Pointer,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue, @@ -3636,6 +3742,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate(`ptr`: Pointer,`utdD ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_client_space_service(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer fun uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login(`ptr`: Pointer,`redirectUrl`: RustBuffer.ByValue,`idpId`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, @@ -3656,7 +3764,7 @@ fun uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar(`ptr`: Pointer,`mimeTyp ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_upload_media(`ptr`: Pointer,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc(`ptr`: Pointer,`oidcConfiguration`: RustBuffer.ByValue,`prompt`: RustBuffer.ByValue,`loginHint`: RustBuffer.ByValue, +fun uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc(`ptr`: Pointer,`oidcConfiguration`: RustBuffer.ByValue,`prompt`: RustBuffer.ByValue,`loginHint`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue,`additionalScopes`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_client_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue @@ -3678,8 +3786,6 @@ fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy(`ptr` ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(`ptr`: Pointer, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code(`ptr`: Pointer,`qrCodeData`: Pointer,`oidcConfiguration`: RustBuffer.ByValue,`progressListener`: Long, -): Long fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name(`ptr`: Pointer,`holderName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings(`ptr`: Pointer,`decryptionSettings`: RustBufferDecryptionSettings.ByValue,uniffi_out_err: UniffiRustCallStatus, @@ -3722,7 +3828,7 @@ fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder(` ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled(`ptr`: Pointer,`enabled`: Byte,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled(`ptr`: Pointer,`enabled`: Byte,`threadSubscriptions`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent(`ptr`: Pointer,`userAgent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer @@ -3784,6 +3890,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login(` ): Byte fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Byte +fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Byte fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, @@ -3946,6 +4054,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue(`ptr`: Pointer,`enabl ): Unit fun uniffi_matrix_sdk_ffi_fn_method_room_encryption_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBufferEncryptionState.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue, +): Long fun uniffi_matrix_sdk_ffi_fn_method_room_forget(`ptr`: Pointer, ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(`ptr`: Pointer, @@ -4012,6 +4122,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync(`ptr`: Pointer, ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_membership(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event(`ptr`: Pointer, +): Long fun uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, @@ -4040,10 +4152,6 @@ fun uniffi_matrix_sdk_ffi_fn_method_room_room_info(`ptr`: Pointer, ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft(`ptr`: Pointer,`draft`: RustBuffer.ByValue,`threadRoot`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification(`ptr`: Pointer,`callId`: RustBuffer.ByValue,`application`: RustBuffer.ByValue,`notifyType`: RustBuffer.ByValue,`mentions`: RustBuffer.ByValue, -): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed(`ptr`: Pointer, -): Long fun uniffi_matrix_sdk_ffi_fn_method_room_send_live_location(`ptr`: Pointer,`geoUri`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_send_raw(`ptr`: Pointer,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue, @@ -4054,6 +4162,8 @@ fun uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority(`ptr`: Pointer,`isL ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_set_name(`ptr`: Pointer,`name`: RustBuffer.ByValue, ): Long +fun uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue,`subscribed`: Byte, +): Long fun uniffi_matrix_sdk_ffi_fn_method_room_set_topic(`ptr`: Pointer,`topic`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag(`ptr`: Pointer,`newValue`: Byte, @@ -4282,6 +4392,30 @@ fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description(`ptr`: ): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Unit +fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate(`ptr`: Pointer, +): Long +fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): RustBufferSpaceRoomListPaginationState.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_matrix_sdk_ffi_fn_clone_spaceservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Pointer +fun uniffi_matrix_sdk_ffi_fn_free_spaceservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +): Unit +fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces(`ptr`: Pointer, +): Long +fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list(`ptr`: Pointer,`spaceId`: RustBuffer.ByValue, +): Long +fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces(`ptr`: Pointer,`listener`: Long, +): Long fun uniffi_matrix_sdk_ffi_fn_clone_span(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_free_span(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, @@ -4308,6 +4442,8 @@ fun uniffi_matrix_sdk_ffi_fn_clone_syncservice(`ptr`: Pointer,uniffi_out_err: Un ): Pointer fun uniffi_matrix_sdk_ffi_fn_free_syncservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Unit +fun uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions(`ptr`: Pointer, +): Long fun uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_syncservice_start(`ptr`: Pointer, @@ -4380,25 +4516,25 @@ fun uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption(`ptr`: Pointer,`se ): Unit fun uniffi_matrix_sdk_ffi_fn_method_timeline_send(`ptr`: Pointer,`msg`: Pointer, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio(`ptr`: Pointer,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio(`ptr`: Pointer,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_file(`ptr`: Pointer,`params`: RustBuffer.ByValue,`fileInfo`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_file(`ptr`: Pointer,`params`: RustBuffer.ByValue,`fileInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery(`ptr`: Pointer,`params`: RustBuffer.ByValue,`itemInfos`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_image(`ptr`: Pointer,`params`: RustBuffer.ByValue,`thumbnailPath`: RustBuffer.ByValue,`imageInfo`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_image(`ptr`: Pointer,`params`: RustBuffer.ByValue,`thumbnailSource`: RustBuffer.ByValue,`imageInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_location(`ptr`: Pointer,`body`: RustBuffer.ByValue,`geoUri`: RustBuffer.ByValue,`description`: RustBuffer.ByValue,`zoomLevel`: RustBuffer.ByValue,`assetType`: RustBuffer.ByValue,`replyParams`: RustBuffer.ByValue, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_location(`ptr`: Pointer,`body`: RustBuffer.ByValue,`geoUri`: RustBuffer.ByValue,`description`: RustBuffer.ByValue,`zoomLevel`: RustBuffer.ByValue,`assetType`: RustBuffer.ByValue,`repliedToEventId`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response(`ptr`: Pointer,`pollStartEventId`: RustBuffer.ByValue,`answers`: RustBuffer.ByValue, ): Long fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt(`ptr`: Pointer,`receiptType`: RustBuffer.ByValue,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(`ptr`: Pointer,`msg`: Pointer,`replyParams`: RustBuffer.ByValue, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(`ptr`: Pointer,`msg`: Pointer,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_video(`ptr`: Pointer,`params`: RustBuffer.ByValue,`thumbnailPath`: RustBuffer.ByValue,`videoInfo`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_video(`ptr`: Pointer,`params`: RustBuffer.ByValue,`thumbnailSource`: RustBuffer.ByValue,`videoInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message(`ptr`: Pointer,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,`waveform`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message(`ptr`: Pointer,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,`waveform`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status(`ptr`: Pointer,`listener`: Long, ): Long @@ -4406,28 +4542,6 @@ fun uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(`ptr`: Pointer,`ite ): Long fun uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_timelinediff(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_timelinediff(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_append(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_change(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_set(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_clone_timelineevent(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_matrix_sdk_ffi_fn_free_timelineevent(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, @@ -4550,6 +4664,12 @@ fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener(`vt ): Unit fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate(`vtable`: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate, ): Unit +fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener, +): Unit +fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener, +): Unit +fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener, +): Unit fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver(`vtable`: UniffiVTableCallbackInterfaceSyncServiceStateObserver, ): Unit fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener(`vtable`: UniffiVTableCallbackInterfaceTimelineListener, @@ -4605,8 +4725,8 @@ fun uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name(`roomNa fun uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role(`role`: RustBufferRoomMemberRole.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Long -fun uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level(`powerLevel`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +fun uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level(`powerLevel`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBufferRoomMemberRole.ByValue fun ffi_matrix_sdk_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue @@ -4797,10 +4917,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 61777.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 29703.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 48532.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 13856.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() != 53440.toShort()) { @@ -4851,6 +4971,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 30834.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() != 10688.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_encryption() != 9657.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -4899,7 +5022,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 55934.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 50489.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 32541.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() != 26427.toShort()) { @@ -4941,6 +5064,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 32591.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code() != 3481.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 42911.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -4983,6 +5109,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server() != 63276.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() != 51933.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_session() != 8085.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5013,6 +5142,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 4957.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_space_service() != 31959.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() != 34571.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5043,7 +5175,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 51195.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 28386.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 19369.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_user_id() != 40531.toShort()) { @@ -5067,9 +5199,6 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 56018.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code() != 42452.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 46627.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5133,7 +5262,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 6898.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 33768.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 23935.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 13719.toShort()) { @@ -5214,6 +5343,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 33501.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() != 37773.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() != 61326.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5388,6 +5520,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 9101.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 51696.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 37840.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5487,6 +5622,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 45951.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() != 11947.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 39510.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5514,7 +5652,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 16529.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 8059.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 6449.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 5060.toShort()) { @@ -5529,12 +5667,6 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 27585.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification() != 43366.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed() != 52926.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() != 34248.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5550,6 +5682,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 52127.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 48337.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 5576.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5745,7 +5880,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 18179.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 9145.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 50237.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() != 1297.toShort()) { @@ -5808,6 +5943,30 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 46075.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() != 57707.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() != 33381.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 24664.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 16775.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 55793.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 6768.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() != 10090.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_enter() != 8900.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5823,6 +5982,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 10889.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() != 45579.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 26426.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5907,19 +6069,19 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 9553.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 22559.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 36723.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4588.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4740.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() != 61071.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 25436.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 29043.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 57832.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 39080.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() != 7453.toShort()) { @@ -5928,13 +6090,13 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 31468.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 11149.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 1445.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 52974.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 50042.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 17589.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 46161.toShort()) { @@ -5946,33 +6108,6 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append() != 8453.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change() != 4562.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert() != 26630.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back() != 53464.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front() != 42084.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove() != 74.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset() != 34118.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set() != 13334.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate() != 34040.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() != 11088.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -6153,10 +6288,19 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 37905.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() != 31502.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 11960.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 19262.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 62231.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 30147.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 53990.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 64299.toShort()) { @@ -6909,6 +7053,12 @@ public interface ClientInterface { */ suspend fun `enableAllSendQueues`(`enable`: kotlin.Boolean) + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */ + fun `enableSendQueueUploadProgress`(`enable`: kotlin.Boolean) + fun `encryption`(): Encryption /** @@ -6985,10 +7135,16 @@ public interface ClientInterface { suspend fun `getSessionVerificationController`(): SessionVerificationController /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ - suspend fun `getUrl`(`url`: kotlin.String): kotlin.String + suspend fun `getUrl`(`url`: kotlin.String): kotlin.ByteArray /** * The homeserver this client is configured to use. @@ -7064,6 +7220,21 @@ public interface ClientInterface { */ suspend fun `loginWithOidcCallback`(`callbackUrl`: kotlin.String) + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ + suspend fun `loginWithQrCode`(`qrCodeData`: QrCodeData, `oidcConfiguration`: OidcConfiguration, `progressListener`: QrLoginProgressListener) + /** * Log the current user out. */ @@ -7149,6 +7320,14 @@ public interface ClientInterface { */ fun `server`(): kotlin.String? + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ + suspend fun `serverVendorInfo`(): ServerVendorInfo + fun `session`(): Session /** @@ -7197,6 +7376,8 @@ public interface ClientInterface { */ fun `slidingSyncVersion`(): SlidingSyncVersion + fun `spaceService`(): SpaceService + /** * Returns a handler to start the SSO login process. */ @@ -7264,8 +7445,19 @@ public interface ClientInterface { * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ - suspend fun `urlForOidc`(`oidcConfiguration`: OidcConfiguration, `prompt`: OidcPrompt?, `loginHint`: kotlin.String?): OAuthAuthorizationData + suspend fun `urlForOidc`(`oidcConfiguration`: OidcConfiguration, `prompt`: OidcPrompt?, `loginHint`: kotlin.String?, `deviceId`: kotlin.String?, `additionalScopes`: List?): OAuthAuthorizationData fun `userId`(): kotlin.String @@ -7771,6 +7963,21 @@ open class Client: Disposable, AutoCloseable, ClientInterface ) } + + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */override fun `enableSendQueueUploadProgress`(`enable`: kotlin.Boolean) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + it, FfiConverterBoolean.lower(`enable`),_status) +} + } + + + override fun `encryption`(): Encryption { return FfiConverterTypeEncryption.lift( callWithPointer { @@ -8126,12 +8333,18 @@ open class Client: Disposable, AutoCloseable, ClientInterface /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ @Throws(ClientException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `getUrl`(`url`: kotlin.String) : kotlin.String { + override suspend fun `getUrl`(`url`: kotlin.String) : kotlin.ByteArray { return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_url( @@ -8143,7 +8356,7 @@ open class Client: Disposable, AutoCloseable, ClientInterface { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function - { FfiConverterString.lift(it) }, + { FfiConverterByteArray.lift(it) }, // Error FFI converter ClientException.ErrorHandler, ) @@ -8465,6 +8678,41 @@ open class Client: Disposable, AutoCloseable, ClientInterface } + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ + @Throws(HumanQrLoginException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `loginWithQrCode`(`qrCodeData`: QrCodeData, `oidcConfiguration`: OidcConfiguration, `progressListener`: QrLoginProgressListener) { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + thisPtr, + FfiConverterTypeQrCodeData.lower(`qrCodeData`),FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),FfiConverterTypeQrLoginProgressListener.lower(`progressListener`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + HumanQrLoginException.ErrorHandler, + ) + } + + /** * Log the current user out. */ @@ -8777,6 +9025,33 @@ open class Client: Disposable, AutoCloseable, ClientInterface + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `serverVendorInfo`() : ServerVendorInfo { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation).let { RustBufferServerVendorInfo.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeServerVendorInfo.lift(it) }, + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + @Throws(ClientException::class)override fun `session`(): Session { return FfiConverterTypeSession.lift( callWithPointer { @@ -8996,6 +9271,18 @@ open class Client: Disposable, AutoCloseable, ClientInterface } + override fun `spaceService`(): SpaceService { + return FfiConverterTypeSpaceService.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_space_service( + it, _status) +} + } + ) + } + + /** * Returns a handler to start the SSO login process. @@ -9230,15 +9517,26 @@ open class Client: Disposable, AutoCloseable, ClientInterface * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ @Throws(OidcException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `urlForOidc`(`oidcConfiguration`: OidcConfiguration, `prompt`: OidcPrompt?, `loginHint`: kotlin.String?) : OAuthAuthorizationData { + override suspend fun `urlForOidc`(`oidcConfiguration`: OidcConfiguration, `prompt`: OidcPrompt?, `loginHint`: kotlin.String?, `deviceId`: kotlin.String?, `additionalScopes`: List?) : OAuthAuthorizationData { return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( thisPtr, - FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),FfiConverterOptionalTypeOidcPrompt.lower(`prompt`),FfiConverterOptionalString.lower(`loginHint`), + FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),FfiConverterOptionalTypeOidcPrompt.lower(`prompt`),FfiConverterOptionalString.lower(`loginHint`),FfiConverterOptionalString.lower(`deviceId`),FfiConverterOptionalSequenceString.lower(`additionalScopes`), ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, @@ -9436,22 +9734,6 @@ public interface ClientBuilderInterface { suspend fun `build`(): Client - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ - suspend fun `buildWithQrCode`(`qrCodeData`: QrCodeData, `oidcConfiguration`: OidcConfiguration, `progressListener`: QrLoginProgressListener): Client - fun `crossProcessStoreLocksHolderName`(`holderName`: kotlin.String): ClientBuilder /** @@ -9570,7 +9852,11 @@ public interface ClientBuilderInterface { */ fun `systemIsMemoryConstrained`(): ClientBuilder - fun `threadsEnabled`(`enabled`: kotlin.Boolean): ClientBuilder + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */ + fun `threadsEnabled`(`enabled`: kotlin.Boolean, `threadSubscriptions`: kotlin.Boolean): ClientBuilder fun `userAgent`(`userAgent`: kotlin.String): ClientBuilder @@ -9746,41 +10032,6 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface ) } - - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ - @Throws(HumanQrLoginException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `buildWithQrCode`(`qrCodeData`: QrCodeData, `oidcConfiguration`: OidcConfiguration, `progressListener`: QrLoginProgressListener) : Client { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - thisPtr, - FfiConverterTypeQrCodeData.lower(`qrCodeData`),FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),FfiConverterTypeQrLoginProgressListener.lower(`progressListener`), - ) - }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeClient.lift(it) }, - // Error FFI converter - HumanQrLoginException.ErrorHandler, - ) - } - override fun `crossProcessStoreLocksHolderName`(`holderName`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( callWithPointer { @@ -10109,12 +10360,16 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface } - override fun `threadsEnabled`(`enabled`: kotlin.Boolean): ClientBuilder { + + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */override fun `threadsEnabled`(`enabled`: kotlin.Boolean, `threadSubscriptions`: kotlin.Boolean): ClientBuilder { return FfiConverterTypeClientBuilder.lift( callWithPointer { uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( - it, FfiConverterBoolean.lower(`enabled`),_status) + it, FfiConverterBoolean.lower(`enabled`),FfiConverterBoolean.lower(`threadSubscriptions`),_status) } } ) @@ -11023,6 +11278,11 @@ public interface HomeserverLoginDetailsInterface { */ fun `supportsPasswordLogin`(): kotlin.Boolean + /** + * Whether the current homeserver supports login using legacy SSO. + */ + fun `supportsSsoLogin`(): kotlin.Boolean + /** * The URL of the currently configured homeserver. */ @@ -11175,6 +11435,21 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet + /** + * Whether the current homeserver supports login using legacy SSO. + */override fun `supportsSsoLogin`(): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + it, _status) +} + } + ) + } + + + /** * The URL of the currently configured homeserver. */override fun `url`(): kotlin.String { @@ -14660,6 +14935,16 @@ public interface RoomInterface { fun `encryptionState`(): EncryptionState + /** + * Return the current MSC4306 thread subscription for the given thread root + * in this room. + * + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. + */ + suspend fun `fetchThreadSubscription`(`threadRootEventId`: kotlin.String): ThreadSubscription? + /** * Forget this room. * @@ -14815,6 +15100,8 @@ public interface RoomInterface { */ fun `membership`(): Membership + suspend fun `newLatestEvent`(): LatestEventValue + fun `ownUserId`(): kotlin.String /** @@ -14907,7 +15194,7 @@ public interface RoomInterface { * * Returns an error if the room is not found or on rate limit */ - suspend fun `reportRoom`(`reason`: kotlin.String?) + suspend fun `reportRoom`(`reason`: kotlin.String) suspend fun `resetPowerLevels`(): RoomPowerLevels @@ -14925,39 +15212,6 @@ public interface RoomInterface { */ suspend fun `saveComposerDraft`(`draft`: ComposerDraft, `threadRoot`: kotlin.String?) - /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. - */ - suspend fun `sendCallNotification`(`callId`: kotlin.String, `application`: RtcApplicationType, `notifyType`: NotifyType, `mentions`: Mentions) - - /** - * This will only send a call notification event if appropriate. - * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. - * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify - * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ - suspend fun `sendCallNotificationIfNeeded`(): kotlin.Boolean - /** * Send the current users live location beacon in the room. */ @@ -14983,6 +15237,21 @@ public interface RoomInterface { */ suspend fun `setName`(`name`: kotlin.String) + /** + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. + */ + suspend fun `setThreadSubscription`(`threadRootEventId`: kotlin.String, `subscribed`: kotlin.Boolean) + /** * Sets a new topic in the room. */ @@ -15494,6 +15763,35 @@ open class Room: Disposable, AutoCloseable, RoomInterface + /** + * Return the current MSC4306 thread subscription for the given thread root + * in this room. + * + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `fetchThreadSubscription`(`threadRootEventId`: kotlin.String) : ThreadSubscription? { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + thisPtr, + FfiConverterString.lower(`threadRootEventId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterOptionalTypeThreadSubscription.lift(it) }, + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + /** * Forget this room. * @@ -16199,6 +16497,26 @@ open class Room: Disposable, AutoCloseable, RoomInterface } + + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `newLatestEvent`() : LatestEventValue { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeLatestEventValue.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) + } + override fun `ownUserId`(): kotlin.String { return FfiConverterString.lift( callWithPointer { @@ -16441,12 +16759,12 @@ open class Room: Disposable, AutoCloseable, RoomInterface */ @Throws(ClientException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `reportRoom`(`reason`: kotlin.String?) { + override suspend fun `reportRoom`(`reason`: kotlin.String) { return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_report_room( thisPtr, - FfiConverterOptionalString.lower(`reason`), + FfiConverterString.lower(`reason`), ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, @@ -16554,78 +16872,6 @@ open class Room: Disposable, AutoCloseable, RoomInterface } - /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. - */ - @Throws(ClientException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sendCallNotification`(`callId`: kotlin.String, `application`: RtcApplicationType, `notifyType`: NotifyType, `mentions`: Mentions) { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - thisPtr, - FfiConverterString.lower(`callId`),FfiConverterTypeRtcApplicationType.lower(`application`),FfiConverterTypeNotifyType.lower(`notifyType`),FfiConverterTypeMentions.lower(`mentions`), - ) - }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - ClientException.ErrorHandler, - ) - } - - - /** - * This will only send a call notification event if appropriate. - * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. - * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify - * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ - @Throws(ClientException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sendCallNotificationIfNeeded`() : kotlin.Boolean { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - thisPtr, - - ) - }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, - // lift function - { FfiConverterBoolean.lift(it) }, - // Error FFI converter - ClientException.ErrorHandler, - ) - } - - /** * Send the current users live location beacon in the room. */ @@ -16751,6 +16997,41 @@ open class Room: Disposable, AutoCloseable, RoomInterface } + /** + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `setThreadSubscription`(`threadRootEventId`: kotlin.String, `subscribed`: kotlin.Boolean) { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + thisPtr, + FfiConverterString.lower(`threadRootEventId`),FfiConverterBoolean.lower(`subscribed`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + /** * Sets a new topic in the room. */ @@ -20248,11 +20529,10 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface /** * Returns the room info the preview contains. - */ - @Throws(ClientException::class)override fun `info`(): RoomPreviewInfo { + */override fun `info`(): RoomPreviewInfo { return FfiConverterTypeRoomPreviewInfo.lift( callWithPointer { - uniffiRustCallWithError(ClientException) { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_info( it, _status) } @@ -22087,18 +22367,60 @@ public object FfiConverterTypeSessionVerificationEmoji: FfiConverter + + /** + * Subscribe to pagination updates. + */ + fun `subscribeToPaginationStateUpdates`(`listener`: SpaceRoomListPaginationStateListener): TaskHandle + + /** + * Subscribes to room list updates. + */ + fun `subscribeToRoomUpdate`(`listener`: SpaceRoomListEntriesListener): TaskHandle companion object } -open class Span: Disposable, AutoCloseable, SpanInterface +/** + * The `SpaceRoomList`represents a paginated list of direct rooms + * that belong to a particular space. + * + * It can be used to paginate through the list (and have live updates on the + * pagination state) as well as subscribe to changes as rooms are joined or + * left. + * + * The `SpaceRoomList` also automatically subscribes to client room changes + * and updates the list accordingly as rooms are joined or left. + */ +open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface { constructor(pointer: Pointer) { @@ -22116,39 +22438,6 @@ open class Span: Disposable, AutoCloseable, SpanInterface this.pointer = null this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) } - /** - * Create a span originating at the given callsite (file, line and column). - * - * The target should be something like a module path, and can be referenced - * in the filter string given to `setup_tracing`. `level` and `target` - * for a callsite are fixed at the first creation of a span for that - * callsite and can not be changed afterwards, i.e. the level and - * target passed for second and following creation of a span with the same - * callsite will be ignored. - * - * This function leaks a little bit of memory for each unique (file + - * line + level + target + name) it is called with. Please make sure that - * the number of different combinations of those parameters this can be - * called with is constant in the final executable. - * - * For a span to have an effect, you must `.enter()` it at the start of a - * logical unit of work and `.exit()` it at the end of the same (including - * on failure). Entering registers the span in thread-local storage, so - * future calls to `log_event` on the same thread are able to attach the - * events they create to the span, exiting unregisters it. For this to - * work, exiting a span must be done on the same thread where it was - * entered. It is possible to enter a span on multiple threads, in which - * case it should also be exited on all of them individually; that is, - * unless you *want* the span to be attached to all further events created - * on that thread. - */ - constructor(`file`: kotlin.String, `line`: kotlin.UInt?, `level`: LogLevel, `target`: kotlin.String, `name`: kotlin.String) : - this( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_new( - FfiConverterString.lower(`file`),FfiConverterOptionalUInt.lower(`line`),FfiConverterTypeLogLevel.lower(`level`),FfiConverterString.lower(`target`),FfiConverterString.lower(`name`),_status) -} - ) protected val pointer: Pointer? protected val cleanable: UniffiCleaner.Cleanable @@ -22201,7 +22490,7 @@ open class Span: Disposable, AutoCloseable, SpanInterface override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_span(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(ptr, status) } } } @@ -22209,38 +22498,75 @@ open class Span: Disposable, AutoCloseable, SpanInterface fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_span(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(pointer!!, status) } } - override fun `enter`() - = + + /** + * Ask the list to retrieve the next page if the end hasn't been reached + * yet. Otherwise it no-ops. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `paginate`() { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + + /** + * Returns if the room list is currently paginating or not. + */override fun `paginationState`(): SpaceRoomListPaginationState { + return FfiConverterTypeSpaceRoomListPaginationState.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_enter( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( it, _status) } } - + ) + } - override fun `exit`() - = + + /** + * Return the current list of rooms. + */override fun `rooms`(): List { + return FfiConverterSequenceTypeSpaceRoom.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_exit( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( it, _status) } } - + ) + } - override fun `isNone`(): kotlin.Boolean { - return FfiConverterBoolean.lift( + + /** + * Subscribe to pagination updates. + */override fun `subscribeToPaginationStateUpdates`(`listener`: SpaceRoomListPaginationStateListener): TaskHandle { + return FfiConverterTypeTaskHandle.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_is_none( - it, _status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + it, FfiConverterTypeSpaceRoomListPaginationStateListener.lower(`listener`),_status) } } ) @@ -22248,46 +22574,50 @@ open class Span: Disposable, AutoCloseable, SpanInterface - - - companion object { - fun `current`(): Span { - return FfiConverterTypeSpan.lift( + /** + * Subscribes to room list updates. + */override fun `subscribeToRoomUpdate`(`listener`: SpaceRoomListEntriesListener): TaskHandle { + return FfiConverterTypeTaskHandle.lift( + callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_current( - _status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + it, FfiConverterTypeSpaceRoomListEntriesListener.lower(`listener`),_status) } + } ) } - - } + + + + + companion object } /** * @suppress */ -public object FfiConverterTypeSpan: FfiConverter { +public object FfiConverterTypeSpaceRoomList: FfiConverter { - override fun lower(value: Span): Pointer { + override fun lower(value: SpaceRoomList): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): Span { - return Span(value) + override fun lift(value: Pointer): SpaceRoomList { + return SpaceRoomList(value) } - override fun read(buf: ByteBuffer): Span { + override fun read(buf: ByteBuffer): SpaceRoomList { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: Span) = 8UL + override fun allocationSize(value: SpaceRoomList) = 8UL - override fun write(value: Span, buf: ByteBuffer) { + override fun write(value: SpaceRoomList, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -22394,29 +22724,43 @@ public object FfiConverterTypeSpan: FfiConverter { /** - * An object encapsulating the SSO login flow + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. */ -public interface SsoHandlerInterface { +public interface SpaceServiceInterface { /** - * Completes the SSO login process. + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. */ - suspend fun `finish`(`callbackUrl`: kotlin.String) + suspend fun `joinedSpaces`(): List /** - * Returns the URL for starting SSO authentication. The URL should be - * opened in a web view. Once the web view succeeds, call `finish` with - * the callback URL. + * Returns a `SpaceRoomList` for the given space ID. */ - fun `url`(): kotlin.String + suspend fun `spaceRoomList`(`spaceId`: kotlin.String): SpaceRoomList + + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ + suspend fun `subscribeToJoinedSpaces`(`listener`: SpaceServiceJoinedSpacesListener): TaskHandle companion object } /** - * An object encapsulating the SSO login flow + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. */ -open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface +open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface { constructor(pointer: Pointer) { @@ -22486,7 +22830,7 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_ssohandler(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_spaceservice(ptr, status) } } } @@ -22494,51 +22838,82 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_ssohandler(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_spaceservice(pointer!!, status) } } /** - * Completes the SSO login process. + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. */ - @Throws(SsoException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `finish`(`callbackUrl`: kotlin.String) { + override suspend fun `joinedSpaces`() : List { return uniffiRustCallAsync( callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( thisPtr, - FfiConverterString.lower(`callbackUrl`), + ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function - { Unit }, - + { FfiConverterSequenceTypeSpaceRoom.lift(it) }, // Error FFI converter - SsoException.ErrorHandler, + UniffiNullRustCallStatusErrorHandler, ) } /** - * Returns the URL for starting SSO authentication. The URL should be - * opened in a web view. Once the web view succeeds, call `finish` with - * the callback URL. - */override fun `url`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( - it, _status) -} - } + * Returns a `SpaceRoomList` for the given space ID. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `spaceRoomList`(`spaceId`: kotlin.String) : SpaceRoomList { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + thisPtr, + FfiConverterString.lower(`spaceId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeSpaceRoomList.lift(it) }, + // Error FFI converter + ClientException.ErrorHandler, ) } + + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `subscribeToJoinedSpaces`(`listener`: SpaceServiceJoinedSpacesListener) : TaskHandle { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + thisPtr, + FfiConverterTypeSpaceServiceJoinedSpacesListener.lower(`listener`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeTaskHandle.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) + } @@ -22551,25 +22926,25 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface /** * @suppress */ -public object FfiConverterTypeSsoHandler: FfiConverter { +public object FfiConverterTypeSpaceService: FfiConverter { - override fun lower(value: SsoHandler): Pointer { + override fun lower(value: SpaceService): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): SsoHandler { - return SsoHandler(value) + override fun lift(value: Pointer): SpaceService { + return SpaceService(value) } - override fun read(buf: ByteBuffer): SsoHandler { + override fun read(buf: ByteBuffer): SpaceService { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: SsoHandler) = 8UL + override fun allocationSize(value: SpaceService) = 8UL - override fun write(value: SsoHandler, buf: ByteBuffer) { + override fun write(value: SpaceService, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -22675,20 +23050,18 @@ public object FfiConverterTypeSsoHandler: FfiConverter { // -public interface SyncServiceInterface { - - fun `roomListService`(): RoomListService +public interface SpanInterface { - suspend fun `start`() + fun `enter`() - fun `state`(`listener`: SyncServiceStateObserver): TaskHandle + fun `exit`() - suspend fun `stop`() + fun `isNone`(): kotlin.Boolean companion object } -open class SyncService: Disposable, AutoCloseable, SyncServiceInterface +open class Span: Disposable, AutoCloseable, SpanInterface { constructor(pointer: Pointer) { @@ -22706,6 +23079,39 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface this.pointer = null this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) } + /** + * Create a span originating at the given callsite (file, line and column). + * + * The target should be something like a module path, and can be referenced + * in the filter string given to `setup_tracing`. `level` and `target` + * for a callsite are fixed at the first creation of a span for that + * callsite and can not be changed afterwards, i.e. the level and + * target passed for second and following creation of a span with the same + * callsite will be ignored. + * + * This function leaks a little bit of memory for each unique (file + + * line + level + target + name) it is called with. Please make sure that + * the number of different combinations of those parameters this can be + * called with is constant in the final executable. + * + * For a span to have an effect, you must `.enter()` it at the start of a + * logical unit of work and `.exit()` it at the end of the same (including + * on failure). Entering registers the span in thread-local storage, so + * future calls to `log_event` on the same thread are able to attach the + * events they create to the span, exiting unregisters it. For this to + * work, exiting a span must be done on the same thread where it was + * entered. It is possible to enter a span on multiple threads, in which + * case it should also be exited on all of them individually; that is, + * unless you *want* the span to be attached to all further events created + * on that thread. + */ + constructor(`file`: kotlin.String, `line`: kotlin.UInt?, `level`: LogLevel, `target`: kotlin.String, `name`: kotlin.String) : + this( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_new( + FfiConverterString.lower(`file`),FfiConverterOptionalUInt.lower(`line`),FfiConverterTypeLogLevel.lower(`level`),FfiConverterString.lower(`target`),FfiConverterString.lower(`name`),_status) +} + ) protected val pointer: Pointer? protected val cleanable: UniffiCleaner.Cleanable @@ -22758,7 +23164,7 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservice(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_span(ptr, status) } } } @@ -22766,49 +23172,38 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservice(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_span(pointer!!, status) } } - override fun `roomListService`(): RoomListService { - return FfiConverterTypeRoomListService.lift( + override fun `enter`() + = callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_enter( it, _status) } } - ) - } - - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `start`() { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_start( - thisPtr, - - ) - }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + + override fun `exit`() + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_exit( + it, _status) +} } + + - override fun `state`(`listener`: SyncServiceStateObserver): TaskHandle { - return FfiConverterTypeTaskHandle.lift( + override fun `isNone`(): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_state( - it, FfiConverterTypeSyncServiceStateObserver.lower(`listener`),_status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_is_none( + it, _status) } } ) @@ -22816,56 +23211,46 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `stop`() { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( - thisPtr, - - ) - }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, + + + companion object { + fun `current`(): Span { + return FfiConverterTypeSpan.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_current( + _status) +} ) } - - - - companion object + + } } /** * @suppress */ -public object FfiConverterTypeSyncService: FfiConverter { +public object FfiConverterTypeSpan: FfiConverter { - override fun lower(value: SyncService): Pointer { + override fun lower(value: Span): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): SyncService { - return SyncService(value) + override fun lift(value: Pointer): Span { + return Span(value) } - override fun read(buf: ByteBuffer): SyncService { + override fun read(buf: ByteBuffer): Span { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: SyncService) = 8UL + override fun allocationSize(value: Span) = 8UL - override fun write(value: SyncService, buf: ByteBuffer) { + override fun write(value: Span, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -22971,23 +23356,30 @@ public object FfiConverterTypeSyncService: FfiConverter { // -public interface SyncServiceBuilderInterface { - - suspend fun `finish`(): SyncService - - fun `withCrossProcessLock`(): SyncServiceBuilder +/** + * An object encapsulating the SSO login flow + */ +public interface SsoHandlerInterface { /** - * Enable the "offline" mode for the [`SyncService`]. + * Completes the SSO login process. */ - fun `withOfflineMode`(): SyncServiceBuilder + suspend fun `finish`(`callbackUrl`: kotlin.String) - fun `withSharePos`(`enable`: kotlin.Boolean): SyncServiceBuilder + /** + * Returns the URL for starting SSO authentication. The URL should be + * opened in a web view. Once the web view succeeds, call `finish` with + * the callback URL. + */ + fun `url`(): kotlin.String companion object } -open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInterface +/** + * An object encapsulating the SSO login flow + */ +open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface { constructor(pointer: Pointer) { @@ -23057,7 +23449,7 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_ssohandler(ptr, status) } } } @@ -23065,51 +23457,45 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_ssohandler(pointer!!, status) } } - @Throws(ClientException::class) + /** + * Completes the SSO login process. + */ + @Throws(SsoException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `finish`() : SyncService { + override suspend fun `finish`(`callbackUrl`: kotlin.String) { return uniffiRustCallAsync( callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( thisPtr, - + FfiConverterString.lower(`callbackUrl`), ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function - { FfiConverterTypeSyncService.lift(it) }, + { Unit }, + // Error FFI converter - ClientException.ErrorHandler, - ) - } - - override fun `withCrossProcessLock`(): SyncServiceBuilder { - return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( - it, _status) -} - } + SsoException.ErrorHandler, ) } - /** - * Enable the "offline" mode for the [`SyncService`]. - */override fun `withOfflineMode`(): SyncServiceBuilder { - return FfiConverterTypeSyncServiceBuilder.lift( + * Returns the URL for starting SSO authentication. The URL should be + * opened in a web view. Once the web view succeeds, call `finish` with + * the callback URL. + */override fun `url`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( it, _status) } } @@ -23117,18 +23503,6 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte } - override fun `withSharePos`(`enable`: kotlin.Boolean): SyncServiceBuilder { - return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( - it, FfiConverterBoolean.lower(`enable`),_status) -} - } - ) - } - - @@ -23140,25 +23514,25 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte /** * @suppress */ -public object FfiConverterTypeSyncServiceBuilder: FfiConverter { +public object FfiConverterTypeSsoHandler: FfiConverter { - override fun lower(value: SyncServiceBuilder): Pointer { + override fun lower(value: SsoHandler): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): SyncServiceBuilder { - return SyncServiceBuilder(value) + override fun lift(value: Pointer): SsoHandler { + return SsoHandler(value) } - override fun read(buf: ByteBuffer): SyncServiceBuilder { + override fun read(buf: ByteBuffer): SsoHandler { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: SyncServiceBuilder) = 8UL + override fun allocationSize(value: SsoHandler) = 8UL - override fun write(value: SyncServiceBuilder, buf: ByteBuffer) { + override fun write(value: SsoHandler, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -23264,31 +23638,29 @@ public object FfiConverterTypeSyncServiceBuilder: FfiConverter uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_taskhandle(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservice(ptr, status) } } } @@ -23366,30 +23738,77 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_taskhandle(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservice(pointer!!, status) } } - override fun `cancel`() - = + + /** + * Force expiring both sliding sync sessions. + * + * This ensures that the sync service is stopped before expiring both + * sessions. It should be used sparingly, as it will cause a restart of + * the sessions on the server as well. + */ + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `expireSessions`() { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) + } + + override fun `roomListService`(): RoomListService { + return FfiConverterTypeRoomListService.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( it, _status) } } - + ) + } - /** - * Check whether the handle is finished. - */override fun `isFinished`(): kotlin.Boolean { - return FfiConverterBoolean.lift( + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `start`() { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_start( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) + } + + override fun `state`(`listener`: SyncServiceStateObserver): TaskHandle { + return FfiConverterTypeTaskHandle.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( - it, _status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_state( + it, FfiConverterTypeSyncServiceStateObserver.lower(`listener`),_status) } } ) @@ -23397,6 +23816,27 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `stop`() { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) + } + + @@ -23407,25 +23847,25 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface /** * @suppress */ -public object FfiConverterTypeTaskHandle: FfiConverter { +public object FfiConverterTypeSyncService: FfiConverter { - override fun lower(value: TaskHandle): Pointer { + override fun lower(value: SyncService): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): TaskHandle { - return TaskHandle(value) + override fun lift(value: Pointer): SyncService { + return SyncService(value) } - override fun read(buf: ByteBuffer): TaskHandle { + override fun read(buf: ByteBuffer): SyncService { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: TaskHandle) = 8UL + override fun allocationSize(value: SyncService) = 8UL - override fun write(value: TaskHandle, buf: ByteBuffer) { + override fun write(value: SyncService, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -23531,16 +23971,23 @@ public object FfiConverterTypeTaskHandle: FfiConverter { // -public interface ThreadSummaryInterface { +public interface SyncServiceBuilderInterface { - fun `latestEvent`(): EmbeddedEventDetails + suspend fun `finish`(): SyncService - fun `numReplies`(): kotlin.ULong + fun `withCrossProcessLock`(): SyncServiceBuilder + + /** + * Enable the "offline" mode for the [`SyncService`]. + */ + fun `withOfflineMode`(): SyncServiceBuilder + + fun `withSharePos`(`enable`: kotlin.Boolean): SyncServiceBuilder companion object } -open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface +open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInterface { constructor(pointer: Pointer) { @@ -23610,7 +24057,7 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_threadsummary(ptr, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(ptr, status) } } } @@ -23618,15 +24065,36 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface fun uniffiClonePointer(): Pointer { return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_threadsummary(pointer!!, status) + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(pointer!!, status) } } - override fun `latestEvent`(): EmbeddedEventDetails { - return FfiConverterTypeEmbeddedEventDetails.lift( + + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `finish`() : SyncService { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeSyncService.lift(it) }, + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + override fun `withCrossProcessLock`(): SyncServiceBuilder { + return FfiConverterTypeSyncServiceBuilder.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( it, _status) } } @@ -23634,11 +24102,14 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface } - override fun `numReplies`(): kotlin.ULong { - return FfiConverterULong.lift( + + /** + * Enable the "offline" mode for the [`SyncService`]. + */override fun `withOfflineMode`(): SyncServiceBuilder { + return FfiConverterTypeSyncServiceBuilder.lift( callWithPointer { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( it, _status) } } @@ -23646,6 +24117,18 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface } + override fun `withSharePos`(`enable`: kotlin.Boolean): SyncServiceBuilder { + return FfiConverterTypeSyncServiceBuilder.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( + it, FfiConverterBoolean.lower(`enable`),_status) +} + } + ) + } + + @@ -23657,25 +24140,542 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface /** * @suppress */ -public object FfiConverterTypeThreadSummary: FfiConverter { +public object FfiConverterTypeSyncServiceBuilder: FfiConverter { - override fun lower(value: ThreadSummary): Pointer { + override fun lower(value: SyncServiceBuilder): Pointer { return value.uniffiClonePointer() } - override fun lift(value: Pointer): ThreadSummary { - return ThreadSummary(value) + override fun lift(value: Pointer): SyncServiceBuilder { + return SyncServiceBuilder(value) } - override fun read(buf: ByteBuffer): ThreadSummary { + override fun read(buf: ByteBuffer): SyncServiceBuilder { // The Rust code always writes pointers as 8 bytes, and will // fail to compile if they don't fit. return lift(Pointer(buf.getLong())) } - override fun allocationSize(value: ThreadSummary) = 8UL + override fun allocationSize(value: SyncServiceBuilder) = 8UL - override fun write(value: ThreadSummary, buf: ByteBuffer) { + override fun write(value: SyncServiceBuilder, buf: ByteBuffer) { + // The Rust code always expects pointers written as 8 bytes, + // and will fail to compile if they don't fit. + buf.putLong(Pointer.nativeValue(lower(value))) + } +} + + +// This template implements a class for working with a Rust struct via a Pointer/Arc +// to the live Rust struct on the other side of the FFI. +// +// Each instance implements core operations for working with the Rust `Arc` and the +// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. +// +// There's some subtlety here, because we have to be careful not to operate on a Rust +// struct after it has been dropped, and because we must expose a public API for freeing +// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: +// +// * Each instance holds an opaque pointer to the underlying Rust struct. +// Method calls need to read this pointer from the object's state and pass it in to +// the Rust FFI. +// +// * When an instance is no longer needed, its pointer should be passed to a +// special destructor function provided by the Rust FFI, which will drop the +// underlying Rust struct. +// +// * Given an instance, calling code is expected to call the special +// `destroy` method in order to free it after use, either by calling it explicitly +// or by using a higher-level helper like the `use` method. Failing to do so risks +// leaking the underlying Rust struct. +// +// * We can't assume that calling code will do the right thing, and must be prepared +// to handle Kotlin method calls executing concurrently with or even after a call to +// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. +// +// * We must never allow Rust code to operate on the underlying Rust struct after +// the destructor has been called, and must never call the destructor more than once. +// Doing so may trigger memory unsafety. +// +// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` +// is implemented to call the destructor when the Kotlin object becomes unreachable. +// This is done in a background thread. This is not a panacea, and client code should be aware that +// 1. the thread may starve if some there are objects that have poorly performing +// `drop` methods or do significant work in their `drop` methods. +// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, +// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). +// +// If we try to implement this with mutual exclusion on access to the pointer, there is the +// possibility of a race between a method call and a concurrent call to `destroy`: +// +// * Thread A starts a method call, reads the value of the pointer, but is interrupted +// before it can pass the pointer over the FFI to Rust. +// * Thread B calls `destroy` and frees the underlying Rust struct. +// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// a use-after-free. +// +// One possible solution would be to use a `ReadWriteLock`, with each method call taking +// a read lock (and thus allowed to run concurrently) and the special `destroy` method +// taking a write lock (and thus blocking on live method calls). However, we aim not to +// generate methods with any hidden blocking semantics, and a `destroy` method that might +// block if called incorrectly seems to meet that bar. +// +// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track +// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` +// has been called. These are updated according to the following rules: +// +// * The initial value of the counter is 1, indicating a live object with no in-flight calls. +// The initial value for the flag is false. +// +// * At the start of each method call, we atomically check the counter. +// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. +// If it is nonzero them we atomically increment it by 1 and proceed with the method call. +// +// * At the end of each method call, we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// * When `destroy` is called, we atomically flip the flag from false to true. +// If the flag was already true we silently fail. +// Otherwise we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, +// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. +// +// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been +// called *and* all in-flight method calls have completed, avoiding violating any of the expectations +// of the underlying Rust code. +// +// This makes a cleaner a better alternative to _not_ calling `destroy()` as +// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` +// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner +// thread may be starved, and the app will leak memory. +// +// In this case, `destroy`ing manually may be a better solution. +// +// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects +// with Rust peers are reclaimed: +// +// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: +// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: +// 3. The memory is reclaimed when the process terminates. +// +// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 +// + + +/** + * A task handle is a way to keep the handle a task running by itself in + * detached mode. + * + * It's a thin wrapper around [`JoinHandle`]. + */ +public interface TaskHandleInterface { + + fun `cancel`() + + /** + * Check whether the handle is finished. + */ + fun `isFinished`(): kotlin.Boolean + + companion object +} + +/** + * A task handle is a way to keep the handle a task running by itself in + * detached mode. + * + * It's a thin wrapper around [`JoinHandle`]. + */ +open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface +{ + + constructor(pointer: Pointer) { + this.pointer = pointer + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + } + + /** + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + @Suppress("UNUSED_PARAMETER") + constructor(noPointer: NoPointer) { + this.pointer = null + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + } + + protected val pointer: Pointer? + protected val cleanable: UniffiCleaner.Cleanable + + private val wasDestroyed = AtomicBoolean(false) + private val callCounter = AtomicLong(1) + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + @Synchronized + override fun close() { + this.destroy() + } + + internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.get() + if (c == 0L) { + throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the pointer being freed concurrently. + try { + return block(this.uniffiClonePointer()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + override fun run() { + pointer?.let { ptr -> + uniffiRustCall { status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_taskhandle(ptr, status) + } + } + } + } + + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_taskhandle(pointer!!, status) + } + } + + override fun `cancel`() + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( + it, _status) +} + } + + + + + /** + * Check whether the handle is finished. + */override fun `isFinished`(): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( + it, _status) +} + } + ) + } + + + + + + + companion object + +} + +/** + * @suppress + */ +public object FfiConverterTypeTaskHandle: FfiConverter { + + override fun lower(value: TaskHandle): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): TaskHandle { + return TaskHandle(value) + } + + override fun read(buf: ByteBuffer): TaskHandle { + // The Rust code always writes pointers as 8 bytes, and will + // fail to compile if they don't fit. + return lift(Pointer(buf.getLong())) + } + + override fun allocationSize(value: TaskHandle) = 8UL + + override fun write(value: TaskHandle, buf: ByteBuffer) { + // The Rust code always expects pointers written as 8 bytes, + // and will fail to compile if they don't fit. + buf.putLong(Pointer.nativeValue(lower(value))) + } +} + + +// This template implements a class for working with a Rust struct via a Pointer/Arc +// to the live Rust struct on the other side of the FFI. +// +// Each instance implements core operations for working with the Rust `Arc` and the +// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. +// +// There's some subtlety here, because we have to be careful not to operate on a Rust +// struct after it has been dropped, and because we must expose a public API for freeing +// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: +// +// * Each instance holds an opaque pointer to the underlying Rust struct. +// Method calls need to read this pointer from the object's state and pass it in to +// the Rust FFI. +// +// * When an instance is no longer needed, its pointer should be passed to a +// special destructor function provided by the Rust FFI, which will drop the +// underlying Rust struct. +// +// * Given an instance, calling code is expected to call the special +// `destroy` method in order to free it after use, either by calling it explicitly +// or by using a higher-level helper like the `use` method. Failing to do so risks +// leaking the underlying Rust struct. +// +// * We can't assume that calling code will do the right thing, and must be prepared +// to handle Kotlin method calls executing concurrently with or even after a call to +// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. +// +// * We must never allow Rust code to operate on the underlying Rust struct after +// the destructor has been called, and must never call the destructor more than once. +// Doing so may trigger memory unsafety. +// +// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` +// is implemented to call the destructor when the Kotlin object becomes unreachable. +// This is done in a background thread. This is not a panacea, and client code should be aware that +// 1. the thread may starve if some there are objects that have poorly performing +// `drop` methods or do significant work in their `drop` methods. +// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, +// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). +// +// If we try to implement this with mutual exclusion on access to the pointer, there is the +// possibility of a race between a method call and a concurrent call to `destroy`: +// +// * Thread A starts a method call, reads the value of the pointer, but is interrupted +// before it can pass the pointer over the FFI to Rust. +// * Thread B calls `destroy` and frees the underlying Rust struct. +// * Thread A resumes, passing the already-read pointer value to Rust and triggering +// a use-after-free. +// +// One possible solution would be to use a `ReadWriteLock`, with each method call taking +// a read lock (and thus allowed to run concurrently) and the special `destroy` method +// taking a write lock (and thus blocking on live method calls). However, we aim not to +// generate methods with any hidden blocking semantics, and a `destroy` method that might +// block if called incorrectly seems to meet that bar. +// +// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track +// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` +// has been called. These are updated according to the following rules: +// +// * The initial value of the counter is 1, indicating a live object with no in-flight calls. +// The initial value for the flag is false. +// +// * At the start of each method call, we atomically check the counter. +// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. +// If it is nonzero them we atomically increment it by 1 and proceed with the method call. +// +// * At the end of each method call, we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// * When `destroy` is called, we atomically flip the flag from false to true. +// If the flag was already true we silently fail. +// Otherwise we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, +// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. +// +// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been +// called *and* all in-flight method calls have completed, avoiding violating any of the expectations +// of the underlying Rust code. +// +// This makes a cleaner a better alternative to _not_ calling `destroy()` as +// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` +// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner +// thread may be starved, and the app will leak memory. +// +// In this case, `destroy`ing manually may be a better solution. +// +// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects +// with Rust peers are reclaimed: +// +// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: +// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: +// 3. The memory is reclaimed when the process terminates. +// +// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 +// + + +public interface ThreadSummaryInterface { + + fun `latestEvent`(): EmbeddedEventDetails + + fun `numReplies`(): kotlin.ULong + + companion object +} + +open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface +{ + + constructor(pointer: Pointer) { + this.pointer = pointer + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + } + + /** + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + @Suppress("UNUSED_PARAMETER") + constructor(noPointer: NoPointer) { + this.pointer = null + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + } + + protected val pointer: Pointer? + protected val cleanable: UniffiCleaner.Cleanable + + private val wasDestroyed = AtomicBoolean(false) + private val callCounter = AtomicLong(1) + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + @Synchronized + override fun close() { + this.destroy() + } + + internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.get() + if (c == 0L) { + throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the pointer being freed concurrently. + try { + return block(this.uniffiClonePointer()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { + override fun run() { + pointer?.let { ptr -> + uniffiRustCall { status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_threadsummary(ptr, status) + } + } + } + } + + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_threadsummary(pointer!!, status) + } + } + + override fun `latestEvent`(): EmbeddedEventDetails { + return FfiConverterTypeEmbeddedEventDetails.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + it, _status) +} + } + ) + } + + + override fun `numReplies`(): kotlin.ULong { + return FfiConverterULong.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + it, _status) +} + } + ) + } + + + + + + + companion object + +} + +/** + * @suppress + */ +public object FfiConverterTypeThreadSummary: FfiConverter { + + override fun lower(value: ThreadSummary): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): ThreadSummary { + return ThreadSummary(value) + } + + override fun read(buf: ByteBuffer): ThreadSummary { + // The Rust code always writes pointers as 8 bytes, and will + // fail to compile if they don't fit. + return lift(Pointer(buf.getLong())) + } + + override fun allocationSize(value: ThreadSummary) = 8UL + + override fun write(value: ThreadSummary, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) @@ -23884,15 +24884,15 @@ public interface TimelineInterface { */ suspend fun `send`(`msg`: RoomMessageEventContentWithoutRelation): SendHandle - fun `sendAudio`(`params`: UploadParameters, `audioInfo`: AudioInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle + fun `sendAudio`(`params`: UploadParameters, `audioInfo`: AudioInfo): SendAttachmentJoinHandle - fun `sendFile`(`params`: UploadParameters, `fileInfo`: FileInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle + fun `sendFile`(`params`: UploadParameters, `fileInfo`: FileInfo): SendAttachmentJoinHandle fun `sendGallery`(`params`: GalleryUploadParameters, `itemInfos`: List): SendGalleryJoinHandle - fun `sendImage`(`params`: UploadParameters, `thumbnailPath`: kotlin.String?, `imageInfo`: ImageInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle + fun `sendImage`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `imageInfo`: ImageInfo): SendAttachmentJoinHandle - suspend fun `sendLocation`(`body`: kotlin.String, `geoUri`: kotlin.String, `description`: kotlin.String?, `zoomLevel`: kotlin.UByte?, `assetType`: AssetType?, `replyParams`: ReplyParameters?) + suspend fun `sendLocation`(`body`: kotlin.String, `geoUri`: kotlin.String, `description`: kotlin.String?, `zoomLevel`: kotlin.UByte?, `assetType`: AssetType?, `repliedToEventId`: kotlin.String?) suspend fun `sendPollResponse`(`pollStartEventId`: kotlin.String, `answers`: List) @@ -23905,11 +24905,11 @@ public interface TimelineInterface { * reply so that clients that support threads can render the reply * inside the thread. */ - suspend fun `sendReply`(`msg`: RoomMessageEventContentWithoutRelation, `replyParams`: ReplyParameters) + suspend fun `sendReply`(`msg`: RoomMessageEventContentWithoutRelation, `eventId`: kotlin.String) - fun `sendVideo`(`params`: UploadParameters, `thumbnailPath`: kotlin.String?, `videoInfo`: VideoInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle + fun `sendVideo`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `videoInfo`: VideoInfo): SendAttachmentJoinHandle - fun `sendVoiceMessage`(`params`: UploadParameters, `audioInfo`: AudioInfo, `waveform`: List, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle + fun `sendVoiceMessage`(`params`: UploadParameters, `audioInfo`: AudioInfo, `waveform`: List): SendAttachmentJoinHandle suspend fun `subscribeToBackPaginationStatus`(`listener`: PaginationStatusListener): TaskHandle @@ -24414,12 +25414,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface } - @Throws(RoomException::class)override fun `sendAudio`(`params`: UploadParameters, `audioInfo`: AudioInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle { + @Throws(RoomException::class)override fun `sendAudio`(`params`: UploadParameters, `audioInfo`: AudioInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( callWithPointer { uniffiRustCallWithError(RoomException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`),_status) + it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),_status) } } ) @@ -24427,12 +25427,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface - @Throws(RoomException::class)override fun `sendFile`(`params`: UploadParameters, `fileInfo`: FileInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle { + @Throws(RoomException::class)override fun `sendFile`(`params`: UploadParameters, `fileInfo`: FileInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( callWithPointer { uniffiRustCallWithError(RoomException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeFileInfo.lower(`fileInfo`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`),_status) + it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeFileInfo.lower(`fileInfo`),_status) } } ) @@ -24453,12 +25453,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface - @Throws(RoomException::class)override fun `sendImage`(`params`: UploadParameters, `thumbnailPath`: kotlin.String?, `imageInfo`: ImageInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle { + @Throws(RoomException::class)override fun `sendImage`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `imageInfo`: ImageInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( callWithPointer { uniffiRustCallWithError(RoomException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalString.lower(`thumbnailPath`),FfiConverterTypeImageInfo.lower(`imageInfo`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`),_status) + it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeImageInfo.lower(`imageInfo`),_status) } } ) @@ -24468,12 +25468,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Throws(ClientException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sendLocation`(`body`: kotlin.String, `geoUri`: kotlin.String, `description`: kotlin.String?, `zoomLevel`: kotlin.UByte?, `assetType`: AssetType?, `replyParams`: ReplyParameters?) { + override suspend fun `sendLocation`(`body`: kotlin.String, `geoUri`: kotlin.String, `description`: kotlin.String?, `zoomLevel`: kotlin.UByte?, `assetType`: AssetType?, `repliedToEventId`: kotlin.String?) { return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( thisPtr, - FfiConverterString.lower(`body`),FfiConverterString.lower(`geoUri`),FfiConverterOptionalString.lower(`description`),FfiConverterOptionalUByte.lower(`zoomLevel`),FfiConverterOptionalTypeAssetType.lower(`assetType`),FfiConverterOptionalTypeReplyParameters.lower(`replyParams`), + FfiConverterString.lower(`body`),FfiConverterString.lower(`geoUri`),FfiConverterOptionalString.lower(`description`),FfiConverterOptionalUByte.lower(`zoomLevel`),FfiConverterOptionalTypeAssetType.lower(`assetType`),FfiConverterOptionalString.lower(`repliedToEventId`), ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, @@ -24541,12 +25541,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface */ @Throws(ClientException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sendReply`(`msg`: RoomMessageEventContentWithoutRelation, `replyParams`: ReplyParameters) { + override suspend fun `sendReply`(`msg`: RoomMessageEventContentWithoutRelation, `eventId`: kotlin.String) { return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( thisPtr, - FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(`msg`),FfiConverterTypeReplyParameters.lower(`replyParams`), + FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(`msg`),FfiConverterString.lower(`eventId`), ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, @@ -24561,12 +25561,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface } - @Throws(RoomException::class)override fun `sendVideo`(`params`: UploadParameters, `thumbnailPath`: kotlin.String?, `videoInfo`: VideoInfo, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle { + @Throws(RoomException::class)override fun `sendVideo`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `videoInfo`: VideoInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( callWithPointer { uniffiRustCallWithError(RoomException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalString.lower(`thumbnailPath`),FfiConverterTypeVideoInfo.lower(`videoInfo`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`),_status) + it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeVideoInfo.lower(`videoInfo`),_status) } } ) @@ -24574,12 +25574,12 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface - @Throws(RoomException::class)override fun `sendVoiceMessage`(`params`: UploadParameters, `audioInfo`: AudioInfo, `waveform`: List, `progressWatcher`: ProgressWatcher?): SendAttachmentJoinHandle { + @Throws(RoomException::class)override fun `sendVoiceMessage`(`params`: UploadParameters, `audioInfo`: AudioInfo, `waveform`: List): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( callWithPointer { uniffiRustCallWithError(RoomException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),FfiConverterSequenceUShort.lower(`waveform`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`),_status) + it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),FfiConverterSequenceUShort.lower(`waveform`),_status) } } ) @@ -24805,354 +25805,6 @@ public object FfiConverterTypeTimeline: FfiConverter { // -public interface TimelineDiffInterface { - - fun `append`(): List? - - fun `change`(): TimelineChange - - fun `insert`(): InsertData? - - fun `pushBack`(): TimelineItem? - - fun `pushFront`(): TimelineItem? - - fun `remove`(): kotlin.UInt? - - fun `reset`(): List? - - fun `set`(): SetData? - - fun `truncate`(): kotlin.UInt? - - companion object -} - -open class TimelineDiff: Disposable, AutoCloseable, TimelineDiffInterface -{ - - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - - /** - * This constructor can be used to instantiate a fake object. Only used for tests. Any - * attempt to actually use an object constructed this way will fail as there is no - * connected Rust object. - */ - @Suppress("UNUSED_PARAMETER") - constructor(noPointer: NoPointer) { - this.pointer = null - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) - } - - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable - - private val wasDestroyed = AtomicBoolean(false) - private val callCounter = AtomicLong(1) - - override fun destroy() { - // Only allow a single call to this method. - // TODO: maybe we should log a warning if called more than once? - if (this.wasDestroyed.compareAndSet(false, true)) { - // This decrement always matches the initial count of 1 given at creation time. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } - } - } - - @Synchronized - override fun close() { - this.destroy() - } - - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { - // Check and increment the call counter, to keep the object alive. - // This needs a compare-and-set retry loop in case of concurrent updates. - do { - val c = this.callCounter.get() - if (c == 0L) { - throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") - } - if (c == Long.MAX_VALUE) { - throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") - } - } while (! this.callCounter.compareAndSet(c, c + 1L)) - // Now we can safely do the method call without the pointer being freed concurrently. - try { - return block(this.uniffiClonePointer()) - } finally { - // This decrement always matches the increment we performed above. - if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() - } - } - } - - // Use a static inner class instead of a closure so as not to accidentally - // capture `this` as part of the cleanable's action. - private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { - override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_timelinediff(ptr, status) - } - } - } - } - - fun uniffiClonePointer(): Pointer { - return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_timelinediff(pointer!!, status) - } - } - - override fun `append`(): List? { - return FfiConverterOptionalSequenceTypeTimelineItem.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - it, _status) -} - } - ) - } - - - override fun `change`(): TimelineChange { - return FfiConverterTypeTimelineChange.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - it, _status) -} - } - ) - } - - - override fun `insert`(): InsertData? { - return FfiConverterOptionalTypeInsertData.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - it, _status) -} - } - ) - } - - - override fun `pushBack`(): TimelineItem? { - return FfiConverterOptionalTypeTimelineItem.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - it, _status) -} - } - ) - } - - - override fun `pushFront`(): TimelineItem? { - return FfiConverterOptionalTypeTimelineItem.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - it, _status) -} - } - ) - } - - - override fun `remove`(): kotlin.UInt? { - return FfiConverterOptionalUInt.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - it, _status) -} - } - ) - } - - - override fun `reset`(): List? { - return FfiConverterOptionalSequenceTypeTimelineItem.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - it, _status) -} - } - ) - } - - - override fun `set`(): SetData? { - return FfiConverterOptionalTypeSetData.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - it, _status) -} - } - ) - } - - - override fun `truncate`(): kotlin.UInt? { - return FfiConverterOptionalUInt.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - it, _status) -} - } - ) - } - - - - - - - companion object - -} - -/** - * @suppress - */ -public object FfiConverterTypeTimelineDiff: FfiConverter { - - override fun lower(value: TimelineDiff): Pointer { - return value.uniffiClonePointer() - } - - override fun lift(value: Pointer): TimelineDiff { - return TimelineDiff(value) - } - - override fun read(buf: ByteBuffer): TimelineDiff { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) - } - - override fun allocationSize(value: TimelineDiff) = 8UL - - override fun write(value: TimelineDiff, buf: ByteBuffer) { - // The Rust code always expects pointers written as 8 bytes, - // and will fail to compile if they don't fit. - buf.putLong(Pointer.nativeValue(lower(value))) - } -} - - -// This template implements a class for working with a Rust struct via a Pointer/Arc -// to the live Rust struct on the other side of the FFI. -// -// Each instance implements core operations for working with the Rust `Arc` and the -// Kotlin Pointer to work with the live Rust struct on the other side of the FFI. -// -// There's some subtlety here, because we have to be careful not to operate on a Rust -// struct after it has been dropped, and because we must expose a public API for freeing -// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: -// -// * Each instance holds an opaque pointer to the underlying Rust struct. -// Method calls need to read this pointer from the object's state and pass it in to -// the Rust FFI. -// -// * When an instance is no longer needed, its pointer should be passed to a -// special destructor function provided by the Rust FFI, which will drop the -// underlying Rust struct. -// -// * Given an instance, calling code is expected to call the special -// `destroy` method in order to free it after use, either by calling it explicitly -// or by using a higher-level helper like the `use` method. Failing to do so risks -// leaking the underlying Rust struct. -// -// * We can't assume that calling code will do the right thing, and must be prepared -// to handle Kotlin method calls executing concurrently with or even after a call to -// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. -// -// * We must never allow Rust code to operate on the underlying Rust struct after -// the destructor has been called, and must never call the destructor more than once. -// Doing so may trigger memory unsafety. -// -// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` -// is implemented to call the destructor when the Kotlin object becomes unreachable. -// This is done in a background thread. This is not a panacea, and client code should be aware that -// 1. the thread may starve if some there are objects that have poorly performing -// `drop` methods or do significant work in their `drop` methods. -// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, -// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). -// -// If we try to implement this with mutual exclusion on access to the pointer, there is the -// possibility of a race between a method call and a concurrent call to `destroy`: -// -// * Thread A starts a method call, reads the value of the pointer, but is interrupted -// before it can pass the pointer over the FFI to Rust. -// * Thread B calls `destroy` and frees the underlying Rust struct. -// * Thread A resumes, passing the already-read pointer value to Rust and triggering -// a use-after-free. -// -// One possible solution would be to use a `ReadWriteLock`, with each method call taking -// a read lock (and thus allowed to run concurrently) and the special `destroy` method -// taking a write lock (and thus blocking on live method calls). However, we aim not to -// generate methods with any hidden blocking semantics, and a `destroy` method that might -// block if called incorrectly seems to meet that bar. -// -// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track -// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` -// has been called. These are updated according to the following rules: -// -// * The initial value of the counter is 1, indicating a live object with no in-flight calls. -// The initial value for the flag is false. -// -// * At the start of each method call, we atomically check the counter. -// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. -// If it is nonzero them we atomically increment it by 1 and proceed with the method call. -// -// * At the end of each method call, we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// * When `destroy` is called, we atomically flip the flag from false to true. -// If the flag was already true we silently fail. -// Otherwise we atomically decrement and check the counter. -// If it has reached zero then we destroy the underlying Rust struct. -// -// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, -// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. -// -// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been -// called *and* all in-flight method calls have completed, avoiding violating any of the expectations -// of the underlying Rust code. -// -// This makes a cleaner a better alternative to _not_ calling `destroy()` as -// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` -// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner -// thread may be starved, and the app will leak memory. -// -// In this case, `destroy`ing manually may be a better solution. -// -// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects -// with Rust peers are reclaimed: -// -// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: -// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: -// 3. The memory is reclaimed when the process terminates. -// -// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 -// - - public interface TimelineEventInterface { fun `eventId`(): kotlin.String @@ -27099,6 +27751,53 @@ public object FfiConverterTypeWidgetDriverHandle: FfiConverter { + override fun read(buf: ByteBuffer): AbstractProgress { + return AbstractProgress( + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + ) + } + + override fun allocationSize(value: AbstractProgress) = ( + FfiConverterULong.allocationSize(value.`current`) + + FfiConverterULong.allocationSize(value.`total`) + ) + + override fun write(value: AbstractProgress, buf: ByteBuffer) { + FfiConverterULong.write(value.`current`, buf) + FfiConverterULong.write(value.`total`, buf) + } +} + + + data class AudioInfo ( var `duration`: java.time.Duration?, var `size`: kotlin.ULong?, @@ -27851,9 +28550,9 @@ data class GalleryUploadParameters ( */ var `mentions`: Mentions?, /** - * Optional parameters for sending the media as (threaded) reply. + * Optional Event ID to reply to. */ - var `replyParams`: ReplyParameters? + var `inReplyTo`: kotlin.String? ) { companion object @@ -27868,7 +28567,7 @@ public object FfiConverterTypeGalleryUploadParameters: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): InsertData { - return InsertData( - FfiConverterUInt.read(buf), - FfiConverterTypeTimelineItem.read(buf), - ) - } - - override fun allocationSize(value: InsertData) = ( - FfiConverterUInt.allocationSize(value.`index`) + - FfiConverterTypeTimelineItem.allocationSize(value.`item`) - ) - - override fun write(value: InsertData, buf: ByteBuffer) { - FfiConverterUInt.write(value.`index`, buf) - FfiConverterTypeTimelineItem.write(value.`item`, buf) - } -} - - - /** * An FFI representation of a request to join a room. */ @@ -28451,11 +29109,11 @@ data class MediaPreviewConfig ( /** * The media previews setting for the user. */ - var `mediaPreviews`: MediaPreviews, + var `mediaPreviews`: MediaPreviews?, /** * The invite avatars setting for the user. */ - var `inviteAvatars`: InviteAvatars + var `inviteAvatars`: InviteAvatars? ) { companion object @@ -28467,19 +29125,64 @@ data class MediaPreviewConfig ( public object FfiConverterTypeMediaPreviewConfig: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): MediaPreviewConfig { return MediaPreviewConfig( - FfiConverterTypeMediaPreviews.read(buf), - FfiConverterTypeInviteAvatars.read(buf), + FfiConverterOptionalTypeMediaPreviews.read(buf), + FfiConverterOptionalTypeInviteAvatars.read(buf), ) } override fun allocationSize(value: MediaPreviewConfig) = ( - FfiConverterTypeMediaPreviews.allocationSize(value.`mediaPreviews`) + - FfiConverterTypeInviteAvatars.allocationSize(value.`inviteAvatars`) + FfiConverterOptionalTypeMediaPreviews.allocationSize(value.`mediaPreviews`) + + FfiConverterOptionalTypeInviteAvatars.allocationSize(value.`inviteAvatars`) ) override fun write(value: MediaPreviewConfig, buf: ByteBuffer) { - FfiConverterTypeMediaPreviews.write(value.`mediaPreviews`, buf) - FfiConverterTypeInviteAvatars.write(value.`inviteAvatars`, buf) + FfiConverterOptionalTypeMediaPreviews.write(value.`mediaPreviews`, buf) + FfiConverterOptionalTypeInviteAvatars.write(value.`inviteAvatars`, buf) + } +} + + + +/** + * This type represents the progress of a media (consisting of a file and + * possibly a thumbnail) being uploaded. + */ +data class MediaUploadProgress ( + /** + * The index of the media within the transaction. A file and its + * thumbnail share the same index. Will always be 0 for non-gallery + * media uploads. + */ + var `index`: kotlin.ULong, + /** + * The current combined upload progress for both the file and, + * if it exists, its thumbnail. + */ + var `progress`: AbstractProgress +) { + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeMediaUploadProgress: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): MediaUploadProgress { + return MediaUploadProgress( + FfiConverterULong.read(buf), + FfiConverterTypeAbstractProgress.read(buf), + ) + } + + override fun allocationSize(value: MediaUploadProgress) = ( + FfiConverterULong.allocationSize(value.`index`) + + FfiConverterTypeAbstractProgress.allocationSize(value.`progress`) + ) + + override fun write(value: MediaUploadProgress, buf: ByteBuffer) { + FfiConverterULong.write(value.`index`, buf) + FfiConverterTypeAbstractProgress.write(value.`progress`, buf) } } @@ -29275,11 +29978,7 @@ data class PredecessorRoom ( /** * The ID of the replacement room. */ - var `roomId`: kotlin.String, - /** - * The event ID of the last known event in the predecesssor room. - */ - var `lastEventId`: kotlin.String + var `roomId`: kotlin.String ) { companion object @@ -29292,18 +29991,15 @@ public object FfiConverterTypePredecessorRoom: FfiConverterRustBuffer { -data class ReplyParameters ( - /** - * The ID of the event to reply to. - */ - var `eventId`: kotlin.String, - /** - * Whether to enforce a thread relation. - */ - var `enforceThread`: kotlin.Boolean, - /** - * If enforcing a threaded relation, whether the message is a reply on a - * thread. - */ - var `replyWithinThread`: kotlin.Boolean -) { - - companion object -} - -/** - * @suppress - */ -public object FfiConverterTypeReplyParameters: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ReplyParameters { - return ReplyParameters( - FfiConverterString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterBoolean.read(buf), - ) - } - - override fun allocationSize(value: ReplyParameters) = ( - FfiConverterString.allocationSize(value.`eventId`) + - FfiConverterBoolean.allocationSize(value.`enforceThread`) + - FfiConverterBoolean.allocationSize(value.`replyWithinThread`) - ) - - override fun write(value: ReplyParameters, buf: ByteBuffer) { - FfiConverterString.write(value.`eventId`, buf) - FfiConverterBoolean.write(value.`enforceThread`, buf) - FfiConverterBoolean.write(value.`replyWithinThread`, buf) - } -} - - - /** * The config to use for HTTP requests by default in this client. */ @@ -29631,42 +30281,6 @@ public object FfiConverterTypeRoomDescription: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): RoomDirectorySearchEntriesResult { - return RoomDirectorySearchEntriesResult( - FfiConverterTypeTaskHandle.read(buf), - ) - } - - override fun allocationSize(value: RoomDirectorySearchEntriesResult) = ( - FfiConverterTypeTaskHandle.allocationSize(value.`entriesStream`) - ) - - override fun write(value: RoomDirectorySearchEntriesResult, buf: ByteBuffer) { - FfiConverterTypeTaskHandle.write(value.`entriesStream`, buf) - } -} - - - /** * Information about a member considered to be a room hero. */ @@ -29718,7 +30332,7 @@ public object FfiConverterTypeRoomHero: FfiConverterRustBuffer { data class RoomInfo ( var `id`: kotlin.String, var `encryptionState`: EncryptionState, - var `creator`: kotlin.String?, + var `creators`: List?, /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. @@ -29800,7 +30414,16 @@ data class RoomInfo ( * * Can be missing if the room power levels event is missing from the store. */ - var `powerLevels`: RoomPowerLevels? + var `powerLevels`: RoomPowerLevels?, + /** + * This room's version. + */ + var `roomVersion`: kotlin.String?, + /** + * Whether creators are privileged over every other user (have infinite + * power level). + */ + var `privilegedCreatorsRole`: kotlin.Boolean ) : Disposable { @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here @@ -29809,7 +30432,7 @@ data class RoomInfo ( Disposable.destroy( this.`id`, this.`encryptionState`, - this.`creator`, + this.`creators`, this.`displayName`, this.`rawName`, this.`topic`, @@ -29839,7 +30462,9 @@ data class RoomInfo ( this.`pinnedEventIds`, this.`joinRule`, this.`historyVisibility`, - this.`powerLevels` + this.`powerLevels`, + this.`roomVersion`, + this.`privilegedCreatorsRole` ) } @@ -29854,7 +30479,7 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer { return RoomInfo( FfiConverterString.read(buf), FfiConverterTypeEncryptionState.read(buf), - FfiConverterOptionalString.read(buf), + FfiConverterOptionalSequenceString.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalString.read(buf), @@ -29885,13 +30510,15 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer { FfiConverterOptionalTypeJoinRule.read(buf), FfiConverterTypeRoomHistoryVisibility.read(buf), FfiConverterOptionalTypeRoomPowerLevels.read(buf), + FfiConverterOptionalString.read(buf), + FfiConverterBoolean.read(buf), ) } override fun allocationSize(value: RoomInfo) = ( FfiConverterString.allocationSize(value.`id`) + FfiConverterTypeEncryptionState.allocationSize(value.`encryptionState`) + - FfiConverterOptionalString.allocationSize(value.`creator`) + + FfiConverterOptionalSequenceString.allocationSize(value.`creators`) + FfiConverterOptionalString.allocationSize(value.`displayName`) + FfiConverterOptionalString.allocationSize(value.`rawName`) + FfiConverterOptionalString.allocationSize(value.`topic`) + @@ -29921,13 +30548,15 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer { FfiConverterSequenceString.allocationSize(value.`pinnedEventIds`) + FfiConverterOptionalTypeJoinRule.allocationSize(value.`joinRule`) + FfiConverterTypeRoomHistoryVisibility.allocationSize(value.`historyVisibility`) + - FfiConverterOptionalTypeRoomPowerLevels.allocationSize(value.`powerLevels`) + FfiConverterOptionalTypeRoomPowerLevels.allocationSize(value.`powerLevels`) + + FfiConverterOptionalString.allocationSize(value.`roomVersion`) + + FfiConverterBoolean.allocationSize(value.`privilegedCreatorsRole`) ) override fun write(value: RoomInfo, buf: ByteBuffer) { FfiConverterString.write(value.`id`, buf) FfiConverterTypeEncryptionState.write(value.`encryptionState`, buf) - FfiConverterOptionalString.write(value.`creator`, buf) + FfiConverterOptionalSequenceString.write(value.`creators`, buf) FfiConverterOptionalString.write(value.`displayName`, buf) FfiConverterOptionalString.write(value.`rawName`, buf) FfiConverterOptionalString.write(value.`topic`, buf) @@ -29958,6 +30587,8 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer { FfiConverterOptionalTypeJoinRule.write(value.`joinRule`, buf) FfiConverterTypeRoomHistoryVisibility.write(value.`historyVisibility`, buf) FfiConverterOptionalTypeRoomPowerLevels.write(value.`powerLevels`, buf) + FfiConverterOptionalString.write(value.`roomVersion`, buf) + FfiConverterBoolean.write(value.`privilegedCreatorsRole`, buf) } } @@ -30010,8 +30641,8 @@ data class RoomMember ( var `avatarUrl`: kotlin.String?, var `membership`: MembershipState, var `isNameAmbiguous`: kotlin.Boolean, - var `powerLevel`: kotlin.Long, - var `normalizedPowerLevel`: kotlin.Long, + var `powerLevel`: PowerLevel, + var `normalizedPowerLevel`: PowerLevel, var `isIgnored`: kotlin.Boolean, var `suggestedRoleForPowerLevel`: RoomMemberRole, var `membershipChangeReason`: kotlin.String? @@ -30031,8 +30662,8 @@ public object FfiConverterTypeRoomMember: FfiConverterRustBuffer { FfiConverterOptionalString.read(buf), FfiConverterTypeMembershipState.read(buf), FfiConverterBoolean.read(buf), - FfiConverterLong.read(buf), - FfiConverterLong.read(buf), + FfiConverterTypePowerLevel.read(buf), + FfiConverterTypePowerLevel.read(buf), FfiConverterBoolean.read(buf), FfiConverterTypeRoomMemberRole.read(buf), FfiConverterOptionalString.read(buf), @@ -30045,8 +30676,8 @@ public object FfiConverterTypeRoomMember: FfiConverterRustBuffer { FfiConverterOptionalString.allocationSize(value.`avatarUrl`) + FfiConverterTypeMembershipState.allocationSize(value.`membership`) + FfiConverterBoolean.allocationSize(value.`isNameAmbiguous`) + - FfiConverterLong.allocationSize(value.`powerLevel`) + - FfiConverterLong.allocationSize(value.`normalizedPowerLevel`) + + FfiConverterTypePowerLevel.allocationSize(value.`powerLevel`) + + FfiConverterTypePowerLevel.allocationSize(value.`normalizedPowerLevel`) + FfiConverterBoolean.allocationSize(value.`isIgnored`) + FfiConverterTypeRoomMemberRole.allocationSize(value.`suggestedRoleForPowerLevel`) + FfiConverterOptionalString.allocationSize(value.`membershipChangeReason`) @@ -30058,8 +30689,8 @@ public object FfiConverterTypeRoomMember: FfiConverterRustBuffer { FfiConverterOptionalString.write(value.`avatarUrl`, buf) FfiConverterTypeMembershipState.write(value.`membership`, buf) FfiConverterBoolean.write(value.`isNameAmbiguous`, buf) - FfiConverterLong.write(value.`powerLevel`, buf) - FfiConverterLong.write(value.`normalizedPowerLevel`, buf) + FfiConverterTypePowerLevel.write(value.`powerLevel`, buf) + FfiConverterTypePowerLevel.write(value.`normalizedPowerLevel`, buf) FfiConverterBoolean.write(value.`isIgnored`, buf) FfiConverterTypeRoomMemberRole.write(value.`suggestedRoleForPowerLevel`, buf) FfiConverterOptionalString.write(value.`membershipChangeReason`, buf) @@ -30635,47 +31266,6 @@ public object FfiConverterTypeSessionVerificationRequestDetails: FfiConverterRus -data class SetData ( - var `index`: kotlin.UInt, - var `item`: TimelineItem -) : Disposable { - - @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here - override fun destroy() { - - Disposable.destroy( - this.`index`, - this.`item` - ) - } - - companion object -} - -/** - * @suppress - */ -public object FfiConverterTypeSetData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SetData { - return SetData( - FfiConverterUInt.read(buf), - FfiConverterTypeTimelineItem.read(buf), - ) - } - - override fun allocationSize(value: SetData) = ( - FfiConverterUInt.allocationSize(value.`index`) + - FfiConverterTypeTimelineItem.allocationSize(value.`item`) - ) - - override fun write(value: SetData, buf: ByteBuffer) { - FfiConverterUInt.write(value.`index`, buf) - FfiConverterTypeTimelineItem.write(value.`item`, buf) - } -} - - - /** * A push rule is a single rule that states under what conditions an event * should be passed onto a push gateway and how the notification should be @@ -30736,6 +31326,125 @@ public object FfiConverterTypeSimplePushRule: FfiConverterRustBuffer? +) { + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeSpaceRoom: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): SpaceRoom { + return SpaceRoom( + FfiConverterString.read(buf), + FfiConverterOptionalString.read(buf), + FfiConverterOptionalString.read(buf), + FfiConverterOptionalString.read(buf), + FfiConverterOptionalString.read(buf), + FfiConverterTypeRoomType.read(buf), + FfiConverterULong.read(buf), + FfiConverterOptionalTypeJoinRule.read(buf), + FfiConverterOptionalBoolean.read(buf), + FfiConverterBoolean.read(buf), + FfiConverterULong.read(buf), + FfiConverterOptionalTypeMembership.read(buf), + FfiConverterOptionalSequenceTypeRoomHero.read(buf), + ) + } + + override fun allocationSize(value: SpaceRoom) = ( + FfiConverterString.allocationSize(value.`roomId`) + + FfiConverterOptionalString.allocationSize(value.`canonicalAlias`) + + FfiConverterOptionalString.allocationSize(value.`name`) + + FfiConverterOptionalString.allocationSize(value.`topic`) + + FfiConverterOptionalString.allocationSize(value.`avatarUrl`) + + FfiConverterTypeRoomType.allocationSize(value.`roomType`) + + FfiConverterULong.allocationSize(value.`numJoinedMembers`) + + FfiConverterOptionalTypeJoinRule.allocationSize(value.`joinRule`) + + FfiConverterOptionalBoolean.allocationSize(value.`worldReadable`) + + FfiConverterBoolean.allocationSize(value.`guestCanJoin`) + + FfiConverterULong.allocationSize(value.`childrenCount`) + + FfiConverterOptionalTypeMembership.allocationSize(value.`state`) + + FfiConverterOptionalSequenceTypeRoomHero.allocationSize(value.`heroes`) + ) + + override fun write(value: SpaceRoom, buf: ByteBuffer) { + FfiConverterString.write(value.`roomId`, buf) + FfiConverterOptionalString.write(value.`canonicalAlias`, buf) + FfiConverterOptionalString.write(value.`name`, buf) + FfiConverterOptionalString.write(value.`topic`, buf) + FfiConverterOptionalString.write(value.`avatarUrl`, buf) + FfiConverterTypeRoomType.write(value.`roomType`, buf) + FfiConverterULong.write(value.`numJoinedMembers`, buf) + FfiConverterOptionalTypeJoinRule.write(value.`joinRule`, buf) + FfiConverterOptionalBoolean.write(value.`worldReadable`, buf) + FfiConverterBoolean.write(value.`guestCanJoin`, buf) + FfiConverterULong.write(value.`childrenCount`, buf) + FfiConverterOptionalTypeMembership.write(value.`state`, buf) + FfiConverterOptionalSequenceTypeRoomHero.write(value.`heroes`, buf) + } +} + + + /** * When a room A is tombstoned, it is replaced by a room B. The room A is the * predecessor of B, and B is the successor of A. This type holds information @@ -30849,6 +31558,41 @@ public object FfiConverterTypeTextMessageContent: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): ThreadSubscription { + return ThreadSubscription( + FfiConverterBoolean.read(buf), + ) + } + + override fun allocationSize(value: ThreadSubscription) = ( + FfiConverterBoolean.allocationSize(value.`automatic`) + ) + + override fun write(value: ThreadSubscription, buf: ByteBuffer) { + FfiConverterBoolean.write(value.`automatic`, buf) + } +} + + + data class ThumbnailInfo ( var `height`: kotlin.ULong?, var `width`: kotlin.ULong?, @@ -31320,15 +32064,9 @@ data class UploadParameters ( */ var `mentions`: Mentions?, /** - * Optional parameters for sending the media as (threaded) reply. - */ - var `replyParams`: ReplyParameters?, - /** - * Should the media be sent with the send queue, or synchronously? - * - * Watching progress only works with the synchronous method, at the moment. + * Optional Event ID to reply to. */ - var `useSendQueue`: kotlin.Boolean + var `inReplyTo`: kotlin.String? ) { companion object @@ -31344,8 +32082,7 @@ public object FfiConverterTypeUploadParameters: FfiConverterRustBuffer{ override fun read(buf: ByteBuffer): EventSendState { return when(buf.getInt()) { - 1 -> EventSendState.NotSentYet + 1 -> EventSendState.NotSentYet( + FfiConverterOptionalTypeMediaUploadProgress.read(buf), + ) 2 -> EventSendState.SendingFailed( FfiConverterTypeQueueWedgeError.read(buf), FfiConverterBoolean.read(buf), @@ -34901,6 +35644,7 @@ public object FfiConverterTypeEventSendState : FfiConverterRustBuffer { @@ -34924,6 +35668,7 @@ public object FfiConverterTypeEventSendState : FfiConverterRustBuffer { buf.putInt(1) + FfiConverterOptionalTypeMediaUploadProgress.write(value.`progress`, buf) Unit } is EventSendState.SendingFailed -> { @@ -35125,7 +35870,7 @@ sealed class GalleryItemInfo: Disposable { data class Audio( val `audioInfo`: AudioInfo, - val `filename`: kotlin.String, + val `source`: UploadSource, val `caption`: kotlin.String?, val `formattedCaption`: FormattedBody?) : GalleryItemInfo() { companion object @@ -35133,7 +35878,7 @@ sealed class GalleryItemInfo: Disposable { data class File( val `fileInfo`: FileInfo, - val `filename`: kotlin.String, + val `source`: UploadSource, val `caption`: kotlin.String?, val `formattedCaption`: FormattedBody?) : GalleryItemInfo() { companion object @@ -35141,19 +35886,19 @@ sealed class GalleryItemInfo: Disposable { data class Image( val `imageInfo`: ImageInfo, - val `filename`: kotlin.String, + val `source`: UploadSource, val `caption`: kotlin.String?, val `formattedCaption`: FormattedBody?, - val `thumbnailPath`: kotlin.String?) : GalleryItemInfo() { + val `thumbnailSource`: UploadSource?) : GalleryItemInfo() { companion object } data class Video( val `videoInfo`: VideoInfo, - val `filename`: kotlin.String, + val `source`: UploadSource, val `caption`: kotlin.String?, val `formattedCaption`: FormattedBody?, - val `thumbnailPath`: kotlin.String?) : GalleryItemInfo() { + val `thumbnailSource`: UploadSource?) : GalleryItemInfo() { companion object } @@ -35166,7 +35911,7 @@ sealed class GalleryItemInfo: Disposable { Disposable.destroy( this.`audioInfo`, - this.`filename`, + this.`source`, this.`caption`, this.`formattedCaption` ) @@ -35176,7 +35921,7 @@ sealed class GalleryItemInfo: Disposable { Disposable.destroy( this.`fileInfo`, - this.`filename`, + this.`source`, this.`caption`, this.`formattedCaption` ) @@ -35186,10 +35931,10 @@ sealed class GalleryItemInfo: Disposable { Disposable.destroy( this.`imageInfo`, - this.`filename`, + this.`source`, this.`caption`, this.`formattedCaption`, - this.`thumbnailPath` + this.`thumbnailSource` ) } @@ -35197,10 +35942,10 @@ sealed class GalleryItemInfo: Disposable { Disposable.destroy( this.`videoInfo`, - this.`filename`, + this.`source`, this.`caption`, this.`formattedCaption`, - this.`thumbnailPath` + this.`thumbnailSource` ) } @@ -35218,29 +35963,29 @@ public object FfiConverterTypeGalleryItemInfo : FfiConverterRustBuffer GalleryItemInfo.Audio( FfiConverterTypeAudioInfo.read(buf), - FfiConverterString.read(buf), + FfiConverterTypeUploadSource.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFormattedBody.read(buf), ) 2 -> GalleryItemInfo.File( FfiConverterTypeFileInfo.read(buf), - FfiConverterString.read(buf), + FfiConverterTypeUploadSource.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFormattedBody.read(buf), ) 3 -> GalleryItemInfo.Image( FfiConverterTypeImageInfo.read(buf), - FfiConverterString.read(buf), + FfiConverterTypeUploadSource.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFormattedBody.read(buf), - FfiConverterOptionalString.read(buf), + FfiConverterOptionalTypeUploadSource.read(buf), ) 4 -> GalleryItemInfo.Video( FfiConverterTypeVideoInfo.read(buf), - FfiConverterString.read(buf), + FfiConverterTypeUploadSource.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFormattedBody.read(buf), - FfiConverterOptionalString.read(buf), + FfiConverterOptionalTypeUploadSource.read(buf), ) else -> throw RuntimeException("invalid enum value, something is very wrong!!") } @@ -35252,7 +35997,7 @@ public object FfiConverterTypeGalleryItemInfo : FfiConverterRustBuffer { @@ -35283,10 +36028,10 @@ public object FfiConverterTypeGalleryItemInfo : FfiConverterRustBuffer { buf.putInt(1) FfiConverterTypeAudioInfo.write(value.`audioInfo`, buf) - FfiConverterString.write(value.`filename`, buf) + FfiConverterTypeUploadSource.write(value.`source`, buf) FfiConverterOptionalString.write(value.`caption`, buf) FfiConverterOptionalTypeFormattedBody.write(value.`formattedCaption`, buf) Unit @@ -35304,7 +36049,7 @@ public object FfiConverterTypeGalleryItemInfo : FfiConverterRustBuffer { buf.putInt(2) FfiConverterTypeFileInfo.write(value.`fileInfo`, buf) - FfiConverterString.write(value.`filename`, buf) + FfiConverterTypeUploadSource.write(value.`source`, buf) FfiConverterOptionalString.write(value.`caption`, buf) FfiConverterOptionalTypeFormattedBody.write(value.`formattedCaption`, buf) Unit @@ -35312,19 +36057,19 @@ public object FfiConverterTypeGalleryItemInfo : FfiConverterRustBuffer { buf.putInt(3) FfiConverterTypeImageInfo.write(value.`imageInfo`, buf) - FfiConverterString.write(value.`filename`, buf) + FfiConverterTypeUploadSource.write(value.`source`, buf) FfiConverterOptionalString.write(value.`caption`, buf) FfiConverterOptionalTypeFormattedBody.write(value.`formattedCaption`, buf) - FfiConverterOptionalString.write(value.`thumbnailPath`, buf) + FfiConverterOptionalTypeUploadSource.write(value.`thumbnailSource`, buf) Unit } is GalleryItemInfo.Video -> { buf.putInt(4) FfiConverterTypeVideoInfo.write(value.`videoInfo`, buf) - FfiConverterString.write(value.`filename`, buf) + FfiConverterTypeUploadSource.write(value.`source`, buf) FfiConverterOptionalString.write(value.`caption`, buf) FfiConverterOptionalTypeFormattedBody.write(value.`formattedCaption`, buf) - FfiConverterOptionalString.write(value.`thumbnailPath`, buf) + FfiConverterOptionalTypeUploadSource.write(value.`thumbnailSource`, buf) Unit } }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } @@ -36054,6 +36799,145 @@ public object FfiConverterTypeKeyDerivationAlgorithm: FfiConverterRustBuffer {// Nothing to destroy + } + is LatestEventValue.Remote -> { + + Disposable.destroy( + this.`timestamp`, + this.`sender`, + this.`isOwn`, + this.`profile`, + this.`content` + ) + + } + is LatestEventValue.Local -> { + + Disposable.destroy( + this.`timestamp`, + this.`content`, + this.`isSending` + ) + + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeLatestEventValue : FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): LatestEventValue { + return when(buf.getInt()) { + 1 -> LatestEventValue.None + 2 -> LatestEventValue.Remote( + FfiConverterTypeTimestamp.read(buf), + FfiConverterString.read(buf), + FfiConverterBoolean.read(buf), + FfiConverterTypeProfileDetails.read(buf), + FfiConverterTypeTimelineItemContent.read(buf), + ) + 3 -> LatestEventValue.Local( + FfiConverterTypeTimestamp.read(buf), + FfiConverterTypeTimelineItemContent.read(buf), + FfiConverterBoolean.read(buf), + ) + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } + } + + override fun allocationSize(value: LatestEventValue) = when(value) { + is LatestEventValue.None -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is LatestEventValue.Remote -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeTimestamp.allocationSize(value.`timestamp`) + + FfiConverterString.allocationSize(value.`sender`) + + FfiConverterBoolean.allocationSize(value.`isOwn`) + + FfiConverterTypeProfileDetails.allocationSize(value.`profile`) + + FfiConverterTypeTimelineItemContent.allocationSize(value.`content`) + ) + } + is LatestEventValue.Local -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeTimestamp.allocationSize(value.`timestamp`) + + FfiConverterTypeTimelineItemContent.allocationSize(value.`content`) + + FfiConverterBoolean.allocationSize(value.`isSending`) + ) + } + } + + override fun write(value: LatestEventValue, buf: ByteBuffer) { + when(value) { + is LatestEventValue.None -> { + buf.putInt(1) + Unit + } + is LatestEventValue.Remote -> { + buf.putInt(2) + FfiConverterTypeTimestamp.write(value.`timestamp`, buf) + FfiConverterString.write(value.`sender`, buf) + FfiConverterBoolean.write(value.`isOwn`, buf) + FfiConverterTypeProfileDetails.write(value.`profile`, buf) + FfiConverterTypeTimelineItemContent.write(value.`content`, buf) + Unit + } + is LatestEventValue.Local -> { + buf.putInt(3) + FfiConverterTypeTimestamp.write(value.`timestamp`, buf) + FfiConverterTypeTimelineItemContent.write(value.`content`, buf) + FfiConverterBoolean.write(value.`isSending`, buf) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } +} + + + + + enum class LogLevel { @@ -38765,6 +39649,78 @@ public object FfiConverterTypePollKind: FfiConverterRustBuffer { +sealed class PowerLevel { + + /** + * The user is a room creator and has infinite power level. + * + * This power level was introduced in room version 12. + */ + object Infinite : PowerLevel() + + + /** + * The user has the given power level. + */ + data class Value( + val `value`: kotlin.Long) : PowerLevel() { + companion object + } + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypePowerLevel : FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): PowerLevel { + return when(buf.getInt()) { + 1 -> PowerLevel.Infinite + 2 -> PowerLevel.Value( + FfiConverterLong.read(buf), + ) + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } + } + + override fun allocationSize(value: PowerLevel) = when(value) { + is PowerLevel.Infinite -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is PowerLevel.Value -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterLong.allocationSize(value.`value`) + ) + } + } + + override fun write(value: PowerLevel, buf: ByteBuffer) { + when(value) { + is PowerLevel.Infinite -> { + buf.putInt(1) + Unit + } + is PowerLevel.Value -> { + buf.putInt(2) + FfiConverterLong.write(value.`value`, buf) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } +} + + + + + sealed class ProfileDetails { object Unavailable : ProfileDetails() @@ -38875,7 +39831,10 @@ public object FfiConverterTypeProfileDetails : FfiConverterRustBuffer RoomListEntriesDynamicFilterKind.Any( FfiConverterSequenceTypeRoomListEntriesDynamicFilterKind.read(buf), ) - 3 -> RoomListEntriesDynamicFilterKind.NonLeft - 4 -> RoomListEntriesDynamicFilterKind.Joined - 5 -> RoomListEntriesDynamicFilterKind.Unread - 6 -> RoomListEntriesDynamicFilterKind.Favourite - 7 -> RoomListEntriesDynamicFilterKind.Invite - 8 -> RoomListEntriesDynamicFilterKind.Category( + 3 -> RoomListEntriesDynamicFilterKind.NonSpace + 4 -> RoomListEntriesDynamicFilterKind.NonLeft + 5 -> RoomListEntriesDynamicFilterKind.Joined + 6 -> RoomListEntriesDynamicFilterKind.Unread + 7 -> RoomListEntriesDynamicFilterKind.Favourite + 8 -> RoomListEntriesDynamicFilterKind.LowPriority + 9 -> RoomListEntriesDynamicFilterKind.NonLowPriority + 10 -> RoomListEntriesDynamicFilterKind.Invite + 11 -> RoomListEntriesDynamicFilterKind.Category( FfiConverterTypeRoomListFilterCategory.read(buf), ) - 9 -> RoomListEntriesDynamicFilterKind.None - 10 -> RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName( + 12 -> RoomListEntriesDynamicFilterKind.None + 13 -> RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName( FfiConverterString.read(buf), ) - 11 -> RoomListEntriesDynamicFilterKind.FuzzyMatchRoomName( + 14 -> RoomListEntriesDynamicFilterKind.FuzzyMatchRoomName( FfiConverterString.read(buf), ) - 12 -> RoomListEntriesDynamicFilterKind.DeduplicateVersions + 15 -> RoomListEntriesDynamicFilterKind.DeduplicateVersions else -> throw RuntimeException("invalid enum value, something is very wrong!!") } } @@ -40465,6 +41436,12 @@ public object FfiConverterTypeRoomListEntriesDynamicFilterKind : FfiConverterRus + FfiConverterSequenceTypeRoomListEntriesDynamicFilterKind.allocationSize(value.`filters`) ) } + is RoomListEntriesDynamicFilterKind.NonSpace -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } is RoomListEntriesDynamicFilterKind.NonLeft -> { // Add the size for the Int that specifies the variant plus the size needed for all fields ( @@ -40489,6 +41466,18 @@ public object FfiConverterTypeRoomListEntriesDynamicFilterKind : FfiConverterRus 4UL ) } + is RoomListEntriesDynamicFilterKind.LowPriority -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is RoomListEntriesDynamicFilterKind.NonLowPriority -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } is RoomListEntriesDynamicFilterKind.Invite -> { // Add the size for the Int that specifies the variant plus the size needed for all fields ( @@ -40542,47 +41531,59 @@ public object FfiConverterTypeRoomListEntriesDynamicFilterKind : FfiConverterRus FfiConverterSequenceTypeRoomListEntriesDynamicFilterKind.write(value.`filters`, buf) Unit } - is RoomListEntriesDynamicFilterKind.NonLeft -> { + is RoomListEntriesDynamicFilterKind.NonSpace -> { buf.putInt(3) Unit } - is RoomListEntriesDynamicFilterKind.Joined -> { + is RoomListEntriesDynamicFilterKind.NonLeft -> { buf.putInt(4) Unit } - is RoomListEntriesDynamicFilterKind.Unread -> { + is RoomListEntriesDynamicFilterKind.Joined -> { buf.putInt(5) Unit } - is RoomListEntriesDynamicFilterKind.Favourite -> { + is RoomListEntriesDynamicFilterKind.Unread -> { buf.putInt(6) Unit } - is RoomListEntriesDynamicFilterKind.Invite -> { + is RoomListEntriesDynamicFilterKind.Favourite -> { buf.putInt(7) Unit } - is RoomListEntriesDynamicFilterKind.Category -> { + is RoomListEntriesDynamicFilterKind.LowPriority -> { buf.putInt(8) + Unit + } + is RoomListEntriesDynamicFilterKind.NonLowPriority -> { + buf.putInt(9) + Unit + } + is RoomListEntriesDynamicFilterKind.Invite -> { + buf.putInt(10) + Unit + } + is RoomListEntriesDynamicFilterKind.Category -> { + buf.putInt(11) FfiConverterTypeRoomListFilterCategory.write(value.`expect`, buf) Unit } is RoomListEntriesDynamicFilterKind.None -> { - buf.putInt(9) + buf.putInt(12) Unit } is RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName -> { - buf.putInt(10) + buf.putInt(13) FfiConverterString.write(value.`pattern`, buf) Unit } is RoomListEntriesDynamicFilterKind.FuzzyMatchRoomName -> { - buf.putInt(11) + buf.putInt(14) FfiConverterString.write(value.`pattern`, buf) Unit } is RoomListEntriesDynamicFilterKind.DeduplicateVersions -> { - buf.putInt(12) + buf.putInt(15) Unit } }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } @@ -42116,6 +43117,246 @@ public object FfiConverterTypeSlidingSyncVersionBuilder: FfiConverterRustBuffer< +sealed class SpaceListUpdate { + + data class Append( + val `values`: List) : SpaceListUpdate() { + companion object + } + + object Clear : SpaceListUpdate() + + + data class PushFront( + val `value`: SpaceRoom) : SpaceListUpdate() { + companion object + } + + data class PushBack( + val `value`: SpaceRoom) : SpaceListUpdate() { + companion object + } + + object PopFront : SpaceListUpdate() + + + object PopBack : SpaceListUpdate() + + + data class Insert( + val `index`: kotlin.UInt, + val `value`: SpaceRoom) : SpaceListUpdate() { + companion object + } + + data class Set( + val `index`: kotlin.UInt, + val `value`: SpaceRoom) : SpaceListUpdate() { + companion object + } + + data class Remove( + val `index`: kotlin.UInt) : SpaceListUpdate() { + companion object + } + + data class Truncate( + val `length`: kotlin.UInt) : SpaceListUpdate() { + companion object + } + + data class Reset( + val `values`: List) : SpaceListUpdate() { + companion object + } + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeSpaceListUpdate : FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): SpaceListUpdate { + return when(buf.getInt()) { + 1 -> SpaceListUpdate.Append( + FfiConverterSequenceTypeSpaceRoom.read(buf), + ) + 2 -> SpaceListUpdate.Clear + 3 -> SpaceListUpdate.PushFront( + FfiConverterTypeSpaceRoom.read(buf), + ) + 4 -> SpaceListUpdate.PushBack( + FfiConverterTypeSpaceRoom.read(buf), + ) + 5 -> SpaceListUpdate.PopFront + 6 -> SpaceListUpdate.PopBack + 7 -> SpaceListUpdate.Insert( + FfiConverterUInt.read(buf), + FfiConverterTypeSpaceRoom.read(buf), + ) + 8 -> SpaceListUpdate.Set( + FfiConverterUInt.read(buf), + FfiConverterTypeSpaceRoom.read(buf), + ) + 9 -> SpaceListUpdate.Remove( + FfiConverterUInt.read(buf), + ) + 10 -> SpaceListUpdate.Truncate( + FfiConverterUInt.read(buf), + ) + 11 -> SpaceListUpdate.Reset( + FfiConverterSequenceTypeSpaceRoom.read(buf), + ) + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } + } + + override fun allocationSize(value: SpaceListUpdate) = when(value) { + is SpaceListUpdate.Append -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterSequenceTypeSpaceRoom.allocationSize(value.`values`) + ) + } + is SpaceListUpdate.Clear -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is SpaceListUpdate.PushFront -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeSpaceRoom.allocationSize(value.`value`) + ) + } + is SpaceListUpdate.PushBack -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeSpaceRoom.allocationSize(value.`value`) + ) + } + is SpaceListUpdate.PopFront -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is SpaceListUpdate.PopBack -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is SpaceListUpdate.Insert -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + + FfiConverterTypeSpaceRoom.allocationSize(value.`value`) + ) + } + is SpaceListUpdate.Set -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + + FfiConverterTypeSpaceRoom.allocationSize(value.`value`) + ) + } + is SpaceListUpdate.Remove -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + ) + } + is SpaceListUpdate.Truncate -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`length`) + ) + } + is SpaceListUpdate.Reset -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterSequenceTypeSpaceRoom.allocationSize(value.`values`) + ) + } + } + + override fun write(value: SpaceListUpdate, buf: ByteBuffer) { + when(value) { + is SpaceListUpdate.Append -> { + buf.putInt(1) + FfiConverterSequenceTypeSpaceRoom.write(value.`values`, buf) + Unit + } + is SpaceListUpdate.Clear -> { + buf.putInt(2) + Unit + } + is SpaceListUpdate.PushFront -> { + buf.putInt(3) + FfiConverterTypeSpaceRoom.write(value.`value`, buf) + Unit + } + is SpaceListUpdate.PushBack -> { + buf.putInt(4) + FfiConverterTypeSpaceRoom.write(value.`value`, buf) + Unit + } + is SpaceListUpdate.PopFront -> { + buf.putInt(5) + Unit + } + is SpaceListUpdate.PopBack -> { + buf.putInt(6) + Unit + } + is SpaceListUpdate.Insert -> { + buf.putInt(7) + FfiConverterUInt.write(value.`index`, buf) + FfiConverterTypeSpaceRoom.write(value.`value`, buf) + Unit + } + is SpaceListUpdate.Set -> { + buf.putInt(8) + FfiConverterUInt.write(value.`index`, buf) + FfiConverterTypeSpaceRoom.write(value.`value`, buf) + Unit + } + is SpaceListUpdate.Remove -> { + buf.putInt(9) + FfiConverterUInt.write(value.`index`, buf) + Unit + } + is SpaceListUpdate.Truncate -> { + buf.putInt(10) + FfiConverterUInt.write(value.`length`, buf) + Unit + } + is SpaceListUpdate.Reset -> { + buf.putInt(11) + FfiConverterSequenceTypeSpaceRoom.write(value.`values`, buf) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } +} + + + + + sealed class SsoException(message: String): kotlin.Exception(message) { @@ -42759,38 +44000,309 @@ public object FfiConverterTypeTagName : FfiConverterRustBuffer{ +sealed class TimelineDiff: Disposable { + + data class Append( + val `values`: List) : TimelineDiff() { + companion object + } + + object Clear : TimelineDiff() + + + data class PushFront( + val `value`: TimelineItem) : TimelineDiff() { + companion object + } + + data class PushBack( + val `value`: TimelineItem) : TimelineDiff() { + companion object + } + + object PopFront : TimelineDiff() + + + object PopBack : TimelineDiff() + + + data class Insert( + val `index`: kotlin.UInt, + val `value`: TimelineItem) : TimelineDiff() { + companion object + } + + data class Set( + val `index`: kotlin.UInt, + val `value`: TimelineItem) : TimelineDiff() { + companion object + } + + data class Remove( + val `index`: kotlin.UInt) : TimelineDiff() { + companion object + } + + data class Truncate( + val `length`: kotlin.UInt) : TimelineDiff() { + companion object + } + + data class Reset( + val `values`: List) : TimelineDiff() { + companion object + } + -enum class TimelineChange { - APPEND, - CLEAR, - INSERT, - SET, - REMOVE, - PUSH_BACK, - PUSH_FRONT, - POP_BACK, - POP_FRONT, - TRUNCATE, - RESET; + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here + override fun destroy() { + when(this) { + is TimelineDiff.Append -> { + + Disposable.destroy( + this.`values` + ) + + } + is TimelineDiff.Clear -> {// Nothing to destroy + } + is TimelineDiff.PushFront -> { + + Disposable.destroy( + this.`value` + ) + + } + is TimelineDiff.PushBack -> { + + Disposable.destroy( + this.`value` + ) + + } + is TimelineDiff.PopFront -> {// Nothing to destroy + } + is TimelineDiff.PopBack -> {// Nothing to destroy + } + is TimelineDiff.Insert -> { + + Disposable.destroy( + this.`index`, + this.`value` + ) + + } + is TimelineDiff.Set -> { + + Disposable.destroy( + this.`index`, + this.`value` + ) + + } + is TimelineDiff.Remove -> { + + Disposable.destroy( + this.`index` + ) + + } + is TimelineDiff.Truncate -> { + + Disposable.destroy( + this.`length` + ) + + } + is TimelineDiff.Reset -> { + + Disposable.destroy( + this.`values` + ) + + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } + companion object } - /** * @suppress */ -public object FfiConverterTypeTimelineChange: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = try { - TimelineChange.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) +public object FfiConverterTypeTimelineDiff : FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): TimelineDiff { + return when(buf.getInt()) { + 1 -> TimelineDiff.Append( + FfiConverterSequenceTypeTimelineItem.read(buf), + ) + 2 -> TimelineDiff.Clear + 3 -> TimelineDiff.PushFront( + FfiConverterTypeTimelineItem.read(buf), + ) + 4 -> TimelineDiff.PushBack( + FfiConverterTypeTimelineItem.read(buf), + ) + 5 -> TimelineDiff.PopFront + 6 -> TimelineDiff.PopBack + 7 -> TimelineDiff.Insert( + FfiConverterUInt.read(buf), + FfiConverterTypeTimelineItem.read(buf), + ) + 8 -> TimelineDiff.Set( + FfiConverterUInt.read(buf), + FfiConverterTypeTimelineItem.read(buf), + ) + 9 -> TimelineDiff.Remove( + FfiConverterUInt.read(buf), + ) + 10 -> TimelineDiff.Truncate( + FfiConverterUInt.read(buf), + ) + 11 -> TimelineDiff.Reset( + FfiConverterSequenceTypeTimelineItem.read(buf), + ) + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } } - override fun allocationSize(value: TimelineChange) = 4UL + override fun allocationSize(value: TimelineDiff) = when(value) { + is TimelineDiff.Append -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterSequenceTypeTimelineItem.allocationSize(value.`values`) + ) + } + is TimelineDiff.Clear -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is TimelineDiff.PushFront -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeTimelineItem.allocationSize(value.`value`) + ) + } + is TimelineDiff.PushBack -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterTypeTimelineItem.allocationSize(value.`value`) + ) + } + is TimelineDiff.PopFront -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is TimelineDiff.PopBack -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + is TimelineDiff.Insert -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + + FfiConverterTypeTimelineItem.allocationSize(value.`value`) + ) + } + is TimelineDiff.Set -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + + FfiConverterTypeTimelineItem.allocationSize(value.`value`) + ) + } + is TimelineDiff.Remove -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`index`) + ) + } + is TimelineDiff.Truncate -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterUInt.allocationSize(value.`length`) + ) + } + is TimelineDiff.Reset -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterSequenceTypeTimelineItem.allocationSize(value.`values`) + ) + } + } - override fun write(value: TimelineChange, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) + override fun write(value: TimelineDiff, buf: ByteBuffer) { + when(value) { + is TimelineDiff.Append -> { + buf.putInt(1) + FfiConverterSequenceTypeTimelineItem.write(value.`values`, buf) + Unit + } + is TimelineDiff.Clear -> { + buf.putInt(2) + Unit + } + is TimelineDiff.PushFront -> { + buf.putInt(3) + FfiConverterTypeTimelineItem.write(value.`value`, buf) + Unit + } + is TimelineDiff.PushBack -> { + buf.putInt(4) + FfiConverterTypeTimelineItem.write(value.`value`, buf) + Unit + } + is TimelineDiff.PopFront -> { + buf.putInt(5) + Unit + } + is TimelineDiff.PopBack -> { + buf.putInt(6) + Unit + } + is TimelineDiff.Insert -> { + buf.putInt(7) + FfiConverterUInt.write(value.`index`, buf) + FfiConverterTypeTimelineItem.write(value.`value`, buf) + Unit + } + is TimelineDiff.Set -> { + buf.putInt(8) + FfiConverterUInt.write(value.`index`, buf) + FfiConverterTypeTimelineItem.write(value.`value`, buf) + Unit + } + is TimelineDiff.Remove -> { + buf.putInt(9) + FfiConverterUInt.write(value.`index`, buf) + Unit + } + is TimelineDiff.Truncate -> { + buf.putInt(10) + FfiConverterUInt.write(value.`length`, buf) + Unit + } + is TimelineDiff.Reset -> { + buf.putInt(11) + FfiConverterSequenceTypeTimelineItem.write(value.`values`, buf) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } } @@ -43447,7 +44959,11 @@ enum class TraceLogPacks { /** * Enables all the logs relevant to the notification client. */ - NOTIFICATION_CLIENT; + NOTIFICATION_CLIENT, + /** + * Enables all the logs relevant to sync profiling. + */ + SYNC_PROFILING; companion object } @@ -45421,6 +46937,165 @@ public object FfiConverterTypeSessionVerificationControllerDelegate: FfiConverte +public interface SpaceRoomListEntriesListener { + + fun `onUpdate`(`rooms`: List) + + companion object +} + + + +// Put the implementation in an object so we don't pollute the top-level namespace +internal object uniffiCallbackInterfaceSpaceRoomListEntriesListener { + internal object `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 { + override fun callback(`uniffiHandle`: Long,`rooms`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { + val uniffiObj = FfiConverterTypeSpaceRoomListEntriesListener.handleMap.get(uniffiHandle) + val makeCall = { -> + uniffiObj.`onUpdate`( + FfiConverterSequenceTypeSpaceListUpdate.lift(`rooms`), + ) + } + val writeReturn = { _: Unit -> Unit } + uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) + } + } + + internal object uniffiFree: UniffiCallbackInterfaceFree { + override fun callback(handle: Long) { + FfiConverterTypeSpaceRoomListEntriesListener.handleMap.remove(handle) + } + } + + internal var vtable = UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener.UniffiByValue( + `onUpdate`, + uniffiFree, + ) + + // Registers the foreign callback with the Rust side. + // This method is generated for each callback interface. + internal fun register(lib: UniffiLib) { + lib.uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener(vtable) + } +} + +/** + * The ffiConverter which transforms the Callbacks in to handles to pass to Rust. + * + * @suppress + */ +public object FfiConverterTypeSpaceRoomListEntriesListener: FfiConverterCallbackInterface() + + + + + +public interface SpaceRoomListPaginationStateListener { + + fun `onUpdate`(`paginationState`: SpaceRoomListPaginationState) + + companion object +} + + + +// Put the implementation in an object so we don't pollute the top-level namespace +internal object uniffiCallbackInterfaceSpaceRoomListPaginationStateListener { + internal object `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 { + override fun callback(`uniffiHandle`: Long,`paginationState`: RustBufferSpaceRoomListPaginationState.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { + val uniffiObj = FfiConverterTypeSpaceRoomListPaginationStateListener.handleMap.get(uniffiHandle) + val makeCall = { -> + uniffiObj.`onUpdate`( + FfiConverterTypeSpaceRoomListPaginationState.lift(`paginationState`), + ) + } + val writeReturn = { _: Unit -> Unit } + uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) + } + } + + internal object uniffiFree: UniffiCallbackInterfaceFree { + override fun callback(handle: Long) { + FfiConverterTypeSpaceRoomListPaginationStateListener.handleMap.remove(handle) + } + } + + internal var vtable = UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener.UniffiByValue( + `onUpdate`, + uniffiFree, + ) + + // Registers the foreign callback with the Rust side. + // This method is generated for each callback interface. + internal fun register(lib: UniffiLib) { + lib.uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(vtable) + } +} + +/** + * The ffiConverter which transforms the Callbacks in to handles to pass to Rust. + * + * @suppress + */ +public object FfiConverterTypeSpaceRoomListPaginationStateListener: FfiConverterCallbackInterface() + + + + + +public interface SpaceServiceJoinedSpacesListener { + + fun `onUpdate`(`roomUpdates`: List) + + companion object +} + + + +// Put the implementation in an object so we don't pollute the top-level namespace +internal object uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener { + internal object `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 { + override fun callback(`uniffiHandle`: Long,`roomUpdates`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { + val uniffiObj = FfiConverterTypeSpaceServiceJoinedSpacesListener.handleMap.get(uniffiHandle) + val makeCall = { -> + uniffiObj.`onUpdate`( + FfiConverterSequenceTypeSpaceListUpdate.lift(`roomUpdates`), + ) + } + val writeReturn = { _: Unit -> Unit } + uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) + } + } + + internal object uniffiFree: UniffiCallbackInterfaceFree { + override fun callback(handle: Long) { + FfiConverterTypeSpaceServiceJoinedSpacesListener.handleMap.remove(handle) + } + } + + internal var vtable = UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener.UniffiByValue( + `onUpdate`, + uniffiFree, + ) + + // Registers the foreign callback with the Rust side. + // This method is generated for each callback interface. + internal fun register(lib: UniffiLib) { + lib.uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(vtable) + } +} + +/** + * The ffiConverter which transforms the Callbacks in to handles to pass to Rust. + * + * @suppress + */ +public object FfiConverterTypeSpaceServiceJoinedSpacesListener: FfiConverterCallbackInterface() + + + + + public interface SyncServiceStateObserver { fun `onUpdate`(`state`: SyncServiceState) @@ -46346,38 +48021,6 @@ public object FfiConverterOptionalTypeThreadSummary: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TimelineItem? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTimelineItem.read(buf) - } - - override fun allocationSize(value: TimelineItem?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTimelineItem.allocationSize(value) - } - } - - override fun write(value: TimelineItem?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTimelineItem.write(value, buf) - } - } -} - - - - /** * @suppress */ @@ -46605,28 +48248,28 @@ public object FfiConverterOptionalTypeImageInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): InsertData? { +public object FfiConverterOptionalTypeMatrixEntity: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): MatrixEntity? { if (buf.get().toInt() == 0) { return null } - return FfiConverterTypeInsertData.read(buf) + return FfiConverterTypeMatrixEntity.read(buf) } - override fun allocationSize(value: InsertData?): ULong { + override fun allocationSize(value: MatrixEntity?): ULong { if (value == null) { return 1UL } else { - return 1UL + FfiConverterTypeInsertData.allocationSize(value) + return 1UL + FfiConverterTypeMatrixEntity.allocationSize(value) } } - override fun write(value: InsertData?, buf: ByteBuffer) { + override fun write(value: MatrixEntity?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { buf.put(1) - FfiConverterTypeInsertData.write(value, buf) + FfiConverterTypeMatrixEntity.write(value, buf) } } } @@ -46637,28 +48280,28 @@ public object FfiConverterOptionalTypeInsertData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): MatrixEntity? { +public object FfiConverterOptionalTypeMediaPreviewConfig: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): MediaPreviewConfig? { if (buf.get().toInt() == 0) { return null } - return FfiConverterTypeMatrixEntity.read(buf) + return FfiConverterTypeMediaPreviewConfig.read(buf) } - override fun allocationSize(value: MatrixEntity?): ULong { + override fun allocationSize(value: MediaPreviewConfig?): ULong { if (value == null) { return 1UL } else { - return 1UL + FfiConverterTypeMatrixEntity.allocationSize(value) + return 1UL + FfiConverterTypeMediaPreviewConfig.allocationSize(value) } } - override fun write(value: MatrixEntity?, buf: ByteBuffer) { + override fun write(value: MediaPreviewConfig?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { buf.put(1) - FfiConverterTypeMatrixEntity.write(value, buf) + FfiConverterTypeMediaPreviewConfig.write(value, buf) } } } @@ -46669,28 +48312,28 @@ public object FfiConverterOptionalTypeMatrixEntity: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): MediaPreviewConfig? { +public object FfiConverterOptionalTypeMediaUploadProgress: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): MediaUploadProgress? { if (buf.get().toInt() == 0) { return null } - return FfiConverterTypeMediaPreviewConfig.read(buf) + return FfiConverterTypeMediaUploadProgress.read(buf) } - override fun allocationSize(value: MediaPreviewConfig?): ULong { + override fun allocationSize(value: MediaUploadProgress?): ULong { if (value == null) { return 1UL } else { - return 1UL + FfiConverterTypeMediaPreviewConfig.allocationSize(value) + return 1UL + FfiConverterTypeMediaUploadProgress.allocationSize(value) } } - override fun write(value: MediaPreviewConfig?, buf: ByteBuffer) { + override fun write(value: MediaUploadProgress?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { buf.put(1) - FfiConverterTypeMediaPreviewConfig.write(value, buf) + FfiConverterTypeMediaUploadProgress.write(value, buf) } } } @@ -46858,38 +48501,6 @@ public object FfiConverterOptionalTypePredecessorRoom: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ReplyParameters? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeReplyParameters.read(buf) - } - - override fun allocationSize(value: ReplyParameters?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeReplyParameters.allocationSize(value) - } - } - - override fun write(value: ReplyParameters?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeReplyParameters.write(value, buf) - } - } -} - - - - /** * @suppress */ @@ -46989,28 +48600,28 @@ public object FfiConverterOptionalTypeRoomMemberWithSenderInfo: FfiConverterRust /** * @suppress */ -public object FfiConverterOptionalTypeSetData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SetData? { +public object FfiConverterOptionalTypeSuccessorRoom: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): SuccessorRoom? { if (buf.get().toInt() == 0) { return null } - return FfiConverterTypeSetData.read(buf) + return FfiConverterTypeSuccessorRoom.read(buf) } - override fun allocationSize(value: SetData?): ULong { + override fun allocationSize(value: SuccessorRoom?): ULong { if (value == null) { return 1UL } else { - return 1UL + FfiConverterTypeSetData.allocationSize(value) + return 1UL + FfiConverterTypeSuccessorRoom.allocationSize(value) } } - override fun write(value: SetData?, buf: ByteBuffer) { + override fun write(value: SuccessorRoom?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { buf.put(1) - FfiConverterTypeSetData.write(value, buf) + FfiConverterTypeSuccessorRoom.write(value, buf) } } } @@ -47021,28 +48632,28 @@ public object FfiConverterOptionalTypeSetData: FfiConverterRustBuffer /** * @suppress */ -public object FfiConverterOptionalTypeSuccessorRoom: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SuccessorRoom? { +public object FfiConverterOptionalTypeThreadSubscription: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): ThreadSubscription? { if (buf.get().toInt() == 0) { return null } - return FfiConverterTypeSuccessorRoom.read(buf) + return FfiConverterTypeThreadSubscription.read(buf) } - override fun allocationSize(value: SuccessorRoom?): ULong { + override fun allocationSize(value: ThreadSubscription?): ULong { if (value == null) { return 1UL } else { - return 1UL + FfiConverterTypeSuccessorRoom.allocationSize(value) + return 1UL + FfiConverterTypeThreadSubscription.allocationSize(value) } } - override fun write(value: SuccessorRoom?, buf: ByteBuffer) { + override fun write(value: ThreadSubscription?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { buf.put(1) - FfiConverterTypeSuccessorRoom.write(value, buf) + FfiConverterTypeThreadSubscription.write(value, buf) } } } @@ -47690,6 +49301,38 @@ public object FfiConverterOptionalTypeShieldState: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): UploadSource? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeUploadSource.read(buf) + } + + override fun allocationSize(value: UploadSource?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeUploadSource.allocationSize(value) + } + } + + override fun write(value: UploadSource?, buf: ByteBuffer) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeUploadSource.write(value, buf) + } + } +} + + + + /** * @suppress */ @@ -47946,38 +49589,6 @@ public object FfiConverterOptionalSequenceString: FfiConverterRustBuffer?> { - override fun read(buf: ByteBuffer): List? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterSequenceTypeTimelineItem.read(buf) - } - - override fun allocationSize(value: List?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterSequenceTypeTimelineItem.allocationSize(value) - } - } - - override fun write(value: List?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterSequenceTypeTimelineItem.write(value, buf) - } - } -} - - - - /** * @suppress */ @@ -48246,34 +49857,6 @@ public object FfiConverterSequenceTypeSessionVerificationEmoji: FfiConverterRust -/** - * @suppress - */ -public object FfiConverterSequenceTypeTimelineDiff: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTimelineDiff.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.map { FfiConverterTypeTimelineDiff.allocationSize(it) }.sum() - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTimelineDiff.write(it, buf) - } - } -} - - - - /** * @suppress */ @@ -48666,6 +50249,34 @@ public object FfiConverterSequenceTypeSimplePushRule: FfiConverterRustBuffer> { + override fun read(buf: ByteBuffer): List { + val len = buf.getInt() + return List(len) { + FfiConverterTypeSpaceRoom.read(buf) + } + } + + override fun allocationSize(value: List): ULong { + val sizeForLength = 4UL + val sizeForItems = value.map { FfiConverterTypeSpaceRoom.allocationSize(it) }.sum() + return sizeForLength + sizeForItems + } + + override fun write(value: List, buf: ByteBuffer) { + buf.putInt(value.size) + value.iterator().forEach { + FfiConverterTypeSpaceRoom.write(it, buf) + } + } +} + + + + /** * @suppress */ @@ -49086,6 +50697,62 @@ public object FfiConverterSequenceTypeSlidingSyncVersion: FfiConverterRustBuffer +/** + * @suppress + */ +public object FfiConverterSequenceTypeSpaceListUpdate: FfiConverterRustBuffer> { + override fun read(buf: ByteBuffer): List { + val len = buf.getInt() + return List(len) { + FfiConverterTypeSpaceListUpdate.read(buf) + } + } + + override fun allocationSize(value: List): ULong { + val sizeForLength = 4UL + val sizeForItems = value.map { FfiConverterTypeSpaceListUpdate.allocationSize(it) }.sum() + return sizeForLength + sizeForItems + } + + override fun write(value: List, buf: ByteBuffer) { + buf.putInt(value.size) + value.iterator().forEach { + FfiConverterTypeSpaceListUpdate.write(it, buf) + } + } +} + + + + +/** + * @suppress + */ +public object FfiConverterSequenceTypeTimelineDiff: FfiConverterRustBuffer> { + override fun read(buf: ByteBuffer): List { + val len = buf.getInt() + return List(len) { + FfiConverterTypeTimelineDiff.read(buf) + } + } + + override fun allocationSize(value: List): ULong { + val sizeForLength = 4UL + val sizeForItems = value.map { FfiConverterTypeTimelineDiff.allocationSize(it) }.sum() + return sizeForLength + sizeForItems + } + + override fun write(value: List, buf: ByteBuffer) { + buf.putInt(value.size) + value.iterator().forEach { + FfiConverterTypeTimelineDiff.write(it, buf) + } + } +} + + + + /** * @suppress */ @@ -49493,6 +51160,10 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong + + + + @@ -49795,20 +51466,33 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong ) } - fun `suggestedPowerLevelForRole`(`role`: RoomMemberRole): kotlin.Long { - return FfiConverterLong.lift( - uniffiRustCall() { _status -> + + /** + * Get the suggested power level for the given role. + * + * Returns an error if the value of the power level is unsupported. + */ + @Throws(ClientException::class) fun `suggestedPowerLevelForRole`(`role`: RoomMemberRole): PowerLevel { + return FfiConverterTypePowerLevel.lift( + uniffiRustCallWithError(ClientException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( FfiConverterTypeRoomMemberRole.lower(`role`),_status) } ) } - fun `suggestedRoleForPowerLevel`(`powerLevel`: kotlin.Long): RoomMemberRole { + + /** + * Get the suggested role for the given power level. + * + * Returns an error if the value of the power level is out of range for numbers + * accepted in canonical JSON. + */ + @Throws(ClientException::class) fun `suggestedRoleForPowerLevel`(`powerLevel`: PowerLevel): RoomMemberRole { return FfiConverterTypeRoomMemberRole.lift( - uniffiRustCall() { _status -> + uniffiRustCallWithError(ClientException) { _status -> UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - FfiConverterLong.lower(`powerLevel`),_status) + FfiConverterTypePowerLevel.lower(`powerLevel`),_status) } ) } diff --git a/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt b/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt index f872efb..02b2194 100644 --- a/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt +++ b/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt @@ -1535,6 +1535,47 @@ public object FfiConverterTypeRoomPowerLevelChanges: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): ServerVendorInfo { + return ServerVendorInfo( + FfiConverterString.read(buf), + FfiConverterString.read(buf), + ) + } + + override fun allocationSize(value: ServerVendorInfo) = ( + FfiConverterString.allocationSize(value.`serverName`) + + FfiConverterString.allocationSize(value.`version`) + ) + + override fun write(value: ServerVendorInfo, buf: ByteBuffer) { + FfiConverterString.write(value.`serverName`, buf) + FfiConverterString.write(value.`version`, buf) + } +} + + + /** * Properties to create a new virtual Element Call widget. */ @@ -1657,7 +1698,12 @@ data class VirtualElementCallWidgetOptions ( * - `false`: the webview shows a a list of devices injected by the * client. (used on ios & android) */ - var `controlledMediaDevices`: kotlin.Boolean + var `controlledMediaDevices`: kotlin.Boolean, + /** + * Whether and what type of notification Element Call should send, when + * starting a call. + */ + var `sendNotificationType`: NotificationType? ) { companion object @@ -1689,6 +1735,7 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB FfiConverterOptionalString.read(buf), FfiConverterOptionalString.read(buf), FfiConverterBoolean.read(buf), + FfiConverterOptionalTypeNotificationType.read(buf), ) } @@ -1712,7 +1759,8 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB FfiConverterOptionalString.allocationSize(value.`rageshakeSubmitUrl`) + FfiConverterOptionalString.allocationSize(value.`sentryDsn`) + FfiConverterOptionalString.allocationSize(value.`sentryEnvironment`) + - FfiConverterBoolean.allocationSize(value.`controlledMediaDevices`) + FfiConverterBoolean.allocationSize(value.`controlledMediaDevices`) + + FfiConverterOptionalTypeNotificationType.allocationSize(value.`sendNotificationType`) ) override fun write(value: VirtualElementCallWidgetOptions, buf: ByteBuffer) { @@ -1736,6 +1784,7 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB FfiConverterOptionalString.write(value.`sentryDsn`, buf) FfiConverterOptionalString.write(value.`sentryEnvironment`, buf) FfiConverterBoolean.write(value.`controlledMediaDevices`, buf) + FfiConverterOptionalTypeNotificationType.write(value.`sendNotificationType`, buf) } } @@ -1978,6 +2027,45 @@ public object FfiConverterTypeIntent: FfiConverterRustBuffer { +/** + * Types of call notifications. + */ + +enum class NotificationType { + + /** + * The receiving client should display a visual notification. + */ + NOTIFICATION, + /** + * The receiving client should ring with an audible sound. + */ + RING; + companion object +} + + +/** + * @suppress + */ +public object FfiConverterTypeNotificationType: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer) = try { + NotificationType.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } + + override fun allocationSize(value: NotificationType) = 4UL + + override fun write(value: NotificationType, buf: ByteBuffer) { + buf.putInt(value.ordinal + 1) + } +} + + + + + /** * Current state of a [`Paginator`]. */ @@ -2166,6 +2254,19 @@ public object FfiConverterTypeQRCodeLoginError : FfiConverterRustBuffer { } } + + + +/** + * @suppress + */ +public object FfiConverterOptionalTypeNotificationType: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): NotificationType? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeNotificationType.read(buf) + } + + override fun allocationSize(value: NotificationType?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeNotificationType.allocationSize(value) + } + } + + override fun write(value: NotificationType?, buf: ByteBuffer) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeNotificationType.write(value, buf) + } + } +} + diff --git a/android/src/main/java/uniffi/matrix_sdk_ui/matrix_sdk_ui.kt b/android/src/main/java/uniffi/matrix_sdk_ui/matrix_sdk_ui.kt index 61d28c4..17af599 100644 --- a/android/src/main/java/uniffi/matrix_sdk_ui/matrix_sdk_ui.kt +++ b/android/src/main/java/uniffi/matrix_sdk_ui/matrix_sdk_ui.kt @@ -976,6 +976,29 @@ inline fun T.use(block: (T) -> R) = * */ object NoPointer +/** + * @suppress + */ +public object FfiConverterBoolean: FfiConverter { + override fun lift(value: Byte): Boolean { + return value.toInt() != 0 + } + + override fun read(buf: ByteBuffer): Boolean { + return lift(buf.get()) + } + + override fun lower(value: Boolean): Byte { + return if (value) 1.toByte() else 0.toByte() + } + + override fun allocationSize(value: Boolean) = 1UL + + override fun write(value: Boolean, buf: ByteBuffer) { + buf.put(lower(value)) + } +} + /** * @suppress */ @@ -1123,3 +1146,67 @@ public object FfiConverterTypeRoomPinnedEventsChange: FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): SpaceRoomListPaginationState { + return when(buf.getInt()) { + 1 -> SpaceRoomListPaginationState.Idle( + FfiConverterBoolean.read(buf), + ) + 2 -> SpaceRoomListPaginationState.Loading + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } + } + + override fun allocationSize(value: SpaceRoomListPaginationState) = when(value) { + is SpaceRoomListPaginationState.Idle -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterBoolean.allocationSize(value.`endReached`) + ) + } + is SpaceRoomListPaginationState.Loading -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + } + + override fun write(value: SpaceRoomListPaginationState, buf: ByteBuffer) { + when(value) { + is SpaceRoomListPaginationState.Idle -> { + buf.putInt(1) + FfiConverterBoolean.write(value.`endReached`, buf) + Unit + } + is SpaceRoomListPaginationState.Loading -> { + buf.putInt(2) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } +} + + + diff --git a/cpp/generated/matrix_sdk_ffi.cpp b/cpp/generated/matrix_sdk_ffi.cpp index b720962..4744bc1 100644 --- a/cpp/generated/matrix_sdk_ffi.cpp +++ b/cpp/generated/matrix_sdk_ffi.cpp @@ -205,6 +205,16 @@ typedef void ( *UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6)( uint64_t uniffi_handle, void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0)( + uint64_t uniffi_handle, RustBuffer rooms, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void ( + *UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer pagination_state, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0)( + uint64_t uniffi_handle, RustBuffer room_updates, void *uniffi_out_return, + RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceSyncServiceStateObserverMethod0)( uint64_t uniffi_handle, RustBuffer state, void *uniffi_out_return, RustCallStatus *rust_call_status); @@ -340,6 +350,19 @@ typedef struct did_finish; UniffiCallbackInterfaceFree uniffi_free; } UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate; +typedef struct UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener { + UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 on_update; + UniffiCallbackInterfaceFree uniffi_free; +} UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener; +typedef struct + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener { + UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 on_update; + UniffiCallbackInterfaceFree uniffi_free; +} UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener; +typedef struct UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener { + UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 on_update; + UniffiCallbackInterfaceFree uniffi_free; +} UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener; typedef struct UniffiVTableCallbackInterfaceSyncServiceStateObserver { UniffiCallbackInterfaceSyncServiceStateObserverMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; @@ -410,6 +433,8 @@ uniffi_matrix_sdk_ffi_fn_method_client_display_name(void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues(void *ptr, int8_t enable); +void uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + void *ptr, int8_t enable, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_client_encryption( void *ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t @@ -487,6 +512,9 @@ uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( void *ptr, RustBuffer callback_url); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + void *ptr, void *qr_code_data, RustBuffer oidc_configuration, + uint64_t progress_listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_logout(void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_notification_client( void *ptr, RustBuffer process_setup); @@ -520,6 +548,8 @@ uniffi_matrix_sdk_ffi_fn_method_client_rooms(void *ptr, RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_server(void *ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info(void *ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_session(void *ptr, RustCallStatus *uniffi_out_err); @@ -548,6 +578,8 @@ uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate(void *ptr, uint64_t utd_delegate); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( void *ptr, RustCallStatus *uniffi_out_err); +void *uniffi_matrix_sdk_ffi_fn_method_client_space_service( + void *ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( void *ptr, RustBuffer redirect_url, RustBuffer idp_id); void *uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( @@ -575,7 +607,7 @@ uniffi_matrix_sdk_ffi_fn_method_client_unignore_user(void *ptr, RustBuffer progress_watcher); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( void *ptr, RustBuffer oidc_configuration, RustBuffer prompt, - RustBuffer login_hint); + RustBuffer login_hint, RustBuffer device_id, RustBuffer additional_scopes); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_user_id(void *ptr, RustCallStatus *uniffi_out_err); @@ -600,10 +632,6 @@ void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - void *ptr, void *qr_code_data, RustBuffer oidc_configuration, - uint64_t progress_listener); void * uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( void *ptr, RustBuffer holder_name, RustCallStatus *uniffi_out_err); @@ -656,7 +684,8 @@ void * uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( void *ptr, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( - void *ptr, int8_t enabled, RustCallStatus *uniffi_out_err); + void *ptr, int8_t enabled, int8_t thread_subscriptions, + RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( void *ptr, RustBuffer user_agent, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( @@ -727,6 +756,9 @@ uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( int8_t uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( void *ptr, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + void *ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( void *ptr, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( @@ -924,6 +956,9 @@ void uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( void *ptr, int8_t enable, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( void *ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + void *ptr, RustBuffer thread_root_event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_forget(void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(void *ptr); @@ -997,6 +1032,8 @@ uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync(void *ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_membership(void *ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event(void *ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( void *ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( @@ -1028,12 +1065,6 @@ uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string(void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_room_info(void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( void *ptr, RustBuffer draft, RustBuffer thread_root); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - void *ptr, RustBuffer call_id, RustBuffer application, - RustBuffer notify_type, RustBuffer mentions); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - void *ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_send_live_location(void *ptr, RustBuffer geo_uri); @@ -1047,6 +1078,9 @@ uniffi_matrix_sdk_ffi_fn_method_room_send_raw(void *ptr, RustBuffer event_type, /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_name(void *ptr, RustBuffer name); /*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + void *ptr, RustBuffer thread_root_event_id, int8_t subscribed); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_topic(void *ptr, RustBuffer topic); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag(void *ptr, @@ -1312,6 +1346,35 @@ RustBuffer uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( void *ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( void *ptr, RustCallStatus *uniffi_out_err); +void * +uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(void *ptr, + RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + void *ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate(void *ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + void *ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + void *ptr, RustCallStatus *uniffi_out_err); +void * +uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +void *uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +void * +uniffi_matrix_sdk_ffi_fn_clone_spaceservice(void *ptr, + RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_spaceservice(void *ptr, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces(void *ptr); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + void *ptr, RustBuffer space_id); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + void *ptr, uint64_t listener); void *uniffi_matrix_sdk_ffi_fn_clone_span(void *ptr, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_span(void *ptr, @@ -1343,6 +1406,8 @@ uniffi_matrix_sdk_ffi_fn_clone_syncservice(void *ptr, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_syncservice(void *ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions(void *ptr); void *uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( void *ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t @@ -1425,34 +1490,33 @@ void uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( void *msg); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( void *ptr, RustBuffer params, RustBuffer audio_info, - RustBuffer progress_watcher, RustCallStatus *uniffi_out_err); + RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( void *ptr, RustBuffer params, RustBuffer file_info, - RustBuffer progress_watcher, RustCallStatus *uniffi_out_err); + RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( void *ptr, RustBuffer params, RustBuffer item_infos, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( - void *ptr, RustBuffer params, RustBuffer thumbnail_path, - RustBuffer image_info, RustBuffer progress_watcher, - RustCallStatus *uniffi_out_err); + void *ptr, RustBuffer params, RustBuffer thumbnail_source, + RustBuffer image_info, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( void *ptr, RustBuffer body, RustBuffer geo_uri, RustBuffer description, - RustBuffer zoom_level, RustBuffer asset_type, RustBuffer reply_params); + RustBuffer zoom_level, RustBuffer asset_type, + RustBuffer replied_to_event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( void *ptr, RustBuffer poll_start_event_id, RustBuffer answers); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt( void *ptr, RustBuffer receipt_type, RustBuffer event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(void *ptr, void *msg, - RustBuffer reply_params); + RustBuffer event_id); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( - void *ptr, RustBuffer params, RustBuffer thumbnail_path, - RustBuffer video_info, RustBuffer progress_watcher, - RustCallStatus *uniffi_out_err); + void *ptr, RustBuffer params, RustBuffer thumbnail_source, + RustBuffer video_info, RustCallStatus *uniffi_out_err); void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( void *ptr, RustBuffer params, RustBuffer audio_info, RustBuffer waveform, - RustBuffer progress_watcher, RustCallStatus *uniffi_out_err); + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( void *ptr, uint64_t listener); @@ -1462,29 +1526,6 @@ uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(void *ptr, RustBuffer event_id); void * -uniffi_matrix_sdk_ffi_fn_clone_timelinediff(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_timelinediff(void *ptr, - RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - void *ptr, RustCallStatus *uniffi_out_err); -void * uniffi_matrix_sdk_ffi_fn_clone_timelineevent(void *ptr, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_timelineevent( @@ -1613,6 +1654,12 @@ void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( UniffiVTableCallbackInterfaceSendQueueRoomErrorListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( UniffiVTableCallbackInterfaceSyncServiceStateObserver *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener( @@ -1674,10 +1721,10 @@ RustBuffer uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( RustBuffer room_name, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(RustCallStatus *uniffi_out_err); -int64_t uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( +RustBuffer uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( RustBuffer role, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - int64_t power_level, RustCallStatus *uniffi_out_err); + RustBuffer power_level, RustCallStatus *uniffi_out_err); RustBuffer ffi_matrix_sdk_ffi_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); RustBuffer @@ -1851,6 +1898,8 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_device_id(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_display_name(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_encryption(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config(); @@ -1895,6 +1944,7 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_login(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_logout(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_notification_client(); uint16_t @@ -1911,6 +1961,7 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_rooms(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_search_users(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_server(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_session(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate(); @@ -1924,6 +1975,7 @@ uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_space_service(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users(); @@ -1951,8 +2003,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings(); @@ -2026,6 +2076,8 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel(); @@ -2114,6 +2166,7 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_edit(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_forget(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility(); @@ -2148,6 +2201,7 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_members(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_membership(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_preview_room(); @@ -2164,14 +2218,12 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_room_info(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_send_raw(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_name(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_topic(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share(); @@ -2306,11 +2358,23 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_span_enter(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_span_exit(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_span_is_none(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservice_start(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservice_state(); @@ -2359,15 +2423,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id(); @@ -2463,6 +2518,12 @@ uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_ uint16_t uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish(); uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(); uint16_t @@ -5762,6 +5823,345 @@ static void cleanup() { } // namespace // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesessionverificationcontrollerdelegate::vtablecallbackinterfacesessionverificationcontrollerdelegate::free +// Callback function: +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistentrieslistener::vtablecallbackinterfacespaceroomlistentrieslistener::free::UniffiCallbackInterfaceFree +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + vtablecallbackinterfacespaceroomlistentrieslistener::free { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function rsLambda = nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_handle) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_handle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_handle); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_handle); + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceFree: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_handle) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle); +} + +static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistentrieslistener::vtablecallbackinterfacespaceroomlistentrieslistener::free + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + + callInvoker->invokeNonBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistentrieslistener::vtablecallbackinterfacespaceroomlistentrieslistener::free + +// Callback function: +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistpaginationstatelistener::vtablecallbackinterfacespaceroomlistpaginationstatelistener::free::UniffiCallbackInterfaceFree +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener::free { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function rsLambda = nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_handle) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_handle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_handle); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_handle); + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceFree: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_handle) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle); +} + +static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistpaginationstatelistener::vtablecallbackinterfacespaceroomlistpaginationstatelistener::free + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + + callInvoker->invokeNonBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistpaginationstatelistener::vtablecallbackinterfacespaceroomlistpaginationstatelistener::free + +// Callback function: +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceservicejoinedspaceslistener::vtablecallbackinterfacespaceservicejoinedspaceslistener::free::UniffiCallbackInterfaceFree +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::free { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function rsLambda = nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_handle) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_handle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_handle); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_handle); + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceFree: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_handle) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle); +} + +static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceservicejoinedspaceslistener::vtablecallbackinterfacespaceservicejoinedspaceslistener::free + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + + callInvoker->invokeNonBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceservicejoinedspaceslistener::vtablecallbackinterfacespaceservicejoinedspaceslistener::free + // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free::UniffiCallbackInterfaceFree // @@ -11123,12 +11523,411 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2 + // Implementation of callback function calling from Rust to JS + // CallbackInterfaceSessionVerificationControllerDelegateMethod3 + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod3 { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function + rsLambda = nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_uniffiHandle, RustBuffer rs_data, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_uniffiHandle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + auto js_data = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_data); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_data); + + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); + + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; + } + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" + "ethod3: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_data, + void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_data, rs_uniffiOutReturn, uniffi_call_status); +} + +static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, callbackValue]( + uint64_t rs_uniffiHandle, RustBuffer rs_data, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_uniffiHandle, rs_data, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_data, + rs_uniffiOutReturn, uniffi_call_status); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + callInvoker->invokeBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 + // Implementation of callback function calling from Rust to JS + // CallbackInterfaceSessionVerificationControllerDelegateMethod4 + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod4 { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function rsLambda = + nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_uniffiHandle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_uniffiHandle); + + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); + + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; + } + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" + "ethod4: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); +} + +static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, + callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, + uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_uniffiOutReturn, uniffi_call_status); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + callInvoker->invokeBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 + // Implementation of callback function calling from Rust to JS + // CallbackInterfaceSessionVerificationControllerDelegateMethod5 + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 +// +// We have the following constraints: +// - we need to pass a function pointer to Rust. +// - we need a jsi::Runtime and jsi::Function to call into JS. +// - function pointers can't store state, so we can't use a lamda. +// +// For this, we store a lambda as a global, as `rsLambda`. The `callback` +// function calls the lambda, which itself calls the `body` which then calls +// into JS. +// +// We then give the `callback` function pointer to Rust which will call the +// lambda sometime in the future. +namespace uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod5 { +using namespace facebook; + +// We need to store a lambda in a global so we can call it from +// a function pointer. The function pointer is passed to Rust. +static std::function rsLambda = + nullptr; + +// This is the main body of the callback. It's called from the lambda, +// which itself is called from the callback function which is passed to Rust. +static void body(jsi::Runtime &rt, + std::shared_ptr callInvoker, + std::shared_ptr callbackValue, + uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + + // Convert the arguments from Rust, into jsi::Values. + // We'll use the Bridging class to do this… + auto js_uniffiHandle = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + + // Now we are ready to call the callback. + // We are already on the JS thread, because this `body` function was + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + auto uniffiResult = cb.call(rt, js_uniffiHandle); + + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); + + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; + } + + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" + "ethod5: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + // If the runtime has shutdown, then there is no point in trying to + // call into Javascript. BUT how do we tell if the runtime has shutdown? + // + // Answer: the module destructor calls into callback `cleanup` method, + // which nulls out the rsLamda. + // + // If rsLamda is null, then there is no runtime to call into. + if (rsLambda == nullptr) { + // This only occurs when destructors are calling into Rust free/drop, + // which causes the JS callback to be dropped. + return; + } + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); +} + +static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 + jsi::Runtime &rt, + std::shared_ptr callInvoker, + const jsi::Value &value) { + if (rsLambda != nullptr) { + // `makeCallbackFunction` is called in two circumstances: + // + // 1. at startup, when initializing callback interface vtables. + // 2. when polling futures. This happens at least once per future that is + // exposed to Javascript. We know that this is always the same function, + // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`. + // + // We can therefore return the callback function without making anything + // new if we've been initialized already. + return callback; + } + auto callbackFunction = value.asObject(rt).asFunction(rt); + auto callbackValue = std::make_shared(rt, callbackFunction); + rsLambda = [&rt, callInvoker, + callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { + // We immediately make a lambda which will do the work of transforming the + // arguments into JSI values and calling the callback. + uniffi_runtime::UniffiCallFunc jsLambda = + [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, + uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_uniffiOutReturn, uniffi_call_status); + }; + // We'll then call that lambda from the callInvoker which will + // look after calling it on the correct thread. + callInvoker->invokeBlocking(rt, jsLambda); + }; + return callback; +} + +// This method is called from the destructor of NativeMatrixSdkFfi, which only +// happens when the jsi::Runtime is being destroyed. +static void cleanup() { + // The lambda holds a reference to the the Runtime, so when this is nulled + // out, then the pointer will no longer be left dangling. + rsLambda = nullptr; +} +} // namespace + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod3 + // CallbackInterfaceSessionVerificationControllerDelegateMethod6 // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11142,28 +11941,26 @@ static void cleanup() { // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. namespace uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod3 { + callbackinterfacesessionverificationcontrollerdelegatemethod6 { using namespace facebook; // We need to store a lambda in a global so we can call it from // a function pointer. The function pointer is passed to Rust. -static std::function - rsLambda = nullptr; +static std::function rsLambda = + nullptr; // This is the main body of the callback. It's called from the lambda, // which itself is called from the callback function which is passed to Rust. static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_data, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { // Convert the arguments from Rust, into jsi::Values. // We'll use the Bridging class to do this… auto js_uniffiHandle = uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); - auto js_data = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_data); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11171,7 +11968,7 @@ static void body(jsi::Runtime &rt, try { // Getting the callback function auto cb = callbackValue->asObject(rt).asFunction(rt); - auto uniffiResult = cb.call(rt, js_uniffiHandle, js_data); + auto uniffiResult = cb.call(rt, js_uniffiHandle); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11186,14 +11983,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod3: " + "ethod6: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_data, - void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to // call into Javascript. BUT how do we tell if the runtime has shutdown? @@ -11210,11 +12006,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_data, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_data, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 +static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11232,15 +12028,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionver } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_data, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, + callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, + RustCallStatus *uniffi_call_status) { // We immediately make a lambda which will do the work of transforming the // arguments into JSI values and calling the callback. uniffi_runtime::UniffiCallFunc jsLambda = - [callInvoker, callbackValue, rs_uniffiHandle, rs_data, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_data, + [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, + uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -11258,12 +12054,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod4 + // CallbackInterfaceSpaceRoomListEntriesListenerMethod0 // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0::UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11277,26 +12073,28 @@ static void cleanup() { // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. namespace uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod4 { + callbackinterfacespaceroomlistentrieslistenermethod0 { using namespace facebook; // We need to store a lambda in a global so we can call it from // a function pointer. The function pointer is passed to Rust. -static std::function rsLambda = - nullptr; +static std::function + rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, // which itself is called from the callback function which is passed to Rust. static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_rooms, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // Convert the arguments from Rust, into jsi::Values. // We'll use the Bridging class to do this… auto js_uniffiHandle = uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + auto js_rooms = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_rooms); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11304,7 +12102,7 @@ static void body(jsi::Runtime &rt, try { // Getting the callback function auto cb = callbackValue->asObject(rt).asFunction(rt); - auto uniffiResult = cb.call(rt, js_uniffiHandle); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_rooms); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11318,14 +12116,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod4: " + "UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_rooms, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to // call into Javascript. BUT how do we tell if the runtime has shutdown? @@ -11342,11 +12140,11 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_rooms, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 +static UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0 jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11364,15 +12162,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionver } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue]( + uint64_t rs_uniffiHandle, RustBuffer rs_rooms, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // We immediately make a lambda which will do the work of transforming the // arguments into JSI values and calling the callback. uniffi_runtime::UniffiCallFunc jsLambda = - [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, - uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, + [callInvoker, callbackValue, rs_uniffiHandle, rs_rooms, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_rooms, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -11390,12 +12188,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0 // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod5 + // CallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0::UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11409,26 +12207,28 @@ static void cleanup() { // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. namespace uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod5 { + callbackinterfacespaceroomlistpaginationstatelistenermethod0 { using namespace facebook; // We need to store a lambda in a global so we can call it from // a function pointer. The function pointer is passed to Rust. -static std::function rsLambda = - nullptr; +static std::function + rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, // which itself is called from the callback function which is passed to Rust. static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // Convert the arguments from Rust, into jsi::Values. // We'll use the Bridging class to do this… auto js_uniffiHandle = uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + auto js_paginationState = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_paginationState); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11436,7 +12236,7 @@ static void body(jsi::Runtime &rt, try { // Getting the callback function auto cb = callbackValue->asObject(rt).asFunction(rt); - auto uniffiResult = cb.call(rt, js_uniffiHandle); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_paginationState); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11450,14 +12250,15 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod5: " + "UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMe" + "thod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to // call into Javascript. BUT how do we tell if the runtime has shutdown? @@ -11474,11 +12275,12 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_paginationState, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 +static UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0 jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11496,16 +12298,16 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionver } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue]( + uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // We immediately make a lambda which will do the work of transforming the // arguments into JSI values and calling the callback. uniffi_runtime::UniffiCallFunc jsLambda = - [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, - uniffi_call_status](jsi::Runtime &rt) mutable { + [callInvoker, callbackValue, rs_uniffiHandle, rs_paginationState, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_uniffiOutReturn, uniffi_call_status); + rs_paginationState, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11522,12 +12324,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0 // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod6 + // CallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0::UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11541,26 +12343,28 @@ static void cleanup() { // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. namespace uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod6 { + callbackinterfacespaceservicejoinedspaceslistenermethod0 { using namespace facebook; // We need to store a lambda in a global so we can call it from // a function pointer. The function pointer is passed to Rust. -static std::function rsLambda = - nullptr; +static std::function + rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, // which itself is called from the callback function which is passed to Rust. static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // Convert the arguments from Rust, into jsi::Values. // We'll use the Bridging class to do this… auto js_uniffiHandle = uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_uniffiHandle); + auto js_roomUpdates = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomUpdates); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11568,7 +12372,7 @@ static void body(jsi::Runtime &rt, try { // Getting the callback function auto cb = callbackValue->asObject(rt).asFunction(rt); - auto uniffiResult = cb.call(rt, js_uniffiHandle); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_roomUpdates); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11581,15 +12385,16 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod6: " - << error.what() << std::endl; + std::cout + << "Error in callback " + "UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to // call into Javascript. BUT how do we tell if the runtime has shutdown? @@ -11606,11 +12411,12 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_roomUpdates, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 +static UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0 jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11628,15 +12434,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionver } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue]( + uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // We immediately make a lambda which will do the work of transforming the // arguments into JSI values and calling the callback. uniffi_runtime::UniffiCallFunc jsLambda = - [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn, - uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, + [callInvoker, callbackValue, rs_uniffiHandle, rs_roomUpdates, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomUpdates, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -11654,7 +12460,7 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0 // Implementation of callback function calling from Rust to JS // CallbackInterfaceSyncServiceStateObserverMethod0 @@ -13434,6 +14240,122 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener + fromJs(jsi::Runtime &rt, std::shared_ptr callInvoker, + const jsi::Value &jsValue) { + // Check if the input is an object + if (!jsValue.isObject()) { + throw jsi::JSError( + rt, "Expected an object for " + "UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistentrieslistenermethod0:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + vtablecallbackinterfacespaceroomlistentrieslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging< + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener> { + static UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener + fromJs(jsi::Runtime &rt, std::shared_ptr callInvoker, + const jsi::Value &jsValue) { + // Check if the input is an object + if (!jsValue.isObject()) { + throw jsi::JSError( + rt, + "Expected an object for " + "UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistpaginationstatelistenermethod0:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener + fromJs(jsi::Runtime &rt, std::shared_ptr callInvoker, + const jsi::Value &jsValue) { + // Check if the input is an object + if (!jsValue.isObject()) { + throw jsi::JSError( + rt, "Expected an object for " + "UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceservicejoinedspaceslistenermethod0:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + template <> struct Bridging { static UniffiVTableCallbackInterfaceSyncServiceStateObserver @@ -13923,6 +14845,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_" + "progress"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "client_enable_send_queue_upload_progress"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_encryption"] = jsi::Function::createFromHostFunction( rt, @@ -14278,6 +15212,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code"), + 4, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_logout"] = jsi::Function::createFromHostFunction( rt, @@ -14447,6 +15394,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_client_server( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_session"] = jsi::Function::createFromHostFunction( rt, @@ -14568,6 +15528,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_space_service"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_space_service"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_space_service( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login"] = jsi::Function::createFromHostFunction( rt, @@ -14694,7 +15666,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc"), - 4, + 6, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -14819,18 +15791,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_" - "code"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "clientbuilder_build_with_qr_code"), - 4, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_" "store_locks_holder_name"] = jsi::Function::createFromHostFunction( rt, @@ -15097,7 +16057,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" "clientbuilder_threads_enabled"), - 2, + 3, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -15477,6 +16437,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_" + "sso_login"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "homeserverlogindetails_supports_sso_login"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url"] = jsi::Function::createFromHostFunction( rt, @@ -16459,6 +17432,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "room_fetch_thread_subscription"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_forget"] = jsi::Function::createFromHostFunction( rt, @@ -16846,6 +17831,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_room_membership( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_own_user_id"] = jsi::Function::createFromHostFunction( rt, @@ -17009,30 +18006,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "room_send_call_notification"), - 5, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_" - "needed"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_" - "send_call_notification_if_needed"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location"] = jsi::Function::createFromHostFunction( rt, @@ -17093,6 +18066,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "room_set_thread_subscription"), + 3, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_topic"] = jsi::Function::createFromHostFunction( rt, @@ -18475,6 +19460,148 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "spaceroomlist_pagination_state"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_" + "pagination_state_updates"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_" + "pagination_state_updates"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_" + "update"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "spaceroomlist_subscribe_to_room_update"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceservice"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceservice"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_spaceservice( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "spaceservice_joined_spaces"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "spaceservice_space_room_list"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_" + "spaces"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "spaceservice_subscribe_to_joined_spaces"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_span"] = jsi::Function::createFromHostFunction( rt, @@ -18618,6 +19745,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_free_syncservice( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "syncservice_expire_sessions"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service"] = jsi::Function::createFromHostFunction( rt, @@ -19046,7 +20185,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio"), - 4, + 3, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -19058,7 +20197,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file"), - 4, + 3, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this->cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( @@ -19081,7 +20220,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image"), - 5, + 4, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -19142,7 +20281,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video"), - 5, + 4, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -19154,7 +20293,7 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" "timeline_send_voice_message"), - 5, + 4, [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value { return this @@ -19199,136 +20338,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelinediff"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelinediff"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_timelinediff"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_timelinediff"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_uniffi_matrix_sdk_ffi_fn_free_timelinediff( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent"] = jsi::Function::createFromHostFunction( rt, @@ -20080,6 +21089,46 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "spaceroomlistentrieslistener"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_spaceroomlistentrieslistener"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "spaceroomlistpaginationstatelistener"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "spaceroomlistpaginationstatelistener"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "spaceservicejoinedspaceslistener"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_spaceservicejoinedspaceslistener"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" "syncservicestateobserver"] = jsi::Function::createFromHostFunction( rt, @@ -21481,6 +22530,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_" + "upload_progress"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "client_enable_send_queue_upload_progress"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_encryption"] = jsi::Function::createFromHostFunction( rt, @@ -21850,6 +22912,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_" + "code"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_client_login_with_qr_code"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_logout"] = jsi::Function::createFromHostFunction( rt, @@ -22019,6 +23093,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_" + "info"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_client_server_vendor_info"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_session"] = jsi::Function::createFromHostFunction( rt, @@ -22143,6 +23229,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_space_service"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_client_space_service"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_space_service( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login"] = jsi::Function::createFromHostFunction( rt, @@ -22369,18 +23467,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_" - "qr_code"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_clientbuilder_build_with_qr_code"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_" "process_store_locks_holder_name"] = jsi::Function::createFromHostFunction( rt, @@ -22981,6 +24067,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "supports_sso_login"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "homeserverlogindetails_supports_sso_login"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" "url"] = jsi::Function::createFromHostFunction( rt, @@ -23711,6 +24810,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_" + "subscription"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_fetch_thread_subscription"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_forget"] = jsi::Function::createFromHostFunction( rt, @@ -24104,6 +25215,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_membership( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_new_latest_event"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id"] = jsi::Function::createFromHostFunction( rt, @@ -24278,31 +25401,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_" - "notification"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_send_call_notification"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_" - "notification_if_needed"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_send_call_notification_if_needed"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location"] = jsi::Function::createFromHostFunction( rt, @@ -24363,6 +25461,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_" + "subscription"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_set_thread_subscription"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic"] = jsi::Function::createFromHostFunction( rt, @@ -25457,6 +26567,106 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_spaceroomlist_paginate"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_" + "state"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_spaceroomlist_pagination_state"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_" + "pagination_state_updates"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_" + "subscribe_to_pagination_state_updates"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_" + "room_update"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceroomlist_subscribe_to_room_update"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_" + "spaces"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_spaceservice_joined_spaces"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_" + "list"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_spaceservice_space_room_list"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_" + "joined_spaces"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceservice_subscribe_to_joined_spaces"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter"] = jsi::Function::createFromHostFunction( rt, @@ -25515,6 +26725,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_" + "sessions"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_syncservice_expire_sessions"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_" "service"] = jsi::Function::createFromHostFunction( rt, @@ -26022,120 +27244,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelinediff_push_back"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelinediff_push_front"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelinediff_truncate"), - 0, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id"] = jsi::Function::createFromHostFunction( rt, @@ -26907,6 +28015,48 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceroomlistentrieslistener_on_update"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceroomlistentrieslistener_on_update"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceroomlistpaginationstatelistener_on_update"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceroomlistpaginationstatelistener_on_update"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceservicejoinedspaceslistener_on_update"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "spaceservicejoinedspaceslistener_on_update"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_" "on_update"] = jsi::Function::createFromHostFunction( rt, @@ -27343,6 +28493,31 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( rt, thisVal, args, count); }); + props["ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "spaceroomlist_ffi__bless_pointer"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer"), + 1, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + rt, thisVal, args, count); + }); props["ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -27429,19 +28604,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_timeline_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this - ->cpp_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -27638,6 +28800,17 @@ NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { vtablecallbackinterfacesessionverificationcontrollerdelegate:: vtablecallbackinterfacesessionverificationcontrollerdelegate::free:: cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + vtablecallbackinterfacespaceroomlistentrieslistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener::free:: + cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::free:: + cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver:: vtablecallbackinterfacesyncservicestateobserver::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener:: @@ -27770,6 +28943,18 @@ NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { uniffi::matrix_sdk_ffi::cb:: callbackinterfacesessionverificationcontrollerdelegatemethod6::cleanup(); // Cleanup for callback function + // CallbackInterfaceSpaceRoomListEntriesListenerMethod0 + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistentrieslistenermethod0::cleanup(); + // Cleanup for callback function + // CallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistpaginationstatelistenermethod0::cleanup(); + // Cleanup for callback function + // CallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceservicejoinedspaceslistenermethod0::cleanup(); + // Cleanup for callback function // CallbackInterfaceSyncServiceStateObserverMethod0 uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0:: cleanup(); @@ -28267,6 +29452,38 @@ jsi::Value NativeMatrixSdkFfi:: auto obj = jsi::Object::createFromHostObject(rt, ptrObj); return jsi::Value(rt, obj); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto pointer = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]); + auto static destructor = [](uint64_t p) { + auto pointer = reinterpret_cast(static_cast(p)); + RustCallStatus status = {0}; + uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(pointer, &status); + }; + auto ptrObj = + std::make_shared(pointer, destructor); + auto obj = jsi::Object::createFromHostObject(rt, ptrObj); + return jsi::Value(rt, obj); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto pointer = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]); + auto static destructor = [](uint64_t p) { + auto pointer = reinterpret_cast(static_cast(p)); + RustCallStatus status = {0}; + uniffi_matrix_sdk_ffi_fn_free_spaceservice(pointer, &status); + }; + auto ptrObj = + std::make_shared(pointer, destructor); + auto obj = jsi::Object::createFromHostObject(rt, ptrObj); + return jsi::Value(rt, obj); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_span_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -28379,22 +29596,6 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_timeline_ffi__bless_pointer( auto obj = jsi::Object::createFromHostObject(rt, ptrObj); return jsi::Value(rt, obj); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto pointer = - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]); - auto static destructor = [](uint64_t p) { - auto pointer = reinterpret_cast(static_cast(p)); - RustCallStatus status = {0}; - uniffi_matrix_sdk_ffi_fn_free_timelinediff(pointer, &status); - }; - auto ptrObj = - std::make_shared(pointer, destructor); - auto obj = jsi::Object::createFromHostObject(rt, ptrObj); - return jsi::Value(rt, obj); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -28724,6 +29925,20 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return jsi::Value::undefined(); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_encryption( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -29107,6 +30322,20 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[2]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_logout( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -29290,6 +30519,16 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_server( return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_session( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -29434,6 +30673,19 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_space_service( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_client_space_service( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -29583,7 +30835,11 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[2]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[3])); + args[3]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[4]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[5])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -29728,20 +30984,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[2]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3])); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, - value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -30090,7 +31332,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -30484,6 +31727,21 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -31551,6 +32809,18 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_forget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -31931,6 +33201,16 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_membership( value); } jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -32105,35 +33385,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[2]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[3]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[4])); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, - value); -} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -32198,6 +33449,19 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_name( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_topic( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -33732,6 +34996,158 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return jsi::Value::undefined(); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_spaceservice( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + uniffi_matrix_sdk_ffi_fn_free_spaceservice( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); + + return jsi::Value::undefined(); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_span( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -33901,6 +35317,16 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_syncservice( return jsi::Value::undefined(); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -34375,8 +35801,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( args[1]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[2]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[3]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34395,8 +35819,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( args[1]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[2]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[3]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34435,8 +35857,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( args[2]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[3]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[4]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34520,8 +35940,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( args[2]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[3]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[4]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34542,8 +35960,6 @@ jsi::Value NativeMatrixSdkFfi:: args[2]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[3]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[4]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34588,156 +36004,6 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelinediff( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - uniffi_matrix_sdk_ffi_fn_free_timelinediff( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return jsi::Value::undefined(); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); - - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); -} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -35613,6 +36879,54 @@ jsi::Value NativeMatrixSdkFfi:: vtableInstance)); return jsi::Value::undefined(); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener>:: + fromJs(rt, callInvoker, args[0]); + + std::lock_guard lock( + uniffi::matrix_sdk_ffi::registry::vtableMutex); + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + uniffi::matrix_sdk_ffi::registry::putTable( + "UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener", + vtableInstance)); + return jsi::Value::undefined(); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener>:: + fromJs(rt, callInvoker, args[0]); + + std::lock_guard lock( + uniffi::matrix_sdk_ffi::registry::vtableMutex); + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + uniffi::matrix_sdk_ffi::registry::putTable( + "UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener", + vtableInstance)); + return jsi::Value::undefined(); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener>:: + fromJs(rt, callInvoker, args[0]); + + std::lock_guard lock( + uniffi::matrix_sdk_ffi::registry::vtableMutex); + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + uniffi::matrix_sdk_ffi::registry::putTable( + "UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener", + vtableInstance)); + return jsi::Value::undefined(); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -36061,7 +37375,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( @@ -36070,7 +37385,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37011,6 +38328,15 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_client_encryption( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -37267,6 +38593,15 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_client_logout( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -37385,6 +38720,15 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_client_session( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -37469,6 +38813,14 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_space_service( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_client_space_service(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -37623,15 +38975,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38057,6 +39400,15 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38563,6 +39915,15 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_room_forget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38835,6 +40196,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_room_membership( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38950,24 +40319,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39008,6 +40359,15 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_name( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39761,6 +41121,76 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_enter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39801,6 +41231,15 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40147,78 +41586,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40741,6 +42108,33 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, diff --git a/cpp/generated/matrix_sdk_ffi.hpp b/cpp/generated/matrix_sdk_ffi.hpp index 31895ed..ce6c850 100644 --- a/cpp/generated/matrix_sdk_ffi.hpp +++ b/cpp/generated/matrix_sdk_ffi.hpp @@ -84,6 +84,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_encryption( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -188,6 +192,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_logout( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -232,6 +239,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_server( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_session( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -265,6 +275,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_space_service( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -337,10 +350,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -522,6 +531,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -797,6 +810,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_forget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -897,6 +913,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_membership( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -941,13 +960,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -963,6 +975,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_topic( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1358,6 +1373,45 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_spaceservice( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_span(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -1399,6 +1453,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_syncservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1553,39 +1610,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_timelinediff( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1800,6 +1824,18 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2187,6 +2223,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_encryption( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2293,6 +2333,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_logout( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2341,6 +2385,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_session( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2375,6 +2423,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_space_service( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2440,10 +2491,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2629,6 +2676,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2844,6 +2895,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_forget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2951,6 +3006,9 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_membership( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2996,14 +3054,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3019,6 +3069,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3342,6 +3396,36 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_span_enter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3358,6 +3442,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3498,33 +3586,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3748,6 +3809,18 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3873,6 +3946,12 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_internal_fn_method_span_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3895,9 +3974,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_internal_fn_method_timeline_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 29dfc28..d0c55df 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1800,63 +1800,63 @@ SPEC CHECKSUMS: fmt: 01b82d4ca6470831d1cc0852a1af644be019e8f6 glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a hermes-engine: 9e868dc7be781364296d6ee2f56d0c1a9ef0bb11 - RCT-Folly: ea9d9256ba7f9322ef911169a9f696e5857b9e17 + RCT-Folly: 7b4f73a92ad9571b9dbdb05bb30fad927fa971e1 RCTDeprecation: ebe712bb05077934b16c6bf25228bdec34b64f83 RCTRequired: ca91e5dd26b64f577b528044c962baf171c6b716 RCTTypeSafety: e7678bd60850ca5a41df9b8dc7154638cb66871f React: 4641770499c39f45d4e7cde1eba30e081f9d8a3d React-callinvoker: 4bef67b5c7f3f68db5929ab6a4d44b8a002998ea - React-Core: a68cea3e762814e60ecc3fa521c7f14c36c99245 - React-CoreModules: d81b1eaf8066add66299bab9d23c9f00c9484c7c - React-cxxreact: 984f8b1feeca37181d4e95301fcd6f5f6501c6ab + React-Core: 0a06707a0b34982efc4a556aff5dae4b22863455 + React-CoreModules: 907334e94314189c2e5eed4877f3efe7b26d85b0 + React-cxxreact: 3a1d5e8f4faa5e09be26614e9c8bbcae8d11b73d React-debug: 817160c07dc8d24d020fbd1eac7b3558ffc08964 - React-defaultsnativemodule: 18a684542f82ce1897552a1c4b847be414c9566e - React-domnativemodule: 90bdd4ec3ab38c47cfc3461c1e9283a8507d613f - React-Fabric: f6dade7007533daeb785ba5925039d83f343be4b - React-FabricComponents: b0655cc3e1b5ae12a4a1119aa7d8308f0ad33520 - React-FabricImage: 9b157c4c01ac2bf433f834f0e1e5fe234113a576 + React-defaultsnativemodule: 814830ccbc3fb08d67d0190e63b179ee4098c67b + React-domnativemodule: 270acf94bd0960b026bc3bfb327e703665d27fb4 + React-Fabric: 64586dc191fc1c170372a638b8e722e4f1d0a09b + React-FabricComponents: b0ebd032387468ea700574c581b139f57a7497fb + React-FabricImage: 81f0e0794caf25ad1224fa406d288fbc1986607f React-featureflags: f2792b067a351d86fdc7bec23db3b9a2f2c8d26c - React-featureflagsnativemodule: 742a8325b3c821d2a1ca13a6d2a0fc72d04555e0 - React-graphics: 68969e4e49d73f89da7abef4116c9b5f466aa121 - React-hermes: ac0bcba26a5d288ebc99b500e1097da2d0297ddf - React-idlecallbacksnativemodule: d61d9c9816131bf70d3d80cd04889fc625ee523f - React-ImageManager: e906eec93a9eb6102a06576b89d48d80a4683020 - React-jserrorhandler: ac5dde01104ff444e043cad8f574ca02756e20d6 - React-jsi: 496fa2b9d63b726aeb07d0ac800064617d71211d - React-jsiexecutor: dd22ab48371b80f37a0a30d0e8915b6d0f43a893 - React-jsinspector: 4629ac376f5765e684d19064f2093e55c97fd086 - React-jsitracing: 7a1c9cd484248870cf660733cd3b8114d54c035f - React-logger: c4052eb941cca9a097ef01b59543a656dc088559 - React-Mapbuffer: 33546a3ebefbccb8770c33a1f8a5554fa96a54de - React-microtasksnativemodule: d80ff86c8902872d397d9622f1a97aadcc12cead + React-featureflagsnativemodule: 0d7091ae344d6160c0557048e127897654a5c00f + React-graphics: cbebe910e4a15b65b0bff94a4d3ed278894d6386 + React-hermes: ec18c10f5a69d49fb9b5e17ae95494e9ea13d4d3 + React-idlecallbacksnativemodule: 6b84add48971da9c40403bd1860d4896462590f2 + React-ImageManager: f2a4c01c2ccb2193e60a20c135da74c7ca4d36f2 + React-jserrorhandler: 61d205b5a7cbc57fed3371dd7eed48c97f49fc64 + React-jsi: 95f7676103137861b79b0f319467627bcfa629ee + React-jsiexecutor: 41e0fe87cda9ea3970ffb872ef10f1ff8dbd1932 + React-jsinspector: 15578208796723e5c6f39069b6e8bf36863ef6e2 + React-jsitracing: 3758cdb155ea7711f0e77952572ea62d90c69f0b + React-logger: dbca7bdfd4aa5ef69431362bde6b36d49403cb20 + React-Mapbuffer: 6efad4a606c1fae7e4a93385ee096681ef0300dc + React-microtasksnativemodule: a645237a841d733861c70b69908ab4a1707b52ad React-nativeconfig: 8efdb1ef1e9158c77098a93085438f7e7b463678 - React-NativeModulesApple: cebca2e5320a3d66e123cade23bd90a167ffce5e - React-perflogger: 72e653eb3aba9122f9e57cf012d22d2486f33358 - React-performancetimeline: cd6a9374a72001165995d2ab632f672df04076dc + React-NativeModulesApple: 958d4f6c5c2ace4c0f427cf7ef82e28ae6538a22 + React-perflogger: 9b4f13c0afe56bc7b4a0e93ec74b1150421ee22d + React-performancetimeline: 359db1cb889aa0282fafc5838331b0987c4915a9 React-RCTActionSheet: aacf2375084dea6e7c221f4a727e579f732ff342 - React-RCTAnimation: 395ab53fd064dff81507c15efb781c8684d9a585 - React-RCTAppDelegate: 345a6f1b82abc578437df0ce7e9c48740eca827c - React-RCTBlob: 13311e554c1a367de063c10ee7c5e6573b2dd1d6 - React-RCTFabric: 007b1a98201cc49b5bc6e1417d7fe3f6fc6e2b78 - React-RCTImage: 1b1f914bcc12187c49ba5d949dac38c2eb9f5cc8 - React-RCTLinking: 4ac7c42beb65e36fba0376f3498f3cd8dd0be7fa - React-RCTNetwork: 938902773add4381e84426a7aa17a2414f5f94f7 - React-RCTSettings: e848f1ba17a7a18479cf5a31d28145f567da8223 - React-RCTText: 7e98fafdde7d29e888b80f0b35544e0cb07913cf - React-RCTVibration: cd7d80affd97dc7afa62f9acd491419558b64b78 + React-RCTAnimation: d8c82deebebe3aaf7a843affac1b57cb2dc073d4 + React-RCTAppDelegate: 1774aa421a29a41a704ecaf789811ef73c4634b6 + React-RCTBlob: 70a58c11a6a3500d1a12f2e51ca4f6c99babcff8 + React-RCTFabric: 731cda82aed592aacce2d32ead69d78cde5d9274 + React-RCTImage: 5e9d655ba6a790c31e3176016f9b47fd0978fbf0 + React-RCTLinking: 2a48338252805091f7521eaf92687206401bdf2a + React-RCTNetwork: 0c1282b377257f6b1c81934f72d8a1d0c010e4c3 + React-RCTSettings: f757b679a74e5962be64ea08d7865a7debd67b40 + React-RCTText: e7d20c490b407d3b4a2daa48db4bcd8ec1032af2 + React-RCTVibration: 8228e37144ca3122a91f1de16ba8e0707159cfec React-rendererconsistency: b4917053ecbaa91469c67a4319701c9dc0d40be6 - React-rendererdebug: aa181c36dd6cf5b35511d1ed875d6638fd38f0ec + React-rendererdebug: 81becbc8852b38d9b1b68672aa504556481330d5 React-rncore: 120d21715c9b4ba8f798bffe986cb769b988dd74 - React-RuntimeApple: d033becbbd1eba6f9f6e3af6f1893030ce203edd - React-RuntimeCore: 38af280bb678e66ba000a3c3d42920b2a138eebb + React-RuntimeApple: 52ed0e9e84a7c2607a901149fb13599a3c057655 + React-RuntimeCore: ca6189d2e53d86db826e2673fe8af6571b8be157 React-runtimeexecutor: 877596f82f5632d073e121cba2d2084b76a76899 - React-RuntimeHermes: 37aad735ff21ca6de2d8450a96de1afe9f86c385 - React-runtimescheduler: 8ec34cc885281a34696ea16c4fd86892d631f38d + React-RuntimeHermes: 3b752dc5d8a1661c9d1687391d6d96acfa385549 + React-runtimescheduler: 8321bb09175ace2a4f0b3e3834637eb85bf42ebe React-timing: 331cbf9f2668c67faddfd2e46bb7f41cbd9320b9 - React-utils: ed818f19ab445000d6b5c4efa9d462449326cc9f - ReactCodegen: f853a20cc9125c5521c8766b4b49375fec20648b - ReactCommon: 300d8d9c5cb1a6cd79a67cf5d8f91e4d477195f9 - ReactNativeMatrixSdk: 007802c07aa7807ee27f4f2aeb27a6ba56139591 + React-utils: 54df9ada708578c8ad40d92895d6fed03e0e8a9e + ReactCodegen: 21a52ccddc6479448fc91903a437dd23ddc7366c + ReactCommon: bfd3600989d79bc3acbe7704161b171a1480b9fd + ReactNativeMatrixSdk: 91ccd58722a74dc7fa6039b9c3b8f93782189896 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 uniffi-bindgen-react-native: 125eae9e3a0cf34bf8f3d4b0ceed517df7cc0733 Yoga: feb4910aba9742cfedc059e2b2902e22ffe9954a diff --git a/matrix-rust-sdk.patch b/matrix-rust-sdk.patch index 234eea6..6cd01e7 100644 --- a/matrix-rust-sdk.patch +++ b/matrix-rust-sdk.patch @@ -1,152 +1,8 @@ diff --git a/Cargo.lock b/Cargo.lock -index 0621c6ecd..f97adc83a 100644 +index 17625d434..451eb3d2d 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -16,18 +16,18 @@ dependencies = [ - - [[package]] - name = "addr2line" --version = "0.21.0" -+version = "0.24.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" - dependencies = [ - "gimli", - ] - - [[package]] --name = "adler" --version = "1.0.2" -+name = "adler2" -+version = "2.0.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - - [[package]] - name = "aead" -@@ -52,12 +52,12 @@ dependencies = [ - - [[package]] - name = "ahash" --version = "0.8.11" -+version = "0.8.12" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" - dependencies = [ - "cfg-if", -- "getrandom 0.2.15", -+ "getrandom 0.3.3", - "once_cell", - "version_check", - "zerocopy", -@@ -74,18 +74,18 @@ dependencies = [ - - [[package]] - name = "aligned-vec" --version = "0.6.1" -+version = "0.6.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7e0966165eaf052580bd70eb1b32cb3d6245774c0104d1b2793e9650bf83b52a" -+checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" - dependencies = [ - "equator", - ] - - [[package]] - name = "allocator-api2" --version = "0.2.18" -+version = "0.2.21" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - - [[package]] - name = "android-tzdata" -@@ -110,9 +110,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - - [[package]] - name = "anstream" --version = "0.6.14" -+version = "0.6.20" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -+checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" - dependencies = [ - "anstyle", - "anstyle-parse", -@@ -125,43 +125,44 @@ dependencies = [ - - [[package]] - name = "anstyle" --version = "1.0.7" -+version = "1.0.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" -+checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" - - [[package]] - name = "anstyle-parse" --version = "0.2.4" -+version = "0.2.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -+checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" - dependencies = [ - "utf8parse", - ] - - [[package]] - name = "anstyle-query" --version = "1.1.0" -+version = "1.1.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" -+checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" - dependencies = [ -- "windows-sys 0.52.0", -+ "windows-sys 0.60.2", - ] - - [[package]] - name = "anstyle-wincon" --version = "3.0.3" -+version = "3.0.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -+checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" - dependencies = [ - "anstyle", -- "windows-sys 0.52.0", -+ "once_cell_polyfill", -+ "windows-sys 0.60.2", - ] - - [[package]] - name = "anyhow" --version = "1.0.95" -+version = "1.0.99" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" -+checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" - - [[package]] - name = "anymap2" -@@ -191,9 +192,9 @@ checksum = "eae2ed21cd55021f05707a807a5fc85695dafb98832921f6cfa06db67ca5b869" - - [[package]] - name = "arrayref" --version = "0.3.8" -+version = "0.3.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" -+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - - [[package]] - name = "arrayvec" -@@ -212,43 +213,44 @@ checksum = "9dbc3a507a82b17ba0d98f6ce8fd6954ea0c8152e98009d36a40d8dcc8ce078a" +@@ -217,43 +217,44 @@ checksum = "9dbc3a507a82b17ba0d98f6ce8fd6954ea0c8152e98009d36a40d8dcc8ce078a" [[package]] name = "askama" @@ -179,7 +35,7 @@ index 0621c6ecd..f97adc83a 100644 + "memchr", "proc-macro2", "quote", -+ "rustc-hash", ++ "rustc-hash 2.0.0", "serde", + "serde_derive", "syn", @@ -203,4750 +59,258 @@ index 0621c6ecd..f97adc83a 100644 + "memchr", + "serde", + "serde_derive", -+ "winnow", ++ "winnow 0.7.13", ] [[package]] -@@ -281,9 +283,9 @@ checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002" - - [[package]] - name = "async-channel" --version = "2.3.1" -+version = "2.5.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" - dependencies = [ - "concurrent-queue", - "event-listener-strategy", -@@ -305,13 +307,13 @@ dependencies = [ +@@ -670,16 +671,16 @@ dependencies = [ [[package]] - name = "async-compression" --version = "0.4.12" -+version = "0.4.30" + name = "cargo_metadata" +-version = "0.15.4" ++version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" -+checksum = "977eb15ea9efd848bb8a4a1a2500347ed7f0bf794edf0dc3ddcf439f43d36b23" +-checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" ++checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ -- "flate2", -+ "compression-codecs", -+ "compression-core", - "futures-core", -- "memchr", - "pin-project-lite", - "tokio", + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", +- "thiserror 1.0.63", ++ "thiserror 2.0.16", ] -@@ -328,9 +330,9 @@ dependencies = [ - - [[package]] - name = "async-stream" --version = "0.3.5" -+version = "0.3.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -+checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" - dependencies = [ - "async-stream-impl", - "futures-core", -@@ -339,9 +341,9 @@ dependencies = [ - - [[package]] - name = "async-stream-impl" --version = "0.3.5" -+version = "0.3.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -+checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" - dependencies = [ - "proc-macro2", - "quote", -@@ -350,9 +352,9 @@ dependencies = [ - - [[package]] - name = "async-trait" --version = "0.1.85" -+version = "0.1.89" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" -+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" - dependencies = [ - "proc-macro2", - "quote", -@@ -361,9 +363,12 @@ dependencies = [ [[package]] - name = "async_cell" --version = "0.2.2" -+version = "0.2.3" +@@ -3650,16 +3651,6 @@ version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "834eee9ce518130a3b4d5af09ecc43e9d6b57ee76613f227a1ddd6b77c7a62bc" -+checksum = "447ab28afbb345f5408b120702a44e5529ebf90b1796ec76e9528df8e288e6c2" -+dependencies = [ -+ "loom", -+] - - [[package]] - name = "atomic-waker" -@@ -373,15 +378,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + checksum = "cbf6f36070878c42c5233846cd3de24cf9016828fd47bc22957a687298bb21fc" +-[[package]] +-name = "mime_guess" +-version = "2.0.5" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +-dependencies = [ +- "mime", +- "unicase", +-] +- [[package]] - name = "autocfg" --version = "1.3.0" -+version = "1.5.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + name = "minicov" + version = "0.3.7" +@@ -6073,7 +6064,7 @@ dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", +- "winnow", ++ "winnow 0.6.20", + ] [[package]] - name = "axum" --version = "0.8.1" -+version = "0.8.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" -+checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" - dependencies = [ - "axum-core", - "bytes", -@@ -413,12 +418,12 @@ dependencies = [ +@@ -6339,17 +6330,19 @@ checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] - name = "axum-core" --version = "0.5.0" -+version = "0.5.2" + name = "uniffi" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" -+checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" +-checksum = "f31bff6daf87277a9014bcdefbc2842b0553392919d1096843c5aad899ca4588" ++checksum = "c6d968cb62160c11f2573e6be724ef8b1b18a277aededd17033f8a912d73e2b4" dependencies = [ - "bytes", -- "futures-util", -+ "futures-core", - "http", - "http-body", - "http-body-util", -@@ -433,9 +438,9 @@ dependencies = [ + "anyhow", + "camino", ++ "cargo_metadata", + "clap", + "uniffi_bindgen", + "uniffi_build", + "uniffi_core", + "uniffi_macros", ++ "uniffi_pipeline", + ] [[package]] - name = "backon" --version = "1.5.0" -+version = "1.5.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fd0b50b1b78dbadd44ab18b3c794e496f3a139abb9fbc27d9c94c4eebbb96496" -+checksum = "592277618714fbcecda9a02ba7a8781f319d26532a88553bbacc77ba5d2b3a8d" - dependencies = [ - "fastrand", - "gloo-timers", -@@ -444,17 +449,17 @@ dependencies = [ +@@ -6361,9 +6354,9 @@ dependencies = [ [[package]] - name = "backtrace" --version = "0.3.71" -+version = "0.3.75" + name = "uniffi_bindgen" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -+checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +-checksum = "96061d7e01b185aa405f7c9b134741ab3e50cc6796a47d6fd8ab9a5364b5feed" ++checksum = "f6b39ef1acbe1467d5d210f274fae344cb6f8766339330cb4c9688752899bf6b" dependencies = [ - "addr2line", -- "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -+ "windows-targets 0.52.6", + "anyhow", + "askama", +@@ -6373,60 +6366,61 @@ dependencies = [ + "glob", + "goblin", + "heck", ++ "indexmap", + "once_cell", +- "paste", + "serde", ++ "tempfile", + "textwrap", + "toml 0.5.11", ++ "uniffi_internal_macros", + "uniffi_meta", +- "uniffi_testing", ++ "uniffi_pipeline", + "uniffi_udl", ] [[package]] -@@ -465,15 +470,15 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - - [[package]] - name = "base64ct" --version = "1.6.0" -+version = "1.8.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -+checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" - - [[package]] - name = "basic-toml" --version = "0.1.9" -+version = "0.1.10" + name = "uniffi_build" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" -+checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +-checksum = "9d6b86f9b221046af0c533eafe09ece04e2f1ded04ccdc9bba0ec09aec1c52bd" ++checksum = "6683e6b665423cddeacd89a3f97312cf400b2fb245a26f197adaf65c45d505b2" dependencies = [ - "serde", - ] -@@ -498,15 +503,6 @@ dependencies = [ - "wiremock", + "anyhow", + "camino", + "uniffi_bindgen", ] -[[package]] --name = "bincode" --version = "1.3.3" +-name = "uniffi_checksum_derive" +-version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +-checksum = "802d2051a700e3ec894c79f80d2705b69d85844dafbbe5d1a92776f8f48b563a" -dependencies = [ -- "serde", +- "quote", +- "syn", -] - [[package]] - name = "bitflags" - version = "1.3.2" -@@ -515,9 +511,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - - [[package]] - name = "bitflags" --version = "2.8.0" -+version = "2.9.3" + name = "uniffi_core" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" -+checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" +-checksum = "3210d57d6ab6065ab47a2898dacdb7c606fd6a4156196831fa3bf82e34ac58a6" ++checksum = "c2d990b553d6b9a7ee9c3ae71134674739913d52350b56152b0e613595bb5a6f" dependencies = [ - "serde", + "anyhow", + "async-compat", + "bytes", +- "camino", +- "log", + "once_cell", +- "paste", + "static_assertions", ] -@@ -570,26 +566,26 @@ dependencies = [ ++[[package]] ++name = "uniffi_internal_macros" ++version = "0.29.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "04f4f224becf14885c10e6e400b95cc4d1985738140cb194ccc2044563f8a56b" ++dependencies = [ ++ "anyhow", ++ "indexmap", ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ [[package]] - name = "bstr" --version = "1.9.1" -+version = "1.12.0" + name = "uniffi_macros" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" -+checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +-checksum = "b58691741080935437dc862122e68d7414432a11824ac1137868de46181a0bd2" ++checksum = "b481d385af334871d70904e6a5f129be7cd38c18fcf8dd8fd1f646b426a56d58" dependencies = [ - "memchr", -- "regex-automata 0.4.8", -+ "regex-automata 0.4.10", - "serde", - ] - - [[package]] - name = "bumpalo" --version = "3.16.0" -+version = "3.19.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -+checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - - [[package]] - name = "bytemuck" --version = "1.16.3" -+version = "1.23.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" -+checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" - - [[package]] - name = "byteorder" -@@ -605,9 +601,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - - [[package]] - name = "bytes" --version = "1.9.0" -+version = "1.10.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - - [[package]] - name = "bytesize" -@@ -617,34 +613,34 @@ checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" +- "bincode", + "camino", + "fs-err", + "once_cell", +@@ -6440,39 +6434,38 @@ dependencies = [ [[package]] - name = "camino" --version = "1.1.7" -+version = "1.1.12" + name = "uniffi_meta" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" -+checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" +-checksum = "7663eacdbd9fbf4a88907ddcfe2e6fa85838eb6dc2418a7d91eebb3786f8e20b" ++checksum = "10f817868a3b171bb7bf259e882138d104deafde65684689b4694c846d322491" dependencies = [ - "serde", + "anyhow", +- "bytes", + "siphasher 0.3.11", +- "uniffi_checksum_derive", ++ "uniffi_internal_macros", ++ "uniffi_pipeline", ] [[package]] - name = "cargo-platform" --version = "0.1.8" -+version = "0.1.9" +-name = "uniffi_testing" +-version = "0.28.0" ++name = "uniffi_pipeline" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +-checksum = "f922465f7566f25f8fe766920205fdfa9a3fcdc209c6bfb7557f0b5bf45b04dd" ++checksum = "4b147e133ad7824e32426b90bc41fda584363563f2ba747f590eca1fd6fd14e6" dependencies = [ - "serde", + "anyhow", +- "camino", +- "cargo_metadata", +- "fs-err", +- "once_cell", ++ "heck", ++ "indexmap", ++ "tempfile", ++ "uniffi_internal_macros", ] [[package]] - name = "cargo_metadata" --version = "0.15.4" -+version = "0.19.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" -+checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" - dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", -- "thiserror 1.0.63", -+ "thiserror 2.0.16", - ] - - [[package]] -@@ -661,9 +657,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - - [[package]] - name = "castaway" --version = "0.2.3" -+version = "0.2.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" -+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" - dependencies = [ - "rustversion", - ] -@@ -679,18 +675,25 @@ dependencies = [ - - [[package]] - name = "cc" --version = "1.2.22" -+version = "1.2.35" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" -+checksum = "590f9024a68a8c40351881787f1934dc11afd69090f5edb6831464694d836ea3" - dependencies = [ -+ "find-msvc-tools", - "shlex", - ] - - [[package]] - name = "cfg-if" --version = "1.0.0" -+version = "1.0.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -+checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" -+ -+[[package]] -+name = "cfg_aliases" -+version = "0.2.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - - [[package]] - name = "chacha20" -@@ -718,9 +721,9 @@ dependencies = [ - - [[package]] - name = "chrono" --version = "0.4.39" -+version = "0.4.41" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" -+checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" - dependencies = [ - "android-tzdata", - "iana-time-zone", -@@ -728,7 +731,7 @@ dependencies = [ - "num-traits", - "serde", - "wasm-bindgen", -- "windows-targets 0.52.6", -+ "windows-link", - ] - - [[package]] -@@ -771,9 +774,9 @@ dependencies = [ - - [[package]] - name = "clap" --version = "4.5.9" -+version = "4.5.46" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" -+checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57" - dependencies = [ - "clap_builder", - "clap_derive", -@@ -781,9 +784,9 @@ dependencies = [ - - [[package]] - name = "clap_builder" --version = "4.5.9" -+version = "4.5.46" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" -+checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41" - dependencies = [ - "anstream", - "anstyle", -@@ -793,9 +796,9 @@ dependencies = [ - - [[package]] - name = "clap_derive" --version = "4.5.8" -+version = "4.5.45" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" -+checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" - dependencies = [ - "heck", - "proc-macro2", -@@ -805,15 +808,15 @@ dependencies = [ - - [[package]] - name = "clap_lex" --version = "0.7.1" -+version = "0.7.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" -+checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" - - [[package]] - name = "color-eyre" --version = "0.6.3" -+version = "0.6.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" -+checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" - dependencies = [ - "backtrace", - "color-spantrace", -@@ -826,9 +829,9 @@ dependencies = [ - - [[package]] - name = "color-spantrace" --version = "0.2.1" -+version = "0.3.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -+checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" - dependencies = [ - "once_cell", - "owo-colors", -@@ -838,9 +841,9 @@ dependencies = [ - - [[package]] - name = "colorchoice" --version = "1.0.1" -+version = "1.0.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" -+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - - [[package]] - name = "compact_str" -@@ -856,6 +859,23 @@ dependencies = [ - "static_assertions", - ] - -+[[package]] -+name = "compression-codecs" -+version = "0.4.30" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "485abf41ac0c8047c07c87c72c8fb3eb5197f6e9d7ded615dfd1a00ae00a0f64" -+dependencies = [ -+ "compression-core", -+ "flate2", -+ "memchr", -+] -+ -+[[package]] -+name = "compression-core" -+version = "0.4.29" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" -+ - [[package]] - name = "concurrent-queue" - version = "2.5.0" -@@ -867,14 +887,14 @@ dependencies = [ - - [[package]] - name = "console" --version = "0.15.8" -+version = "0.15.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -+checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" - dependencies = [ - "encode_unicode", -- "lazy_static", - "libc", -- "windows-sys 0.52.0", -+ "once_cell", -+ "windows-sys 0.59.0", - ] - - [[package]] -@@ -916,33 +936,33 @@ dependencies = [ - - [[package]] - name = "core-foundation-sys" --version = "0.8.6" -+version = "0.8.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - - [[package]] - name = "cpp_demangle" --version = "0.4.3" -+version = "0.4.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" -+checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d" - dependencies = [ - "cfg-if", - ] - - [[package]] - name = "cpufeatures" --version = "0.2.12" -+version = "0.2.17" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" - dependencies = [ - "libc", - ] - - [[package]] - name = "crc32fast" --version = "1.4.2" -+version = "1.5.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" - dependencies = [ - "cfg-if", - ] -@@ -996,9 +1016,9 @@ dependencies = [ - - [[package]] - name = "crossbeam-deque" --version = "0.8.5" -+version = "0.8.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" - dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -@@ -1015,9 +1035,9 @@ dependencies = [ - - [[package]] - name = "crossbeam-utils" --version = "0.8.20" -+version = "0.8.21" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - - [[package]] - name = "crossterm" -@@ -1025,11 +1045,11 @@ version = "0.28.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "crossterm_winapi", - "mio", - "parking_lot", -- "rustix", -+ "rustix 0.38.44", - "signal-hook", - "signal-hook-mio", - "winapi", -@@ -1046,9 +1066,9 @@ dependencies = [ - - [[package]] - name = "crunchy" --version = "0.2.2" -+version = "0.2.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - - [[package]] - name = "crypto-common" -@@ -1110,9 +1130,9 @@ dependencies = [ - - [[package]] - name = "darling" --version = "0.20.10" -+version = "0.20.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" - dependencies = [ - "darling_core", - "darling_macro", -@@ -1120,9 +1140,9 @@ dependencies = [ - - [[package]] - name = "darling_core" --version = "0.20.10" -+version = "0.20.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" - dependencies = [ - "fnv", - "ident_case", -@@ -1134,9 +1154,9 @@ dependencies = [ - - [[package]] - name = "darling_macro" --version = "0.20.10" -+version = "0.20.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" - dependencies = [ - "darling_core", - "quote", -@@ -1151,21 +1171,9 @@ checksum = "0c03c416ed1a30fbb027ef484ba6ab6f80e1eada675e1a2b92fd673c045a1f1d" - - [[package]] - name = "deadpool" --version = "0.10.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" --dependencies = [ -- "async-trait", -- "deadpool-runtime", -- "num_cpus", -- "tokio", --] -- --[[package]] --name = "deadpool" --version = "0.12.1" -+version = "0.12.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" -+checksum = "5ed5957ff93768adf7a65ab167a17835c3d2c3c50d084fe305174c112f468e2f" - dependencies = [ - "deadpool-runtime", - "num_cpus", -@@ -1187,7 +1195,7 @@ version = "0.11.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "9e531d0beb6d12daa84df0482bf89e06c7ed059551ae1d7313dc7531d37778fb" - dependencies = [ -- "deadpool 0.12.1", -+ "deadpool", - "deadpool-sync", - "rusqlite", - ] -@@ -1213,9 +1221,9 @@ dependencies = [ - - [[package]] - name = "decancer" --version = "3.3.0" -+version = "3.3.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d59c633be7ba6fcf3c153e11d647990e4e4bd463a4d5834ba0a45caa96da6baf" -+checksum = "a9244323129647178bf41ac861a2cdb9d9c81b9b09d3d0d1de9cd302b33b8a1d" - dependencies = [ - "lazy_static", - "regex", -@@ -1235,9 +1243,9 @@ dependencies = [ - - [[package]] - name = "der" --version = "0.7.9" -+version = "0.7.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -+checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" - dependencies = [ - "const-oid", - "zeroize", -@@ -1245,9 +1253,9 @@ dependencies = [ - - [[package]] - name = "deranged" --version = "0.3.11" -+version = "0.5.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -+checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" - dependencies = [ - "powerfmt", - ] -@@ -1318,7 +1326,7 @@ dependencies = [ - "libc", - "option-ext", - "redox_users", -- "windows-sys 0.59.0", -+ "windows-sys 0.60.2", - ] - - [[package]] -@@ -1345,9 +1353,9 @@ dependencies = [ - - [[package]] - name = "ed25519-dalek" --version = "2.1.1" -+version = "2.2.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -+checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" - dependencies = [ - "curve25519-dalek", - "ed25519", -@@ -1360,9 +1368,9 @@ dependencies = [ - - [[package]] - name = "either" --version = "1.13.0" -+version = "1.15.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - - [[package]] - name = "emojis" -@@ -1375,24 +1383,24 @@ dependencies = [ - - [[package]] - name = "encode_unicode" --version = "0.3.6" -+version = "1.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" -+checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - - [[package]] - name = "equator" --version = "0.2.2" -+version = "0.4.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea" -+checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" - dependencies = [ - "equator-macro", - ] - - [[package]] - name = "equator-macro" --version = "0.2.1" -+version = "0.4.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc" -+checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" - dependencies = [ - "proc-macro2", - "quote", -@@ -1401,25 +1409,25 @@ dependencies = [ - - [[package]] - name = "equivalent" --version = "1.0.1" -+version = "1.0.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - - [[package]] - name = "errno" --version = "0.3.9" -+version = "0.3.13" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -+checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" - dependencies = [ - "libc", -- "windows-sys 0.52.0", -+ "windows-sys 0.60.2", - ] - - [[package]] - name = "event-listener" --version = "5.4.0" -+version = "5.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" -+checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" - dependencies = [ - "concurrent-queue", - "parking", -@@ -1428,9 +1436,9 @@ dependencies = [ - - [[package]] - name = "event-listener-strategy" --version = "0.5.2" -+version = "0.5.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" - dependencies = [ - "event-listener", - "pin-project-lite", -@@ -1557,7 +1565,7 @@ dependencies = [ - "futures-util", - "matrix-sdk", - "matrix-sdk-ui", -- "rand", -+ "rand 0.8.5", - "serde", - "serde_json", - "tokio", -@@ -1572,7 +1580,7 @@ dependencies = [ - "anyhow", - "dirs", - "matrix-sdk", -- "rand", -+ "rand 0.8.5", - "serde", - "serde_json", - "tokio", -@@ -1705,9 +1713,9 @@ dependencies = [ - - [[package]] - name = "fastrand" --version = "2.2.0" -+version = "2.3.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" -+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - - [[package]] - name = "fiat-crypto" -@@ -1715,6 +1723,12 @@ version = "0.2.9" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -+[[package]] -+name = "find-msvc-tools" -+version = "0.1.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "e178e4fba8a2726903f6ba98a6d221e76f9c12c650d5dc0e6afdc50677b49650" -+ - [[package]] - name = "findshlibs" - version = "0.10.2" -@@ -1729,9 +1743,9 @@ dependencies = [ - - [[package]] - name = "flate2" --version = "1.0.30" -+version = "1.1.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -+checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" - dependencies = [ - "crc32fast", - "miniz_oxide", -@@ -1766,9 +1780,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - - [[package]] - name = "form_urlencoded" --version = "1.2.1" -+version = "1.2.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" - dependencies = [ - "percent-encoding", - ] -@@ -1800,9 +1814,9 @@ dependencies = [ - - [[package]] - name = "futures" --version = "0.3.30" -+version = "0.3.31" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -+checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" - dependencies = [ - "futures-channel", - "futures-core", -@@ -1896,6 +1910,20 @@ dependencies = [ - "thread_local", - ] - -+[[package]] -+name = "generator" -+version = "0.8.7" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" -+dependencies = [ -+ "cc", -+ "cfg-if", -+ "libc", -+ "log", -+ "rustversion", -+ "windows", -+] -+ - [[package]] - name = "generic-array" - version = "0.14.7" -@@ -1908,40 +1936,42 @@ dependencies = [ - - [[package]] - name = "getrandom" --version = "0.2.15" -+version = "0.2.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -+checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" - dependencies = [ - "cfg-if", - "js-sys", - "libc", -- "wasi 0.11.0+wasi-snapshot-preview1", -+ "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", - ] - - [[package]] - name = "getrandom" --version = "0.3.1" -+version = "0.3.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" -+checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" - dependencies = [ - "cfg-if", -+ "js-sys", - "libc", -- "wasi 0.13.3+wasi-0.2.2", -- "windows-targets 0.52.6", -+ "r-efi", -+ "wasi 0.14.3+wasi-0.2.4", -+ "wasm-bindgen", - ] - - [[package]] - name = "gimli" --version = "0.28.1" -+version = "0.31.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - - [[package]] - name = "glob" --version = "0.3.2" -+version = "0.3.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" -+checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - - [[package]] - name = "gloo-timers" -@@ -1993,9 +2023,9 @@ dependencies = [ - - [[package]] - name = "h2" --version = "0.4.5" -+version = "0.4.12" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -+checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" - dependencies = [ - "atomic-waker", - "bytes", -@@ -2012,9 +2042,9 @@ dependencies = [ - - [[package]] - name = "half" --version = "2.4.1" -+version = "2.6.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -+checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" - dependencies = [ - "cfg-if", - "crunchy", -@@ -2022,20 +2052,12 @@ dependencies = [ - - [[package]] - name = "hashbrown" --version = "0.14.5" -+version = "0.15.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" - dependencies = [ -- "ahash", - "allocator-api2", --] -- --[[package]] --name = "hashbrown" --version = "0.15.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" --dependencies = [ -+ "equivalent", - "foldhash", - ] - -@@ -2045,7 +2067,7 @@ version = "0.10.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" - dependencies = [ -- "hashbrown 0.15.2", -+ "hashbrown", - ] - - [[package]] -@@ -2056,9 +2078,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - - [[package]] - name = "hermit-abi" --version = "0.3.9" -+version = "0.5.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - - [[package]] - name = "hex" -@@ -2097,23 +2119,21 @@ dependencies = [ - - [[package]] - name = "html5ever" --version = "0.29.0" -+version = "0.29.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2e15626aaf9c351bc696217cbe29cb9b5e86c43f8a46b5e2f5c6c5cf7cb904ce" -+checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" - dependencies = [ - "log", - "mac", - "markup5ever", -- "proc-macro2", -- "quote", -- "syn", -+ "match_token", - ] - - [[package]] - name = "http" --version = "1.2.0" -+version = "1.3.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" -+checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" - dependencies = [ - "bytes", - "fnv", -@@ -2132,12 +2152,12 @@ dependencies = [ - - [[package]] - name = "http-body-util" --version = "0.1.2" -+version = "0.1.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" - dependencies = [ - "bytes", -- "futures-util", -+ "futures-core", - "http", - "http-body", - "pin-project-lite", -@@ -2145,9 +2165,9 @@ dependencies = [ - - [[package]] - name = "httparse" --version = "1.9.4" -+version = "1.10.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" -+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - - [[package]] - name = "httpdate" -@@ -2157,13 +2177,14 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - - [[package]] - name = "hyper" --version = "1.4.1" -+version = "1.7.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -+checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" - dependencies = [ -+ "atomic-waker", - "bytes", - "futures-channel", -- "futures-util", -+ "futures-core", - "h2", - "http", - "http-body", -@@ -2171,6 +2192,7 @@ dependencies = [ - "httpdate", - "itoa", - "pin-project-lite", -+ "pin-utils", - "smallvec", - "tokio", - "want", -@@ -2178,11 +2200,10 @@ dependencies = [ - - [[package]] - name = "hyper-rustls" --version = "0.27.2" -+version = "0.27.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" -+checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" - dependencies = [ -- "futures-util", - "http", - "hyper", - "hyper-util", -@@ -2191,7 +2212,7 @@ dependencies = [ - "tokio", - "tokio-rustls", - "tower-service", -- "webpki-roots", -+ "webpki-roots 1.0.2", - ] - - [[package]] -@@ -2212,16 +2233,21 @@ dependencies = [ - - [[package]] - name = "hyper-util" --version = "0.1.10" -+version = "0.1.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -+checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" - dependencies = [ -+ "base64", - "bytes", - "futures-channel", -+ "futures-core", - "futures-util", - "http", - "http-body", - "hyper", -+ "ipnet", -+ "libc", -+ "percent-encoding", - "pin-project-lite", - "socket2", - "tokio", -@@ -2231,14 +2257,15 @@ dependencies = [ - - [[package]] - name = "iana-time-zone" --version = "0.1.60" -+version = "0.1.63" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -+checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" - dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", -+ "log", - "wasm-bindgen", - "windows-core", - ] -@@ -2254,21 +2281,22 @@ dependencies = [ - - [[package]] - name = "icu_collections" --version = "1.5.0" -+version = "2.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -+checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" - dependencies = [ - "displaydoc", -+ "potential_utf", - "yoke", - "zerofrom", - "zerovec", - ] - - [[package]] --name = "icu_locid" --version = "1.5.0" -+name = "icu_locale_core" -+version = "2.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -+checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" - dependencies = [ - "displaydoc", - "litemap", -@@ -2277,31 +2305,11 @@ dependencies = [ - "zerovec", - ] - --[[package]] --name = "icu_locid_transform" --version = "1.5.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" --dependencies = [ -- "displaydoc", -- "icu_locid", -- "icu_locid_transform_data", -- "icu_provider", -- "tinystr", -- "zerovec", --] -- --[[package]] --name = "icu_locid_transform_data" --version = "1.5.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" -- - [[package]] - name = "icu_normalizer" --version = "1.5.0" -+version = "2.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -+checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" - dependencies = [ - "displaydoc", - "icu_collections", -@@ -2309,67 +2317,54 @@ dependencies = [ - "icu_properties", - "icu_provider", - "smallvec", -- "utf16_iter", -- "utf8_iter", -- "write16", - "zerovec", - ] - - [[package]] - name = "icu_normalizer_data" --version = "1.5.0" -+version = "2.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" -+checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - - [[package]] - name = "icu_properties" --version = "1.5.1" -+version = "2.0.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -+checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" - dependencies = [ - "displaydoc", - "icu_collections", -- "icu_locid_transform", -+ "icu_locale_core", - "icu_properties_data", - "icu_provider", -- "tinystr", -+ "potential_utf", -+ "zerotrie", - "zerovec", - ] - - [[package]] - name = "icu_properties_data" --version = "1.5.0" -+version = "2.0.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" -+checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - - [[package]] - name = "icu_provider" --version = "1.5.0" -+version = "2.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -+checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" - dependencies = [ - "displaydoc", -- "icu_locid", -- "icu_provider_macros", -+ "icu_locale_core", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", -+ "zerotrie", - "zerovec", - ] - --[[package]] --name = "icu_provider_macros" --version = "1.5.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" --dependencies = [ -- "proc-macro2", -- "quote", -- "syn", --] -- - [[package]] - name = "ident_case" - version = "1.0.1" -@@ -2378,9 +2373,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - - [[package]] - name = "idna" --version = "1.0.3" -+version = "1.1.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" - dependencies = [ - "idna_adapter", - "smallvec", -@@ -2389,9 +2384,9 @@ dependencies = [ - - [[package]] - name = "idna_adapter" --version = "1.2.0" -+version = "1.2.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -+checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" - dependencies = [ - "icu_normalizer", - "icu_properties", -@@ -2399,12 +2394,13 @@ dependencies = [ - - [[package]] - name = "image" --version = "0.25.5" -+version = "0.25.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" -+checksum = "1c6a3ce16143778e24df6f95365f12ed105425b22abefd289dd88a64bab59605" - dependencies = [ - "bytemuck", - "byteorder-lite", -+ "moxcms", - "num-traits", - ] - -@@ -2453,9 +2449,9 @@ dependencies = [ - - [[package]] - name = "indenter" --version = "0.3.3" -+version = "0.3.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -+checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" - - [[package]] - name = "indexed_db_futures" -@@ -2476,26 +2472,26 @@ dependencies = [ - - [[package]] - name = "indexmap" --version = "2.7.1" -+version = "2.11.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" -+checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" - dependencies = [ - "equivalent", -- "hashbrown 0.15.2", -+ "hashbrown", - "serde", - ] - - [[package]] - name = "indoc" --version = "2.0.5" -+version = "2.0.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -+checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" - - [[package]] - name = "inferno" --version = "0.11.20" -+version = "0.11.21" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7c77a3ae7d4761b9c64d2c030f70746ceb8cfba32dce0325a56792e0a4816c31" -+checksum = "232929e1d75fe899576a3d5c7416ad0d88dbfbb3c3d6aa00873a7408a50ddb88" - dependencies = [ - "ahash", - "indexmap", -@@ -2504,16 +2500,16 @@ dependencies = [ - "log", - "num-format", - "once_cell", -- "quick-xml", -+ "quick-xml 0.26.0", - "rgb", - "str_stack", - ] - - [[package]] - name = "inout" --version = "0.1.3" -+version = "0.1.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" - dependencies = [ - "block-padding", - "generic-array", -@@ -2521,25 +2517,23 @@ dependencies = [ - - [[package]] - name = "insta" --version = "1.42.1" -+version = "1.43.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "71c1b125e30d93896b365e156c33dadfffab45ee8400afcbba4752f59de08a86" -+checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371" - dependencies = [ - "console", -- "linked-hash-map", - "once_cell", - "pest", - "pest_derive", -- "pin-project", - "serde", - "similar", - ] - - [[package]] - name = "instability" --version = "0.3.7" -+version = "0.3.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d" -+checksum = "435d80800b936787d62688c927b6490e887c7ef5ff9ce922c6c6050fca75eb9a" - dependencies = [ - "darling", - "indoc", -@@ -2549,27 +2543,48 @@ dependencies = [ - ] - - [[package]] --name = "ipnet" --version = "2.9.0" -+name = "io-uring" -+version = "0.7.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -- -+checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -+dependencies = [ -+ "bitflags 2.9.3", -+ "cfg-if", -+ "libc", -+] -+ -+[[package]] -+name = "ipnet" -+version = "2.11.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -+ -+[[package]] -+name = "iri-string" -+version = "0.7.8" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" -+dependencies = [ -+ "memchr", -+ "serde", -+] -+ - [[package]] - name = "is-terminal" --version = "0.4.12" -+version = "0.4.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -+checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" - dependencies = [ - "hermit-abi", - "libc", -- "windows-sys 0.52.0", -+ "windows-sys 0.59.0", - ] - - [[package]] - name = "is_terminal_polyfill" --version = "1.70.0" -+version = "1.70.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" -+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - - [[package]] - name = "itertools" -@@ -2600,9 +2615,9 @@ dependencies = [ - - [[package]] - name = "itoa" --version = "1.0.11" -+version = "1.0.15" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - - [[package]] - name = "jni-sys" -@@ -2651,9 +2666,9 @@ dependencies = [ - - [[package]] - name = "konst" --version = "0.3.9" -+version = "0.3.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" -+checksum = "4381b9b00c55f251f2ebe9473aef7c117e96828def1a7cb3bd3f0f903c6894e9" - dependencies = [ - "const_panic", - "konst_kernel", -@@ -2662,9 +2677,9 @@ dependencies = [ - - [[package]] - name = "konst_kernel" --version = "0.3.9" -+version = "0.3.15" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" -+checksum = "e4b1eb7788f3824c629b1116a7a9060d6e898c358ebff59070093d51103dcc3c" - dependencies = [ - "typewit", - ] -@@ -2683,17 +2698,17 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - - [[package]] - name = "libc" --version = "0.2.169" -+version = "0.2.175" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" -+checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" - - [[package]] - name = "libredox" --version = "0.1.3" -+version = "0.1.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -+checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "libc", - ] - -@@ -2709,28 +2724,28 @@ dependencies = [ - ] - - [[package]] --name = "linked-hash-map" --version = "0.5.6" -+name = "linux-raw-sys" -+version = "0.4.15" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - - [[package]] - name = "linux-raw-sys" --version = "0.4.14" -+version = "0.9.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -+checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - - [[package]] - name = "litemap" --version = "0.7.4" -+version = "0.8.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" -+checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - - [[package]] - name = "lock_api" --version = "0.4.12" -+version = "0.4.13" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -+checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" - dependencies = [ - "autocfg", - "scopeguard", -@@ -2738,9 +2753,9 @@ dependencies = [ - - [[package]] - name = "log" --version = "0.4.22" -+version = "0.4.27" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - - [[package]] - name = "log-panics" -@@ -2752,15 +2767,34 @@ dependencies = [ - "log", - ] - -+[[package]] -+name = "loom" -+version = "0.7.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" -+dependencies = [ -+ "cfg-if", -+ "generator", -+ "scoped-tls", -+ "tracing", -+ "tracing-subscriber", -+] -+ - [[package]] - name = "lru" --version = "0.12.3" -+version = "0.12.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" -+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" - dependencies = [ -- "hashbrown 0.14.5", -+ "hashbrown", - ] - -+[[package]] -+name = "lru-slab" -+version = "0.1.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" -+ - [[package]] - name = "mac" - version = "0.1.1" -@@ -2822,9 +2856,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - - [[package]] - name = "markup5ever" --version = "0.14.0" -+version = "0.14.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "82c88c6129bd24319e62a0359cb6b958fa7e8be6e19bb1663bc396b90883aca5" -+checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" - dependencies = [ - "log", - "phf", -@@ -2834,6 +2868,17 @@ dependencies = [ - "tendril", - ] - -+[[package]] -+name = "match_token" -+version = "0.1.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" -+dependencies = [ -+ "proc-macro2", -+ "quote", -+ "syn", -+] -+ - [[package]] - name = "matchers" - version = "0.1.0" -@@ -2856,7 +2901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "4e2551de3bba2cc65b52dc6b268df6114011fe118ac24870fbcf1b35537bd721" - dependencies = [ - "matrix-pickle-derive", -- "thiserror 1.0.63", -+ "thiserror 1.0.69", - ] - - [[package]] -@@ -2919,7 +2964,7 @@ dependencies = [ - "percent-encoding", - "pin-project-lite", - "proptest", -- "rand", -+ "rand 0.8.5", - "reqwest", - "ruma", - "serde", -@@ -2930,7 +2975,7 @@ dependencies = [ - "similar-asserts", - "stream_assert", - "tempfile", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tokio-stream", - "tokio-test", -@@ -2958,7 +3003,7 @@ dependencies = [ - "assert_matches2", - "assign", - "async-trait", -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "decancer", - "eyeball", - "eyeball-im", -@@ -2977,7 +3022,7 @@ dependencies = [ - "serde_json", - "similar-asserts", - "stream_assert", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing", - "unicode-normalization", -@@ -2995,7 +3040,7 @@ dependencies = [ - "futures-core", - "futures-executor", - "futures-util", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "gloo-timers", - "imbl", - "insta", -@@ -3005,7 +3050,7 @@ dependencies = [ - "ruma", - "serde", - "serde_json", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing", - "tracing-subscriber", -@@ -3047,7 +3092,7 @@ dependencies = [ - "matrix-sdk-test", - "pbkdf2", - "proptest", -- "rand", -+ "rand 0.8.5", - "rmp-serde", - "ruma", - "serde", -@@ -3056,7 +3101,7 @@ dependencies = [ - "similar-asserts", - "stream_assert", - "subtle", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "time", - "tokio", - "tokio-stream", -@@ -3083,13 +3128,13 @@ dependencies = [ - "matrix-sdk-ffi-macros", - "matrix-sdk-sqlite", - "pbkdf2", -- "rand", -+ "rand 0.8.5", - "ruma", - "serde", - "serde_json", - "sha2", - "tempfile", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing-subscriber", - "uniffi", -@@ -3123,7 +3168,7 @@ dependencies = [ - "sentry-tracing", - "serde", - "serde_json", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing", - "tracing-appender", -@@ -3154,7 +3199,7 @@ dependencies = [ - "assert_matches2", - "async-trait", - "base64", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "gloo-utils", - "growable-bloom-filter", - "hkdf", -@@ -3165,13 +3210,13 @@ dependencies = [ - "matrix-sdk-crypto", - "matrix-sdk-store-encryption", - "matrix-sdk-test", -- "rand", -+ "rand 0.8.5", - "ruma", - "serde", - "serde-wasm-bindgen", - "serde_json", - "sha2", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing", - "tracing-subscriber", -@@ -3203,7 +3248,7 @@ dependencies = [ - "matrix-sdk-test", - "matrix-sdk-ui", - "once_cell", -- "rand", -+ "rand 0.8.5", - "reqwest", - "serde_json", - "similar-asserts", -@@ -3222,7 +3267,7 @@ dependencies = [ - "image", - "qrcode", - "ruma-common", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "vodozemac", - ] - -@@ -3251,7 +3296,7 @@ dependencies = [ - "serde_path_to_error", - "similar-asserts", - "tempfile", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tracing", - "vodozemac", -@@ -3265,15 +3310,15 @@ dependencies = [ - "base64", - "blake3", - "chacha20poly1305", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "hmac", - "pbkdf2", -- "rand", -+ "rand 0.8.5", - "rmp-serde", - "serde", - "serde_json", - "sha2", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "zeroize", - ] - -@@ -3283,7 +3328,7 @@ version = "0.13.0" - dependencies = [ - "as_variant", - "ctor", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "http", - "insta", - "matrix-sdk-common", -@@ -3319,7 +3364,7 @@ dependencies = [ - "async-rx", - "async-stream", - "async_cell", -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "chrono", - "emojis", - "eyeball", -@@ -3344,7 +3389,7 @@ dependencies = [ - "serde_json", - "stream_assert", - "tempfile", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tokio", - "tokio-stream", - "tracing", -@@ -3357,15 +3402,15 @@ dependencies = [ - - [[package]] - name = "memchr" --version = "2.7.4" -+version = "2.7.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -+checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" - - [[package]] - name = "memmap2" --version = "0.9.4" -+version = "0.9.8" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" -+checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" - dependencies = [ - "libc", - ] -@@ -3378,19 +3423,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - - [[package]] - name = "mime2ext" --version = "0.1.53" -+version = "0.1.54" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "515a63dc9666c865e848b043ab52fe9a5c713ae89cde4b5fbaae67cfd614b93a" -- --[[package]] --name = "mime_guess" --version = "2.0.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" --dependencies = [ -- "mime", -- "unicase", --] -+checksum = "cbf6f36070878c42c5233846cd3de24cf9016828fd47bc22957a687298bb21fc" - - [[package]] - name = "minicov" -@@ -3410,24 +3445,33 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - - [[package]] - name = "miniz_oxide" --version = "0.7.4" -+version = "0.8.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" - dependencies = [ -- "adler", -+ "adler2", - ] - - [[package]] - name = "mio" --version = "1.0.2" -+version = "1.0.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -+checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" - dependencies = [ -- "hermit-abi", - "libc", - "log", -- "wasi 0.11.0+wasi-snapshot-preview1", -- "windows-sys 0.52.0", -+ "wasi 0.11.1+wasi-snapshot-preview1", -+ "windows-sys 0.59.0", -+] -+ -+[[package]] -+name = "moxcms" -+version = "0.7.5" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "ddd32fa8935aeadb8a8a6b6b351e40225570a37c43de67690383d87ef170cd08" -+dependencies = [ -+ "num-traits", -+ "pxfm", - ] - - [[package]] -@@ -3448,7 +3492,7 @@ dependencies = [ - "ratatui", - "rpassword", - "serde_json", -- "strum 0.27.1", -+ "strum 0.27.2", - "throbber-widgets-tui", - "tokio", - "tracing", -@@ -3460,9 +3504,9 @@ dependencies = [ - - [[package]] - name = "native-tls" --version = "0.2.12" -+version = "0.2.14" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -+checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" - dependencies = [ - "libc", - "log", -@@ -3548,9 +3592,9 @@ dependencies = [ - - [[package]] - name = "num_cpus" --version = "1.16.0" -+version = "1.17.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -+checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" - dependencies = [ - "hermit-abi", - "libc", -@@ -3573,38 +3617,44 @@ checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" - dependencies = [ - "base64", - "chrono", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "http", -- "rand", -+ "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "serde_path_to_error", - "sha2", -- "thiserror 1.0.63", -+ "thiserror 1.0.69", - "url", - ] - - [[package]] - name = "object" --version = "0.32.2" -+version = "0.36.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" - dependencies = [ - "memchr", - ] - - [[package]] - name = "once_cell" --version = "1.20.2" -+version = "1.21.3" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -+ -+[[package]] -+name = "once_cell_polyfill" -+version = "1.70.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -+checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" - - [[package]] - name = "oorandom" --version = "11.1.4" -+version = "11.1.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" -+checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" - - [[package]] - name = "opaque-debug" -@@ -3614,11 +3664,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - - [[package]] - name = "openssl" --version = "0.10.72" -+version = "0.10.73" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" -+checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "cfg-if", - "foreign-types", - "libc", -@@ -3640,15 +3690,15 @@ dependencies = [ - - [[package]] - name = "openssl-probe" --version = "0.1.5" -+version = "0.1.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -+checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - - [[package]] - name = "openssl-sys" --version = "0.9.108" -+version = "0.9.109" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" -+checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" - dependencies = [ - "cc", - "libc", -@@ -3664,11 +3714,12 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - - [[package]] - name = "os_info" --version = "3.11.0" -+version = "3.12.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "41fc863e2ca13dc2d5c34fb22ea4a588248ac14db929616ba65c45f21744b1e9" -+checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" - dependencies = [ - "log", -+ "plist", - "serde", - "windows-sys 0.52.0", - ] -@@ -3681,9 +3732,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - - [[package]] - name = "owo-colors" --version = "3.5.0" -+version = "4.2.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -+checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e" - - [[package]] - name = "paranoid-android" -@@ -3700,15 +3751,15 @@ dependencies = [ - - [[package]] - name = "parking" --version = "2.2.0" -+version = "2.2.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" -+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - - [[package]] - name = "parking_lot" --version = "0.12.3" -+version = "0.12.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -+checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" - dependencies = [ - "lock_api", - "parking_lot_core", -@@ -3716,9 +3767,9 @@ dependencies = [ - - [[package]] - name = "parking_lot_core" --version = "0.9.10" -+version = "0.9.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -+checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" - dependencies = [ - "cfg-if", - "libc", -@@ -3745,26 +3796,26 @@ dependencies = [ - - [[package]] - name = "percent-encoding" --version = "2.3.1" -+version = "2.3.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - - [[package]] - name = "pest" --version = "2.8.0" -+version = "2.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" -+checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" - dependencies = [ - "memchr", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "ucd-trie", - ] - - [[package]] - name = "pest_derive" --version = "2.8.0" -+version = "2.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" -+checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" - dependencies = [ - "pest", - "pest_generator", -@@ -3772,9 +3823,9 @@ dependencies = [ - - [[package]] - name = "pest_generator" --version = "2.8.0" -+version = "2.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" -+checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" - dependencies = [ - "pest", - "pest_meta", -@@ -3785,63 +3836,52 @@ dependencies = [ - - [[package]] - name = "pest_meta" --version = "2.8.0" -+version = "2.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" -+checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" - dependencies = [ -- "once_cell", - "pest", - "sha2", - ] - - [[package]] - name = "phf" --version = "0.11.2" -+version = "0.11.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -+checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" - dependencies = [ - "phf_macros", -- "phf_shared 0.11.2", -+ "phf_shared", - ] - - [[package]] - name = "phf_codegen" --version = "0.11.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" --dependencies = [ -- "phf_generator 0.11.2", -- "phf_shared 0.11.2", --] -- --[[package]] --name = "phf_generator" --version = "0.10.0" -+version = "0.11.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -+checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" - dependencies = [ -- "phf_shared 0.10.0", -- "rand", -+ "phf_generator", -+ "phf_shared", - ] - - [[package]] - name = "phf_generator" --version = "0.11.2" -+version = "0.11.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -+checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" - dependencies = [ -- "phf_shared 0.11.2", -- "rand", -+ "phf_shared", -+ "rand 0.8.5", - ] - - [[package]] - name = "phf_macros" --version = "0.11.2" -+version = "0.11.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -+checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" - dependencies = [ -- "phf_generator 0.11.2", -- "phf_shared 0.11.2", -+ "phf_generator", -+ "phf_shared", - "proc-macro2", - "quote", - "syn", -@@ -3849,40 +3889,11 @@ dependencies = [ - - [[package]] - name = "phf_shared" --version = "0.10.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" --dependencies = [ -- "siphasher", --] -- --[[package]] --name = "phf_shared" --version = "0.11.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" --dependencies = [ -- "siphasher", --] -- --[[package]] --name = "pin-project" --version = "1.1.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" --dependencies = [ -- "pin-project-internal", --] -- --[[package]] --name = "pin-project-internal" --version = "1.1.5" -+version = "0.11.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -+checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" - dependencies = [ -- "proc-macro2", -- "quote", -- "syn", -+ "siphasher 1.0.1", - ] - - [[package]] -@@ -3909,9 +3920,9 @@ dependencies = [ - - [[package]] - name = "pkg-config" --version = "0.3.30" -+version = "0.3.32" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - - [[package]] - name = "plain" -@@ -3919,11 +3930,24 @@ version = "0.2.3" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -+[[package]] -+name = "plist" -+version = "1.7.4" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "3af6b589e163c5a788fab00ce0c0366f6efbb9959c2f9874b224936af7fce7e1" -+dependencies = [ -+ "base64", -+ "indexmap", -+ "quick-xml 0.38.3", -+ "serde", -+ "time", -+] -+ - [[package]] - name = "plotters" --version = "0.3.6" -+version = "0.3.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" -+checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" - dependencies = [ - "num-traits", - "plotters-backend", -@@ -3934,15 +3958,15 @@ dependencies = [ - - [[package]] - name = "plotters-backend" --version = "0.3.6" -+version = "0.3.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" -+checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" - - [[package]] - name = "plotters-svg" --version = "0.3.6" -+version = "0.3.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" -+checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" - dependencies = [ - "plotters-backend", - ] -@@ -3958,6 +3982,15 @@ dependencies = [ - "universal-hash", - ] - -+[[package]] -+name = "potential_utf" -+version = "0.1.3" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" -+dependencies = [ -+ "zerovec", -+] -+ - [[package]] - name = "powerfmt" - version = "0.2.0" -@@ -3966,9 +3999,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - - [[package]] - name = "pprof" --version = "0.14.0" -+version = "0.14.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ebbe2f8898beba44815fdc9e5a4ae9c929e21c5dc29b0c774a15555f7f58d6d0" -+checksum = "afad4d4df7b31280028245f152d5a575083e2abb822d05736f5e47653e77689f" - dependencies = [ - "aligned-vec", - "backtrace", -@@ -3980,18 +4013,21 @@ dependencies = [ - "log", - "nix", - "once_cell", -- "parking_lot", - "smallvec", -+ "spin", - "symbolic-demangle", - "tempfile", -- "thiserror 1.0.63", -+ "thiserror 1.0.69", - ] - - [[package]] - name = "ppv-lite86" --version = "0.2.17" -+version = "0.2.21" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -+dependencies = [ -+ "zerocopy", -+] - - [[package]] - name = "precomputed-hash" -@@ -4001,9 +4037,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - - [[package]] - name = "proc-macro-crate" --version = "3.2.0" -+version = "3.3.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -+checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" - dependencies = [ - "toml_edit", - ] -@@ -4031,34 +4067,34 @@ dependencies = [ - - [[package]] - name = "proc-macro2" --version = "1.0.92" -+version = "1.0.101" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" -+checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" - dependencies = [ - "unicode-ident", - ] - - [[package]] - name = "proptest" --version = "1.6.0" -+version = "1.7.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" -+checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "lazy_static", - "num-traits", -- "rand", -- "rand_chacha", -+ "rand 0.9.2", -+ "rand_chacha 0.9.0", - "rand_xorshift", -- "regex-syntax 0.8.5", -+ "regex-syntax 0.8.6", - "unarray", - ] - - [[package]] - name = "prost" --version = "0.13.4" -+version = "0.13.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" -+checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" - dependencies = [ - "bytes", - "prost-derive", -@@ -4066,12 +4102,12 @@ dependencies = [ - - [[package]] - name = "prost-derive" --version = "0.13.4" -+version = "0.13.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" -+checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" - dependencies = [ - "anyhow", -- "itertools 0.13.0", -+ "itertools 0.14.0", - "proc-macro2", - "quote", - "syn", -@@ -4083,7 +4119,7 @@ version = "0.13.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "memchr", - "pulldown-cmark-escape", - "unicase", -@@ -4095,6 +4131,15 @@ version = "0.11.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" - -+[[package]] -+name = "pxfm" -+version = "0.1.20" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "6e790881194f6f6e86945f0a42a6981977323669aeb6c40e9c7ec253133b96f8" -+dependencies = [ -+ "num-traits", -+] -+ - [[package]] - name = "qrcode" - version = "0.14.1" -@@ -4113,61 +4158,85 @@ dependencies = [ - "memchr", - ] - -+[[package]] -+name = "quick-xml" -+version = "0.38.3" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" -+dependencies = [ -+ "memchr", -+] -+ - [[package]] - name = "quinn" --version = "0.11.2" -+version = "0.11.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" -+checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" - dependencies = [ - "bytes", -+ "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", -- "rustc-hash 1.1.0", -+ "rustc-hash", - "rustls", -- "thiserror 1.0.63", -+ "socket2", -+ "thiserror 2.0.16", - "tokio", - "tracing", -+ "web-time", - ] - - [[package]] - name = "quinn-proto" --version = "0.11.8" -+version = "0.11.13" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" -+checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" - dependencies = [ - "bytes", -- "rand", -+ "getrandom 0.3.3", -+ "lru-slab", -+ "rand 0.9.2", - "ring", -- "rustc-hash 2.0.0", -+ "rustc-hash", - "rustls", -+ "rustls-pki-types", - "slab", -- "thiserror 1.0.63", -+ "thiserror 2.0.16", - "tinyvec", - "tracing", -+ "web-time", - ] - - [[package]] - name = "quinn-udp" --version = "0.5.3" -+version = "0.5.14" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "25a78e6f726d84fcf960409f509ae354a32648f090c8d32a2ea8b1a1bc3bab14" -+checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" - dependencies = [ -+ "cfg_aliases", - "libc", - "once_cell", - "socket2", -- "windows-sys 0.52.0", -+ "tracing", -+ "windows-sys 0.60.2", - ] - - [[package]] - name = "quote" --version = "1.0.37" -+version = "1.0.40" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" - dependencies = [ - "proc-macro2", - ] - -+[[package]] -+name = "r-efi" -+version = "5.3.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -+ - [[package]] - name = "rand" - version = "0.8.5" -@@ -4175,10 +4244,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" - dependencies = [ - "libc", -- "rand_chacha", -+ "rand_chacha 0.3.1", - "rand_core 0.6.4", - ] - -+[[package]] -+name = "rand" -+version = "0.9.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -+dependencies = [ -+ "rand_chacha 0.9.0", -+ "rand_core 0.9.3", -+] -+ - [[package]] - name = "rand_chacha" - version = "0.3.1" -@@ -4189,13 +4268,23 @@ dependencies = [ - "rand_core 0.6.4", - ] - -+[[package]] -+name = "rand_chacha" -+version = "0.9.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -+dependencies = [ -+ "ppv-lite86", -+ "rand_core 0.9.3", -+] -+ - [[package]] - name = "rand_core" - version = "0.6.4" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - dependencies = [ -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - ] - - [[package]] -@@ -4203,14 +4292,17 @@ name = "rand_core" - version = "0.9.3" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -+dependencies = [ -+ "getrandom 0.3.3", -+] - - [[package]] - name = "rand_xorshift" --version = "0.3.0" -+version = "0.4.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -+checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" - dependencies = [ -- "rand_core 0.6.4", -+ "rand_core 0.9.3", - ] - - [[package]] -@@ -4228,7 +4320,7 @@ version = "0.29.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "cassowary", - "compact_str", - "crossterm", -@@ -4245,9 +4337,9 @@ dependencies = [ - - [[package]] - name = "rayon" --version = "1.10.0" -+version = "1.11.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -+checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" - dependencies = [ - "either", - "rayon-core", -@@ -4255,9 +4347,9 @@ dependencies = [ - - [[package]] - name = "rayon-core" --version = "1.12.1" -+version = "1.13.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" - dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -@@ -4265,49 +4357,49 @@ dependencies = [ - - [[package]] - name = "readlock" --version = "0.1.8" -+version = "0.1.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "072cfe5b1d2dcd38d20e18f85e9c9978b6cc08f0b373e9f1fff1541335622974" -+checksum = "188bbae3aa4739bd264e9204da5919b2c91dd87dcce5049cf04bdf6aa17c5012" - - [[package]] - name = "readlock-tokio" --version = "0.1.3" -+version = "0.1.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "867fac64d07214a87e5cf4e88b4ce855844a1cea243534392377d1ac2c911653" -+checksum = "29b1800712c0d75de4b0bda5483d46eaf8df757b81df5ca2bde53d5ac2e2c5b2" - dependencies = [ - "tokio", - ] - - [[package]] - name = "redox_syscall" --version = "0.5.3" -+version = "0.5.17" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" -+checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - ] - - [[package]] - name = "redox_users" --version = "0.5.0" -+version = "0.5.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" -+checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" - dependencies = [ -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "libredox", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - ] - - [[package]] - name = "regex" --version = "1.11.1" -+version = "1.11.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -+checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" - dependencies = [ - "aho-corasick", - "memchr", -- "regex-automata 0.4.8", -- "regex-syntax 0.8.5", -+ "regex-automata 0.4.10", -+ "regex-syntax 0.8.6", - ] - - [[package]] -@@ -4321,13 +4413,13 @@ dependencies = [ - - [[package]] - name = "regex-automata" --version = "0.4.8" -+version = "0.4.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -+checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" - dependencies = [ - "aho-corasick", - "memchr", -- "regex-syntax 0.8.5", -+ "regex-syntax 0.8.6", - ] - - [[package]] -@@ -4338,15 +4430,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - - [[package]] - name = "regex-syntax" --version = "0.8.5" -+version = "0.8.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -+checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" - - [[package]] - name = "reqwest" --version = "0.12.15" -+version = "0.12.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" -+checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" - dependencies = [ - "async-compression", - "base64", -@@ -4362,17 +4454,13 @@ dependencies = [ - "hyper-rustls", - "hyper-tls", - "hyper-util", -- "ipnet", - "js-sys", - "log", -- "mime", - "native-tls", -- "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", -- "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", -@@ -4381,24 +4469,23 @@ dependencies = [ - "tokio", - "tokio-native-tls", - "tokio-rustls", -- "tokio-socks", - "tokio-util", - "tower", -+ "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", -- "webpki-roots", -- "windows-registry", -+ "webpki-roots 1.0.2", - ] - - [[package]] - name = "rgb" --version = "0.8.45" -+version = "0.8.52" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ade4539f42266ded9e755c605bdddf546242b2c961b03b06a7375260788a0523" -+checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" - dependencies = [ - "bytemuck", - ] -@@ -4411,7 +4498,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" - dependencies = [ - "cc", - "cfg-if", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", -@@ -4441,30 +4528,30 @@ dependencies = [ - - [[package]] - name = "rpassword" --version = "7.3.1" -+version = "7.4.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" -+checksum = "66d4c8b64f049c6721ec8ccec37ddfc3d641c4a7fca57e8f2a89de509c73df39" - dependencies = [ - "libc", - "rtoolbox", -- "windows-sys 0.48.0", -+ "windows-sys 0.59.0", - ] - - [[package]] - name = "rtoolbox" --version = "0.0.2" -+version = "0.0.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -+checksum = "a7cc970b249fbe527d6e02e0a227762c9108b2f49d81094fe357ffc6d14d7f6f" - dependencies = [ - "libc", -- "windows-sys 0.48.0", -+ "windows-sys 0.52.0", - ] - - [[package]] - name = "ruma" --version = "0.12.5" -+version = "0.12.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c1d47e42b7dea75a468dea63a230f51331c58d690ca018ea1c6ac782ea98880c" -+checksum = "3714d4ebd4314e6510bc64194fcdea1b51fe47898169a08f1bb4912e5c10e2c5" - dependencies = [ - "assign", - "js_int", -@@ -4496,7 +4583,7 @@ dependencies = [ - "serde", - "serde_html_form", - "serde_json", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "url", - "web-time", - ] -@@ -4511,21 +4598,21 @@ dependencies = [ - "base64", - "bytes", - "form_urlencoded", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "http", - "indexmap", - "js-sys", - "js_int", - "konst", - "percent-encoding", -- "rand", -+ "rand 0.8.5", - "regex", - "ruma-identifiers-validation", - "ruma-macros", - "serde", - "serde_html_form", - "serde_json", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "time", - "tracing", - "url", -@@ -4536,9 +4623,9 @@ dependencies = [ - - [[package]] - name = "ruma-events" --version = "0.30.4" -+version = "0.30.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3cdc7abec9bc2a9ca0b4831cc26ce97a6a8c39a0bde44a19281a719e861b4293" -+checksum = "f141b37dcd3cfa1199d6a13929db59be529b2c69107edc9f1702b81015e970b2" - dependencies = [ - "as_variant", - "indexmap", -@@ -4553,7 +4640,7 @@ dependencies = [ - "ruma-macros", - "serde", - "serde_json", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "tracing", - "url", - "web-time", -@@ -4595,7 +4682,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6ad674b5e5368c53a2c90fde7dac7e30747004aaf7b1827b72874a25fc06d4d8" - dependencies = [ - "js_int", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - ] - - [[package]] -@@ -4611,7 +4698,7 @@ dependencies = [ - "ruma-identifiers-validation", - "serde", - "syn", -- "toml 0.8.15", -+ "toml 0.8.23", - ] - - [[package]] -@@ -4620,7 +4707,7 @@ version = "0.35.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "a22715a5d6deef63c637207afbe68d0c72c3f8d0022d7cf9714c442d6157606b" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", -@@ -4630,49 +4717,56 @@ dependencies = [ - - [[package]] - name = "rustc-demangle" --version = "0.1.24" -+version = "0.1.26" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -+checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - - [[package]] - name = "rustc-hash" --version = "1.1.0" -+version = "2.1.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - - [[package]] --name = "rustc-hash" --version = "2.0.0" -+name = "rustc_version" -+version = "0.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" -+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -+dependencies = [ -+ "semver", -+] - - [[package]] --name = "rustc_version" --version = "0.4.0" -+name = "rustix" -+version = "0.38.44" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" - dependencies = [ -- "semver", -+ "bitflags 2.9.3", -+ "errno", -+ "libc", -+ "linux-raw-sys 0.4.15", -+ "windows-sys 0.59.0", - ] - - [[package]] - name = "rustix" --version = "0.38.41" -+version = "1.0.8" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" -+checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "errno", - "libc", -- "linux-raw-sys", -- "windows-sys 0.52.0", -+ "linux-raw-sys 0.9.4", -+ "windows-sys 0.60.2", - ] - - [[package]] - name = "rustls" --version = "0.23.27" -+version = "0.23.31" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" -+checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" - dependencies = [ - "log", - "once_cell", -@@ -4683,30 +4777,21 @@ dependencies = [ - "zeroize", - ] - --[[package]] --name = "rustls-pemfile" --version = "2.1.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" --dependencies = [ -- "base64", -- "rustls-pki-types", --] -- - [[package]] - name = "rustls-pki-types" - version = "1.12.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" - dependencies = [ -+ "web-time", - "zeroize", - ] - - [[package]] - name = "rustls-webpki" --version = "0.103.3" -+version = "0.103.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" -+checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" - dependencies = [ - "ring", - "rustls-pki-types", -@@ -4715,15 +4800,15 @@ dependencies = [ - - [[package]] - name = "rustversion" --version = "1.0.17" -+version = "1.0.22" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" -+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - - [[package]] - name = "ryu" --version = "1.0.18" -+version = "1.0.20" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - - [[package]] - name = "same-file" -@@ -4736,13 +4821,19 @@ dependencies = [ - - [[package]] - name = "schannel" --version = "0.1.23" -+version = "0.1.27" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" - dependencies = [ -- "windows-sys 0.52.0", -+ "windows-sys 0.59.0", - ] - -+[[package]] -+name = "scoped-tls" -+version = "1.0.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" -+ - [[package]] - name = "scopeguard" - version = "1.2.0" -@@ -4760,9 +4851,9 @@ dependencies = [ - - [[package]] - name = "scroll_derive" --version = "0.12.0" -+version = "0.12.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" -+checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" - dependencies = [ - "proc-macro2", - "quote", -@@ -4775,7 +4866,7 @@ version = "2.11.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "core-foundation", - "core-foundation-sys", - "libc", -@@ -4784,9 +4875,9 @@ dependencies = [ - - [[package]] - name = "security-framework-sys" --version = "2.11.1" -+version = "2.14.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" -+checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" - dependencies = [ - "core-foundation-sys", - "libc", -@@ -4794,9 +4885,9 @@ dependencies = [ - - [[package]] - name = "semver" --version = "1.0.23" -+version = "1.0.26" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -+checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" - dependencies = [ - "serde", - ] -@@ -4819,7 +4910,7 @@ dependencies = [ - "sentry-tracing", - "tokio", - "ureq", -- "webpki-roots", -+ "webpki-roots 0.26.11", - ] - - [[package]] -@@ -4855,7 +4946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "653942e6141f16651273159f4b8b1eaeedf37a7554c00cd798953e64b8a9bf72" - dependencies = [ - "once_cell", -- "rand", -+ "rand 0.8.5", - "sentry-types", - "serde", - "serde_json", -@@ -4902,10 +4993,10 @@ checksum = "2d4203359e60724aa05cf2385aaf5d4f147e837185d7dd2b9ccf1ee77f4420c8" - dependencies = [ - "debugid", - "hex", -- "rand", -+ "rand 0.8.5", - "serde", - "serde_json", -- "thiserror 1.0.63", -+ "thiserror 1.0.69", - "time", - "url", - "uuid", -@@ -4913,9 +5004,9 @@ dependencies = [ - - [[package]] - name = "serde" --version = "1.0.217" -+version = "1.0.219" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" -+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" - dependencies = [ - "serde_derive", - ] -@@ -4933,18 +5024,18 @@ dependencies = [ - - [[package]] - name = "serde_bytes" --version = "0.11.15" -+version = "0.11.17" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" -+checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" - dependencies = [ - "serde", - ] - - [[package]] - name = "serde_derive" --version = "1.0.217" -+version = "1.0.219" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" -+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" - dependencies = [ - "proc-macro2", - "quote", -@@ -4966,9 +5057,9 @@ dependencies = [ - - [[package]] - name = "serde_json" --version = "1.0.138" -+version = "1.0.143" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" -+checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" - dependencies = [ - "itoa", - "memchr", -@@ -4988,9 +5079,9 @@ dependencies = [ - - [[package]] - name = "serde_spanned" --version = "0.6.8" -+version = "0.6.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" - dependencies = [ - "serde", - ] -@@ -5009,9 +5100,9 @@ dependencies = [ - - [[package]] - name = "sha2" --version = "0.10.8" -+version = "0.10.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" - dependencies = [ - "cfg-if", - "cpufeatures", -@@ -5035,9 +5126,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - - [[package]] - name = "signal-hook" --version = "0.3.17" -+version = "0.3.18" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -+checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" - dependencies = [ - "libc", - "signal-hook-registry", -@@ -5056,9 +5147,9 @@ dependencies = [ - - [[package]] - name = "signal-hook-registry" --version = "1.4.2" -+version = "1.4.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -+checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" - dependencies = [ - "libc", - ] -@@ -5074,9 +5165,9 @@ dependencies = [ - - [[package]] - name = "similar" --version = "2.6.0" -+version = "2.7.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" -+checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" - dependencies = [ - "bstr", - "unicode-segmentation", -@@ -5084,9 +5175,9 @@ dependencies = [ - - [[package]] - name = "similar-asserts" --version = "1.6.1" -+version = "1.7.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9f08357795f0d604ea7d7130f22c74b03838c959bdb14adde3142aab4d18a293" -+checksum = "b5b441962c817e33508847a22bd82f03a30cff43642dc2fae8b050566121eb9a" - dependencies = [ - "console", - "similar", -@@ -5098,20 +5189,23 @@ version = "0.3.11" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -+[[package]] -+name = "siphasher" -+version = "1.0.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" -+ - [[package]] - name = "slab" --version = "0.4.9" -+version = "0.4.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" --dependencies = [ -- "autocfg", --] -+checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - - [[package]] - name = "smallvec" --version = "1.13.2" -+version = "1.15.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -+checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - - [[package]] - name = "smawk" -@@ -5121,12 +5215,21 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - - [[package]] - name = "socket2" --version = "0.5.7" -+version = "0.6.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -+checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" - dependencies = [ - "libc", -- "windows-sys 0.52.0", -+ "windows-sys 0.59.0", -+] -+ -+[[package]] -+name = "spin" -+version = "0.10.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" -+dependencies = [ -+ "lock_api", - ] - - [[package]] -@@ -5168,26 +5271,25 @@ dependencies = [ - - [[package]] - name = "string_cache" --version = "0.8.7" -+version = "0.8.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -+checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" - dependencies = [ - "new_debug_unreachable", -- "once_cell", - "parking_lot", -- "phf_shared 0.10.0", -+ "phf_shared", - "precomputed-hash", - "serde", - ] - - [[package]] - name = "string_cache_codegen" --version = "0.5.2" -+version = "0.5.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -+checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" - dependencies = [ -- "phf_generator 0.10.0", -- "phf_shared 0.10.0", -+ "phf_generator", -+ "phf_shared", - "proc-macro2", - "quote", - ] -@@ -5209,11 +5311,11 @@ dependencies = [ - - [[package]] - name = "strum" --version = "0.27.1" -+version = "0.27.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" -+checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" - dependencies = [ -- "strum_macros 0.27.1", -+ "strum_macros 0.27.2", - ] - - [[package]] -@@ -5231,14 +5333,13 @@ dependencies = [ - - [[package]] - name = "strum_macros" --version = "0.27.1" -+version = "0.27.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" -+checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" - dependencies = [ - "heck", - "proc-macro2", - "quote", -- "rustversion", - "syn", - ] - -@@ -5250,9 +5351,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - - [[package]] - name = "symbolic-common" --version = "12.9.2" -+version = "12.16.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "71297dc3e250f7dbdf8adb99e235da783d690f5819fdeb4cce39d9cfb0aca9f1" -+checksum = "9da12f8fecbbeaa1ee62c1d50dc656407e007c3ee7b2a41afce4b5089eaef15e" - dependencies = [ - "debugid", - "memmap2", -@@ -5262,9 +5363,9 @@ dependencies = [ - - [[package]] - name = "symbolic-demangle" --version = "12.9.2" -+version = "12.16.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "424fa2c9bf2c862891b9cfd354a752751a6730fd838a4691e7f6c2c7957b9daf" -+checksum = "6fd35afe0ef9d35d3dcd41c67ddf882fc832a387221338153b7cd685a105495c" - dependencies = [ - "cpp_demangle", - "rustc-demangle", -@@ -5273,9 +5374,9 @@ dependencies = [ - - [[package]] - name = "syn" --version = "2.0.101" -+version = "2.0.106" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -+checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" - dependencies = [ - "proc-macro2", - "quote", -@@ -5284,18 +5385,18 @@ dependencies = [ - - [[package]] - name = "sync_wrapper" --version = "1.0.1" -+version = "1.0.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" - dependencies = [ - "futures-core", - ] - - [[package]] - name = "synstructure" --version = "0.13.1" -+version = "0.13.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" - dependencies = [ - "proc-macro2", - "quote", -@@ -5304,16 +5405,15 @@ dependencies = [ - - [[package]] - name = "tempfile" --version = "3.16.0" -+version = "3.21.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" -+checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" - dependencies = [ -- "cfg-if", - "fastrand", -- "getrandom 0.3.1", -+ "getrandom 0.3.3", - "once_cell", -- "rustix", -- "windows-sys 0.59.0", -+ "rustix 1.0.8", -+ "windows-sys 0.60.2", - ] - - [[package]] -@@ -5329,36 +5429,36 @@ dependencies = [ - - [[package]] - name = "textwrap" --version = "0.16.1" -+version = "0.16.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -+checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" - dependencies = [ - "smawk", - ] - - [[package]] - name = "thiserror" --version = "1.0.63" -+version = "1.0.69" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" -+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" - dependencies = [ -- "thiserror-impl 1.0.63", -+ "thiserror-impl 1.0.69", - ] - - [[package]] - name = "thiserror" --version = "2.0.11" -+version = "2.0.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" -+checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" - dependencies = [ -- "thiserror-impl 2.0.11", -+ "thiserror-impl 2.0.16", - ] - - [[package]] - name = "thiserror-impl" --version = "1.0.63" -+version = "1.0.69" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" -+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" - dependencies = [ - "proc-macro2", - "quote", -@@ -5367,9 +5467,9 @@ dependencies = [ - - [[package]] - name = "thiserror-impl" --version = "2.0.11" -+version = "2.0.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" -+checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" - dependencies = [ - "proc-macro2", - "quote", -@@ -5378,12 +5478,11 @@ dependencies = [ - - [[package]] - name = "thread_local" --version = "1.1.8" -+version = "1.1.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" - dependencies = [ - "cfg-if", -- "once_cell", - ] - - [[package]] -@@ -5392,18 +5491,17 @@ version = "0.8.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "1d36b5738d666a2b4c91b7c24998a8588db724b3107258343ebf8824bf55b06d" - dependencies = [ -- "rand", -+ "rand 0.8.5", - "ratatui", - ] - - [[package]] - name = "time" --version = "0.3.37" -+version = "0.3.42" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" -+checksum = "8ca967379f9d8eb8058d86ed467d81d03e81acd45757e4ca341c24affbe8e8e3" - dependencies = [ - "deranged", -- "itoa", - "libc", - "num-conv", - "num_threads", -@@ -5415,15 +5513,15 @@ dependencies = [ - - [[package]] - name = "time-core" --version = "0.1.2" -+version = "0.1.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -+checksum = "a9108bb380861b07264b950ded55a44a14a4adc68b9f5efd85aafc3aa4d40a68" - - [[package]] - name = "time-macros" --version = "0.2.19" -+version = "0.2.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" -+checksum = "7182799245a7264ce590b349d90338f1c1affad93d2639aed5f8f69c090b334c" - dependencies = [ - "num-conv", - "time-core", -@@ -5431,9 +5529,9 @@ dependencies = [ - - [[package]] - name = "tinystr" --version = "0.7.6" -+version = "0.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -+checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" - dependencies = [ - "displaydoc", - "zerovec", -@@ -5451,9 +5549,9 @@ dependencies = [ - - [[package]] - name = "tinyvec" --version = "1.8.0" -+version = "1.10.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -+checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" - dependencies = [ - "tinyvec_macros", - ] -@@ -5466,18 +5564,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - - [[package]] - name = "tokio" --version = "1.43.1" -+version = "1.47.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "492a604e2fd7f814268a378409e6c92b5525d747d10db9a229723f55a417958c" -+checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" - dependencies = [ - "backtrace", - "bytes", -+ "io-uring", - "libc", - "mio", - "pin-project-lite", -+ "slab", - "socket2", - "tokio-macros", -- "windows-sys 0.52.0", -+ "windows-sys 0.59.0", - ] - - [[package]] -@@ -5503,24 +5603,11 @@ dependencies = [ - - [[package]] - name = "tokio-rustls" --version = "0.26.0" -+version = "0.26.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -+checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" - dependencies = [ - "rustls", -- "rustls-pki-types", -- "tokio", --] -- --[[package]] --name = "tokio-socks" --version = "0.5.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" --dependencies = [ -- "either", -- "futures-util", -- "thiserror 1.0.63", - "tokio", - ] - -@@ -5551,9 +5638,9 @@ dependencies = [ - - [[package]] - name = "tokio-util" --version = "0.7.13" -+version = "0.7.16" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" -+checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" - dependencies = [ - "bytes", - "futures-core", -@@ -5573,9 +5660,9 @@ dependencies = [ - - [[package]] - name = "toml" --version = "0.8.15" -+version = "0.8.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" -+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" - dependencies = [ - "serde", - "serde_spanned", -@@ -5585,18 +5672,18 @@ dependencies = [ - - [[package]] - name = "toml_datetime" --version = "0.6.8" -+version = "0.6.11" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - dependencies = [ - "serde", - ] - - [[package]] - name = "toml_edit" --version = "0.22.22" -+version = "0.22.27" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" - dependencies = [ - "indexmap", - "serde", -@@ -5621,6 +5708,24 @@ dependencies = [ - "tracing", - ] - -+[[package]] -+name = "tower-http" -+version = "0.6.6" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" -+dependencies = [ -+ "bitflags 2.9.3", -+ "bytes", -+ "futures-util", -+ "http", -+ "http-body", -+ "iri-string", -+ "pin-project-lite", -+ "tower", -+ "tower-layer", -+ "tower-service", -+] -+ - [[package]] - name = "tower-layer" - version = "0.3.3" -@@ -5650,7 +5755,7 @@ version = "0.2.3" - source = "git+https://github.com/element-hq/tracing.git?rev=ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd#ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd" - dependencies = [ - "crossbeam-channel", -- "thiserror 1.0.63", -+ "thiserror 1.0.69", - "time", - "tracing-subscriber", - ] -@@ -5676,9 +5781,9 @@ dependencies = [ - - [[package]] - name = "tracing-error" --version = "0.2.0" -+version = "0.2.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -+checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" - dependencies = [ - "tracing", - "tracing-subscriber", -@@ -5723,13 +5828,13 @@ version = "0.4.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "743912880bcd21d1034063a1b5c6630d444d5a6cc9f90e2c0a200bbe278907c7" - dependencies = [ -- "bitflags 2.8.0", -+ "bitflags 2.9.3", - "crossterm", - "derive_builder", - "itertools 0.14.0", - "ratatui", -- "strum 0.27.1", -- "thiserror 2.0.11", -+ "strum 0.27.2", -+ "thiserror 2.0.16", - ] - - [[package]] -@@ -5745,15 +5850,15 @@ dependencies = [ - - [[package]] - name = "typenum" --version = "1.17.0" -+version = "1.18.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - - [[package]] - name = "typewit" --version = "1.9.0" -+version = "1.13.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c6fb9ae6a3cafaf0a5d14c2302ca525f9ae8e07a0f0e6949de88d882c37a6e24" -+checksum = "4dd91acc53c592cb800c11c83e8e7ee1d48378d05cfa33b5474f5f80c5b236bf" - dependencies = [ - "typewit_proc_macros", - ] -@@ -5772,11 +5877,11 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - - [[package]] - name = "ulid" --version = "1.1.4" -+version = "1.2.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f294bff79170ed1c5633812aff1e565c35d993a36e757f9bc0accf5eec4e6045" -+checksum = "470dbf6591da1b39d43c14523b2b469c86879a53e8b758c8e090a470fe7b1fbe" - dependencies = [ -- "rand", -+ "rand 0.9.2", - "web-time", - ] - -@@ -5797,18 +5902,15 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - - [[package]] - name = "unicase" --version = "2.7.0" -+version = "2.8.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" --dependencies = [ -- "version_check", --] -+checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" - - [[package]] - name = "unicode-ident" --version = "1.0.12" -+version = "1.0.18" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - - [[package]] - name = "unicode-normalization" -@@ -5833,14 +5935,14 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" - dependencies = [ - "itertools 0.13.0", - "unicode-segmentation", -- "unicode-width 0.1.13", -+ "unicode-width 0.1.14", - ] - - [[package]] - name = "unicode-width" --version = "0.1.13" -+version = "0.1.14" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -+checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - - [[package]] - name = "unicode-width" -@@ -5850,17 +5952,19 @@ checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - - [[package]] - name = "uniffi" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f31bff6daf87277a9014bcdefbc2842b0553392919d1096843c5aad899ca4588" -+checksum = "c6d968cb62160c11f2573e6be724ef8b1b18a277aededd17033f8a912d73e2b4" - dependencies = [ - "anyhow", - "camino", -+ "cargo_metadata", - "clap", - "uniffi_bindgen", - "uniffi_build", - "uniffi_core", - "uniffi_macros", -+ "uniffi_pipeline", - ] - - [[package]] -@@ -5872,9 +5976,9 @@ dependencies = [ - - [[package]] - name = "uniffi_bindgen" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "96061d7e01b185aa405f7c9b134741ab3e50cc6796a47d6fd8ab9a5364b5feed" -+checksum = "f6b39ef1acbe1467d5d210f274fae344cb6f8766339330cb4c9688752899bf6b" - dependencies = [ - "anyhow", - "askama", -@@ -5884,60 +5988,61 @@ dependencies = [ - "glob", - "goblin", - "heck", -+ "indexmap", - "once_cell", -- "paste", - "serde", -+ "tempfile", - "textwrap", - "toml 0.5.11", -+ "uniffi_internal_macros", - "uniffi_meta", -- "uniffi_testing", -+ "uniffi_pipeline", - "uniffi_udl", - ] - - [[package]] - name = "uniffi_build" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9d6b86f9b221046af0c533eafe09ece04e2f1ded04ccdc9bba0ec09aec1c52bd" -+checksum = "6683e6b665423cddeacd89a3f97312cf400b2fb245a26f197adaf65c45d505b2" - dependencies = [ - "anyhow", - "camino", - "uniffi_bindgen", - ] - --[[package]] --name = "uniffi_checksum_derive" --version = "0.28.3" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "802d2051a700e3ec894c79f80d2705b69d85844dafbbe5d1a92776f8f48b563a" --dependencies = [ -- "quote", -- "syn", --] -- - [[package]] - name = "uniffi_core" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3210d57d6ab6065ab47a2898dacdb7c606fd6a4156196831fa3bf82e34ac58a6" -+checksum = "c2d990b553d6b9a7ee9c3ae71134674739913d52350b56152b0e613595bb5a6f" - dependencies = [ - "anyhow", - "async-compat", - "bytes", -- "camino", -- "log", - "once_cell", -- "paste", - "static_assertions", - ] - -+[[package]] -+name = "uniffi_internal_macros" -+version = "0.29.4" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "04f4f224becf14885c10e6e400b95cc4d1985738140cb194ccc2044563f8a56b" -+dependencies = [ -+ "anyhow", -+ "indexmap", -+ "proc-macro2", -+ "quote", -+ "syn", -+] -+ - [[package]] - name = "uniffi_macros" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b58691741080935437dc862122e68d7414432a11824ac1137868de46181a0bd2" -+checksum = "b481d385af334871d70904e6a5f129be7cd38c18fcf8dd8fd1f646b426a56d58" - dependencies = [ -- "bincode", - "camino", - "fs-err", - "once_cell", -@@ -5951,39 +6056,38 @@ dependencies = [ - - [[package]] - name = "uniffi_meta" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7663eacdbd9fbf4a88907ddcfe2e6fa85838eb6dc2418a7d91eebb3786f8e20b" -+checksum = "10f817868a3b171bb7bf259e882138d104deafde65684689b4694c846d322491" - dependencies = [ - "anyhow", -- "bytes", -- "siphasher", -- "uniffi_checksum_derive", -+ "siphasher 0.3.11", -+ "uniffi_internal_macros", -+ "uniffi_pipeline", - ] - - [[package]] --name = "uniffi_testing" --version = "0.28.0" -+name = "uniffi_pipeline" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f922465f7566f25f8fe766920205fdfa9a3fcdc209c6bfb7557f0b5bf45b04dd" -+checksum = "4b147e133ad7824e32426b90bc41fda584363563f2ba747f590eca1fd6fd14e6" - dependencies = [ - "anyhow", -- "camino", -- "cargo_metadata", -- "fs-err", -- "once_cell", -+ "heck", -+ "indexmap", -+ "tempfile", -+ "uniffi_internal_macros", - ] - - [[package]] - name = "uniffi_udl" --version = "0.28.0" -+version = "0.29.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cef408229a3a407fafa4c36dc4f6ece78a6fb258ab28d2b64bddd49c8cb680f6" -+checksum = "caed654fb73da5abbc7a7e9c741532284532ba4762d6fe5071372df22a41730a" - dependencies = [ - "anyhow", - "textwrap", - "uniffi_meta", -- "uniffi_testing", - "weedle2", - ] - -@@ -6016,14 +6120,14 @@ dependencies = [ - "rustls", - "rustls-pki-types", - "url", -- "webpki-roots", -+ "webpki-roots 0.26.11", - ] - - [[package]] - name = "url" --version = "2.5.4" -+version = "2.5.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -+checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" - dependencies = [ - "form_urlencoded", - "idna", -@@ -6043,12 +6147,6 @@ version = "0.7.6" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - --[[package]] --name = "utf16_iter" --version = "1.0.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" -- - [[package]] - name = "utf8_iter" - version = "1.0.4" -@@ -6063,20 +6161,21 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - - [[package]] - name = "uuid" --version = "1.12.1" -+version = "1.18.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" -+checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" - dependencies = [ -- "getrandom 0.2.15", -+ "getrandom 0.3.3", -+ "js-sys", - "serde", - "wasm-bindgen", - ] - - [[package]] - name = "valuable" --version = "0.1.0" -+version = "0.1.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - - [[package]] - name = "vcpkg" -@@ -6098,9 +6197,9 @@ dependencies = [ - - [[package]] - name = "version_check" --version = "0.9.4" -+version = "0.9.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - - [[package]] - name = "vodozemac" -@@ -6116,18 +6215,18 @@ dependencies = [ - "chacha20poly1305", - "curve25519-dalek", - "ed25519-dalek", -- "getrandom 0.2.15", -+ "getrandom 0.2.16", - "hkdf", - "hmac", - "matrix-pickle", - "prost", -- "rand", -+ "rand 0.8.5", - "serde", - "serde_bytes", - "serde_json", - "sha2", - "subtle", -- "thiserror 2.0.11", -+ "thiserror 2.0.16", - "x25519-dalek", - "zeroize", - ] -@@ -6153,17 +6252,17 @@ dependencies = [ - - [[package]] - name = "wasi" --version = "0.11.0+wasi-snapshot-preview1" -+version = "0.11.1+wasi-snapshot-preview1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - - [[package]] - name = "wasi" --version = "0.13.3+wasi-0.2.2" -+version = "0.14.3+wasi-0.2.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" -+checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" - dependencies = [ -- "wit-bindgen-rt", -+ "wit-bindgen", - ] - - [[package]] -@@ -6263,9 +6362,9 @@ dependencies = [ - - [[package]] - name = "wasm-streams" --version = "0.4.0" -+version = "0.4.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" - dependencies = [ - "futures-util", - "js-sys", -@@ -6296,9 +6395,18 @@ dependencies = [ - - [[package]] - name = "webpki-roots" --version = "0.26.3" -+version = "0.26.11" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" -+dependencies = [ -+ "webpki-roots 1.0.2", -+] -+ -+[[package]] -+name = "webpki-roots" -+version = "1.0.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" -+checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" - dependencies = [ - "rustls-pki-types", - ] -@@ -6314,9 +6422,9 @@ dependencies = [ - - [[package]] - name = "wildmatch" --version = "2.3.4" -+version = "2.4.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" -+checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" - - [[package]] - name = "winapi" -@@ -6336,11 +6444,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - - [[package]] - name = "winapi-util" --version = "0.1.8" -+version = "0.1.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -+checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" - dependencies = [ -- "windows-sys 0.52.0", -+ "windows-sys 0.60.2", - ] - - [[package]] -@@ -6350,56 +6458,105 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - - [[package]] --name = "windows-core" --version = "0.52.0" -+name = "windows" -+version = "0.61.3" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -+checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" - dependencies = [ -- "windows-targets 0.52.6", -+ "windows-collections", -+ "windows-core", -+ "windows-future", -+ "windows-link", -+ "windows-numerics", - ] - - [[package]] --name = "windows-link" --version = "0.1.1" -+name = "windows-collections" -+version = "0.2.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" -+checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -+dependencies = [ -+ "windows-core", -+] - - [[package]] --name = "windows-registry" --version = "0.4.0" -+name = "windows-core" -+version = "0.61.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" -+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" - dependencies = [ -+ "windows-implement", -+ "windows-interface", -+ "windows-link", - "windows-result", - "windows-strings", -- "windows-targets 0.53.0", - ] - - [[package]] --name = "windows-result" --version = "0.3.4" -+name = "windows-future" -+version = "0.2.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -+checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" - dependencies = [ -+ "windows-core", - "windows-link", -+ "windows-threading", - ] - - [[package]] --name = "windows-strings" --version = "0.3.1" -+name = "windows-implement" -+version = "0.60.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -+dependencies = [ -+ "proc-macro2", -+ "quote", -+ "syn", -+] -+ -+[[package]] -+name = "windows-interface" -+version = "0.59.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -+dependencies = [ -+ "proc-macro2", -+ "quote", -+ "syn", -+] -+ -+[[package]] -+name = "windows-link" -+version = "0.1.3" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" -+ -+[[package]] -+name = "windows-numerics" -+version = "0.2.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -+checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" - dependencies = [ -+ "windows-core", - "windows-link", - ] - - [[package]] --name = "windows-sys" --version = "0.48.0" -+name = "windows-result" -+version = "0.3.4" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -+dependencies = [ -+ "windows-link", -+] -+ -+[[package]] -+name = "windows-strings" -+version = "0.4.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" - dependencies = [ -- "windows-targets 0.48.5", -+ "windows-link", - ] - - [[package]] -@@ -6421,18 +6578,12 @@ dependencies = [ - ] - - [[package]] --name = "windows-targets" --version = "0.48.5" -+name = "windows-sys" -+version = "0.60.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" - dependencies = [ -- "windows_aarch64_gnullvm 0.48.5", -- "windows_aarch64_msvc 0.48.5", -- "windows_i686_gnu 0.48.5", -- "windows_i686_msvc 0.48.5", -- "windows_x86_64_gnu 0.48.5", -- "windows_x86_64_gnullvm 0.48.5", -- "windows_x86_64_msvc 0.48.5", -+ "windows-targets 0.53.3", - ] - - [[package]] -@@ -6453,10 +6604,11 @@ dependencies = [ - - [[package]] - name = "windows-targets" --version = "0.53.0" -+version = "0.53.3" + name = "uniffi_udl" +-version = "0.28.0" ++version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -+checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +-checksum = "cef408229a3a407fafa4c36dc4f6ece78a6fb258ab28d2b64bddd49c8cb680f6" ++checksum = "caed654fb73da5abbc7a7e9c741532284532ba4762d6fe5071372df22a41730a" dependencies = [ -+ "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", -@@ -6468,10 +6620,13 @@ dependencies = [ + "anyhow", + "textwrap", + "uniffi_meta", +- "uniffi_testing", + "weedle2", ] - [[package]] --name = "windows_aarch64_gnullvm" --version = "0.48.5" -+name = "windows-threading" -+version = "0.1.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -+checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -+dependencies = [ -+ "windows-link", -+] - - [[package]] - name = "windows_aarch64_gnullvm" -@@ -6485,12 +6640,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - --[[package]] --name = "windows_aarch64_msvc" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -- - [[package]] - name = "windows_aarch64_msvc" - version = "0.52.6" -@@ -6503,12 +6652,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - --[[package]] --name = "windows_i686_gnu" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -- - [[package]] - name = "windows_i686_gnu" - version = "0.52.6" -@@ -6533,12 +6676,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - --[[package]] --name = "windows_i686_msvc" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -- - [[package]] - name = "windows_i686_msvc" - version = "0.52.6" -@@ -6551,12 +6688,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - --[[package]] --name = "windows_x86_64_gnu" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -- - [[package]] - name = "windows_x86_64_gnu" - version = "0.52.6" -@@ -6569,12 +6700,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - --[[package]] --name = "windows_x86_64_gnullvm" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -- - [[package]] - name = "windows_x86_64_gnullvm" - version = "0.52.6" -@@ -6587,12 +6712,6 @@ version = "0.53.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - --[[package]] --name = "windows_x86_64_msvc" --version = "0.48.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -- - [[package]] - name = "windows_x86_64_msvc" - version = "0.52.6" -@@ -6607,23 +6726,22 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - - [[package]] - name = "winnow" --version = "0.6.20" -+version = "0.7.13" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -+checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" - dependencies = [ +@@ -7182,6 +7175,15 @@ dependencies = [ "memchr", ] - [[package]] - name = "wiremock" --version = "0.6.2" -+version = "0.6.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7fff469918e7ca034884c7fd8f93fe27bacb7fcb599fd879df6c7b429a29b646" -+checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031" - dependencies = [ - "assert-json-diff", -- "async-trait", - "base64", -- "deadpool 0.10.0", -+ "deadpool", - "futures", - "http", - "http-body-util", -@@ -6639,25 +6757,16 @@ dependencies = [ - ] - - [[package]] --name = "wit-bindgen-rt" --version = "0.33.0" -+name = "wit-bindgen" -+version = "0.45.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" --dependencies = [ -- "bitflags 2.8.0", --] -- --[[package]] --name = "write16" --version = "1.0.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" -+checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" - - [[package]] - name = "writeable" --version = "0.5.5" -+version = "0.6.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -+checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" - - [[package]] - name = "x25519-dalek" -@@ -6673,18 +6782,18 @@ dependencies = [ - - [[package]] - name = "xshell" --version = "0.2.2" -+version = "0.2.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6d47097dc5c85234b1e41851b3422dd6d19b3befdd35b4ae5ce386724aeca981" -+checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" - dependencies = [ - "xshell-macros", - ] - - [[package]] - name = "xshell-macros" --version = "0.2.2" -+version = "0.2.7" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "88301b56c26dd9bf5c43d858538f82d6f3f7764767defbc5d34e59459901c41a" -+checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" - - [[package]] - name = "xtask" -@@ -6701,15 +6810,15 @@ dependencies = [ - - [[package]] - name = "xxhash-rust" --version = "0.8.11" -+version = "0.8.15" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" -+checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" - - [[package]] - name = "yoke" --version = "0.7.5" -+version = "0.8.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -+checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" - dependencies = [ - "serde", - "stable_deref_trait", -@@ -6719,9 +6828,9 @@ dependencies = [ - - [[package]] - name = "yoke-derive" --version = "0.7.5" -+version = "0.8.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -+checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" - dependencies = [ - "proc-macro2", - "quote", -@@ -6731,18 +6840,18 @@ dependencies = [ - - [[package]] - name = "zerocopy" --version = "0.7.35" -+version = "0.8.26" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -+checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" - dependencies = [ - "zerocopy-derive", - ] - - [[package]] - name = "zerocopy-derive" --version = "0.7.35" -+version = "0.8.26" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -+checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" - dependencies = [ - "proc-macro2", - "quote", -@@ -6751,18 +6860,18 @@ dependencies = [ - - [[package]] - name = "zerofrom" --version = "0.1.5" -+version = "0.1.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" - dependencies = [ - "zerofrom-derive", - ] - - [[package]] - name = "zerofrom-derive" --version = "0.1.5" -+version = "0.1.6" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" - dependencies = [ - "proc-macro2", - "quote", -@@ -6790,11 +6899,22 @@ dependencies = [ - "syn", - ] - +[[package]] -+name = "zerotrie" -+version = "0.2.2" ++name = "winnow" ++version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" ++checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ -+ "displaydoc", -+ "yoke", -+ "zerofrom", ++ "memchr", +] + [[package]] - name = "zerovec" --version = "0.10.4" -+version = "0.11.4" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -+checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" - dependencies = [ - "yoke", - "zerofrom", -@@ -6803,9 +6923,9 @@ dependencies = [ - - [[package]] - name = "zerovec-derive" --version = "0.10.3" -+version = "0.11.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -+checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" - dependencies = [ - "proc-macro2", - "quote", + name = "wiremock" + version = "0.6.5" diff --git a/Cargo.toml b/Cargo.toml -index b5cdd9945..d9f6f4dad 100644 +index 399e7b6f6..45cec4598 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -96,8 +96,8 @@ tracing = { version = "0.1.40", default-features = false, features = ["std"] } - tracing-core = "0.1.32" - tracing-subscriber = "0.3.18" +@@ -102,8 +102,8 @@ tracing-appender = "0.2.3" + tracing-core = "0.1.34" + tracing-subscriber = "0.3.20" unicode-normalization = "0.1.24" -uniffi = { version = "0.28.0" } -uniffi_bindgen = { version = "0.28.0" } +uniffi = { version = "0.29.4" } +uniffi_bindgen = { version = "0.29.4" } - url = "2.5.4" - uuid = "1.12.1" - vodozemac = { version = "0.9.0", features = ["insecure-pk-encryption"] } + url = "2.5.7" + uuid = "1.18.0" + vergen-gitcl = "1.0.8" diff --git a/bindings/matrix-sdk-ffi/src/api.udl b/bindings/matrix-sdk-ffi/src/api.udl index c7caa1afb..c5fa1c1ff 100644 --- a/bindings/matrix-sdk-ffi/src/api.udl diff --git a/src/generated/matrix_sdk.ts b/src/generated/matrix_sdk.ts index c48ecf7..3bf4b9a 100644 --- a/src/generated/matrix_sdk.ts +++ b/src/generated/matrix_sdk.ts @@ -206,6 +206,73 @@ const FfiConverterTypeRoomPowerLevelChanges = (() => { return new FFIConverter(); })(); +/** + * Information about the server vendor obtained from the federation API. + */ +export type ServerVendorInfo = { + /** + * The server name. + */ + serverName: string; + /** + * The server version. + */ + version: string; +}; + +/** + * Generated factory for {@link ServerVendorInfo} record objects. + */ +export const ServerVendorInfo = (() => { + const defaults = () => ({}); + const create = (() => { + return uniffiCreateRecord>( + defaults + ); + })(); + return Object.freeze({ + /** + * Create a frozen instance of {@link ServerVendorInfo}, with defaults specified + * in Rust, in the {@link matrix_sdk} crate. + */ + create, + + /** + * Create a frozen instance of {@link ServerVendorInfo}, with defaults specified + * in Rust, in the {@link matrix_sdk} crate. + */ + new: create, + + /** + * Defaults specified in the {@link matrix_sdk} crate. + */ + defaults: () => Object.freeze(defaults()) as Partial, + }); +})(); + +const FfiConverterTypeServerVendorInfo = (() => { + type TypeName = ServerVendorInfo; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + return { + serverName: FfiConverterString.read(from), + version: FfiConverterString.read(from), + }; + } + write(value: TypeName, into: RustBuffer): void { + FfiConverterString.write(value.serverName, into); + FfiConverterString.write(value.version, into); + } + allocationSize(value: TypeName): number { + return ( + FfiConverterString.allocationSize(value.serverName) + + FfiConverterString.allocationSize(value.version) + ); + } + } + return new FFIConverter(); +})(); + /** * Properties to create a new virtual Element Call widget. */ @@ -329,6 +396,11 @@ export type VirtualElementCallWidgetOptions = { * client. (used on ios & android) */ controlledMediaDevices: boolean; + /** + * Whether and what type of notification Element Call should send, when + * starting a call. + */ + sendNotificationType: NotificationType | undefined; }; /** @@ -388,6 +460,8 @@ const FfiConverterTypeVirtualElementCallWidgetOptions = (() => { sentryDsn: FfiConverterOptionalString.read(from), sentryEnvironment: FfiConverterOptionalString.read(from), controlledMediaDevices: FfiConverterBool.read(from), + sendNotificationType: + FfiConverterOptionalTypeNotificationType.read(from), }; } write(value: TypeName, into: RustBuffer): void { @@ -411,6 +485,10 @@ const FfiConverterTypeVirtualElementCallWidgetOptions = (() => { FfiConverterOptionalString.write(value.sentryDsn, into); FfiConverterOptionalString.write(value.sentryEnvironment, into); FfiConverterBool.write(value.controlledMediaDevices, into); + FfiConverterOptionalTypeNotificationType.write( + value.sendNotificationType, + into + ); } allocationSize(value: TypeName): number { return ( @@ -433,7 +511,10 @@ const FfiConverterTypeVirtualElementCallWidgetOptions = (() => { FfiConverterOptionalString.allocationSize(value.rageshakeSubmitUrl) + FfiConverterOptionalString.allocationSize(value.sentryDsn) + FfiConverterOptionalString.allocationSize(value.sentryEnvironment) + - FfiConverterBool.allocationSize(value.controlledMediaDevices) + FfiConverterBool.allocationSize(value.controlledMediaDevices) + + FfiConverterOptionalTypeNotificationType.allocationSize( + value.sendNotificationType + ) ); } } @@ -818,6 +899,49 @@ const FfiConverterTypeIntent = (() => { return new FFIConverter(); })(); +/** + * Types of call notifications. + */ +export enum NotificationType { + /** + * The receiving client should display a visual notification. + */ + Notification, + /** + * The receiving client should ring with an audible sound. + */ + Ring, +} + +const FfiConverterTypeNotificationType = (() => { + const ordinalConverter = FfiConverterInt32; + type TypeName = NotificationType; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + switch (ordinalConverter.read(from)) { + case 1: + return NotificationType.Notification; + case 2: + return NotificationType.Ring; + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + write(value: TypeName, into: RustBuffer): void { + switch (value) { + case NotificationType.Notification: + return ordinalConverter.write(1, into); + case NotificationType.Ring: + return ordinalConverter.write(2, into); + } + } + allocationSize(value: TypeName): number { + return ordinalConverter.allocationSize(0); + } + } + return new FFIConverter(); +})(); + /** * Current state of a [`Paginator`]. */ @@ -1224,6 +1348,19 @@ const FfiConverterTypeQRCodeLoginError = (() => { * The role of a member in a room. */ export enum RoomMemberRole { + /** + * The member is a creator. + * + * A creator has an infinite power level and cannot be demoted, so this + * role is immutable. A room can have several creators. + * + * It is available in room versions where + * `explicitly_privilege_room_creators` in [`AuthorizationRules`] is set to + * `true`. + * + * [`AuthorizationRules`]: ruma::room_version_rules::AuthorizationRules + */ + Creator, /** * The member is an administrator. */ @@ -1245,10 +1382,12 @@ const FfiConverterTypeRoomMemberRole = (() => { read(from: RustBuffer): TypeName { switch (ordinalConverter.read(from)) { case 1: - return RoomMemberRole.Administrator; + return RoomMemberRole.Creator; case 2: - return RoomMemberRole.Moderator; + return RoomMemberRole.Administrator; case 3: + return RoomMemberRole.Moderator; + case 4: return RoomMemberRole.User; default: throw new UniffiInternalError.UnexpectedEnumCase(); @@ -1256,12 +1395,14 @@ const FfiConverterTypeRoomMemberRole = (() => { } write(value: TypeName, into: RustBuffer): void { switch (value) { - case RoomMemberRole.Administrator: + case RoomMemberRole.Creator: return ordinalConverter.write(1, into); - case RoomMemberRole.Moderator: + case RoomMemberRole.Administrator: return ordinalConverter.write(2, into); - case RoomMemberRole.User: + case RoomMemberRole.Moderator: return ordinalConverter.write(3, into); + case RoomMemberRole.User: + return ordinalConverter.write(4, into); } } allocationSize(value: TypeName): number { @@ -1583,6 +1724,11 @@ const FfiConverterOptionalTypeIntent = new FfiConverterOptional( FfiConverterTypeIntent ); +// FfiConverter for NotificationType | undefined +const FfiConverterOptionalTypeNotificationType = new FfiConverterOptional( + FfiConverterTypeNotificationType +); + /** * This should be called before anything else. * @@ -1622,12 +1768,14 @@ export default Object.freeze({ FfiConverterTypeEncryptionSystem, FfiConverterTypeHeaderStyle, FfiConverterTypeIntent, + FfiConverterTypeNotificationType, FfiConverterTypeOAuthAuthorizationData, FfiConverterTypePaginatorState, FfiConverterTypeQRCodeLoginError, FfiConverterTypeRoomMemberRole, FfiConverterTypeRoomPaginationStatus, FfiConverterTypeRoomPowerLevelChanges, + FfiConverterTypeServerVendorInfo, FfiConverterTypeVirtualElementCallWidgetOptions, }, }); diff --git a/src/generated/matrix_sdk_ffi-ffi.ts b/src/generated/matrix_sdk_ffi-ffi.ts index 6a0d62a..55fc4a5 100644 --- a/src/generated/matrix_sdk_ffi-ffi.ts +++ b/src/generated/matrix_sdk_ffi-ffi.ts @@ -90,6 +90,11 @@ interface NativeModuleInterface { ptr: bigint, enable: number ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + ptr: bigint, + enable: number, + uniffi_out_err: UniffiRustCallStatus + ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_encryption( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -217,6 +222,12 @@ interface NativeModuleInterface { ptr: bigint, callbackUrl: Uint8Array ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + ptr: bigint, + qrCodeData: bigint, + oidcConfiguration: Uint8Array, + progressListener: bigint + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_logout(ptr: bigint): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_notification_client( ptr: bigint, @@ -275,6 +286,9 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + ptr: bigint + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_session( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -322,6 +336,10 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_space_service( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( ptr: bigint, redirectUrl: Uint8Array, @@ -373,7 +391,9 @@ interface NativeModuleInterface { ptr: bigint, oidcConfiguration: Uint8Array, prompt: Uint8Array, - loginHint: Uint8Array + loginHint: Uint8Array, + deviceId: Uint8Array, + additionalScopes: Uint8Array ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_user_id( ptr: bigint, @@ -415,12 +435,6 @@ interface NativeModuleInterface { uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(ptr: bigint): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - ptr: bigint, - qrCodeData: bigint, - oidcConfiguration: Uint8Array, - progressListener: bigint - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( ptr: bigint, holderName: Uint8Array, @@ -525,6 +539,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( ptr: bigint, enabled: number, + threadSubscriptions: number, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( @@ -645,6 +660,10 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): number; ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -975,6 +994,10 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + ptr: bigint, + threadRootEventId: Uint8Array + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_forget(ptr: bigint): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( ptr: bigint @@ -1080,6 +1103,9 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + ptr: bigint + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1132,16 +1158,6 @@ interface NativeModuleInterface { draft: Uint8Array, threadRoot: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - ptr: bigint, - callId: Uint8Array, - application: Uint8Array, - notifyType: Uint8Array, - mentions: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - ptr: bigint - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( ptr: bigint, geoUri: Uint8Array @@ -1165,6 +1181,11 @@ interface NativeModuleInterface { ptr: bigint, name: Uint8Array ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + ptr: bigint, + threadRootEventId: Uint8Array, + subscribed: number + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_topic( ptr: bigint, topic: Uint8Array @@ -1628,6 +1649,54 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + ptr: bigint, + listener: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + ptr: bigint, + listener: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + ptr: bigint, + spaceId: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + ptr: bigint, + listener: bigint + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_span( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1683,6 +1752,9 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + ptr: bigint + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1833,14 +1905,12 @@ interface NativeModuleInterface { ptr: bigint, params: Uint8Array, audioInfo: Uint8Array, - progressWatcher: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( ptr: bigint, params: Uint8Array, fileInfo: Uint8Array, - progressWatcher: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( @@ -1852,9 +1922,8 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( ptr: bigint, params: Uint8Array, - thumbnailPath: Uint8Array, + thumbnailSource: Uint8Array, imageInfo: Uint8Array, - progressWatcher: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( @@ -1864,7 +1933,7 @@ interface NativeModuleInterface { description: Uint8Array, zoomLevel: Uint8Array, assetType: Uint8Array, - replyParams: Uint8Array + repliedToEventId: Uint8Array ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( ptr: bigint, @@ -1879,14 +1948,13 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( ptr: bigint, msg: bigint, - replyParams: Uint8Array + eventId: Uint8Array ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( ptr: bigint, params: Uint8Array, - thumbnailPath: Uint8Array, + thumbnailSource: Uint8Array, videoInfo: Uint8Array, - progressWatcher: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( @@ -1894,7 +1962,6 @@ interface NativeModuleInterface { params: Uint8Array, audioInfo: Uint8Array, waveform: Uint8Array, - progressWatcher: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( @@ -1910,50 +1977,6 @@ interface NativeModuleInterface { ptr: bigint, eventId: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_timelinediff( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -2169,6 +2192,15 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( vtable: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + vtable: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + vtable: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + vtable: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener + ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( vtable: UniffiVTableCallbackInterfaceSyncServiceStateObserver ): void; @@ -2283,9 +2315,9 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( role: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; + ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - powerLevel: bigint, + powerLevel: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u8( @@ -2470,6 +2502,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_device_id(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_display_name(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_encryption(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room(): number; @@ -2500,6 +2533,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_logout(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_notification_client(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event(): number; @@ -2514,6 +2548,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_rooms(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_search_users(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_session(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate(): number; @@ -2524,6 +2559,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_space_service(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config(): number; @@ -2542,7 +2578,6 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh(): number; @@ -2591,6 +2626,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel(): number; @@ -2649,6 +2685,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_forget(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility(): number; @@ -2682,6 +2719,7 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_members(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_membership(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_preview_room(): number; @@ -2696,13 +2734,12 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_room_info(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_raw(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_name(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share(): number; @@ -2789,11 +2826,20 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_start(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_state(): number; @@ -2835,15 +2881,6 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id(): number; @@ -2904,6 +2941,9 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(): number; @@ -3023,6 +3063,14 @@ interface NativeModuleInterface { pointer: bigint, uniffi_out_err: UniffiRustCallStatus ): UniffiRustArcPtr; + ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiRustArcPtr; + ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiRustArcPtr; ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus @@ -3051,10 +3099,6 @@ interface NativeModuleInterface { pointer: bigint, uniffi_out_err: UniffiRustCallStatus ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus @@ -3332,6 +3376,18 @@ type UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 = ( type UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 = ( uniffiHandle: bigint ) => UniffiResult; +type UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 = ( + uniffiHandle: bigint, + rooms: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 = ( + uniffiHandle: bigint, + paginationState: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 = ( + uniffiHandle: bigint, + roomUpdates: Uint8Array +) => UniffiResult; type UniffiCallbackInterfaceSyncServiceStateObserverMethod0 = ( uniffiHandle: bigint, state: Uint8Array @@ -3465,6 +3521,19 @@ export type UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate = didFinish: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6; uniffiFree: UniffiCallbackInterfaceFree; }; +export type UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener = { + onUpdate: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0; + uniffiFree: UniffiCallbackInterfaceFree; +}; +export type UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener = + { + onUpdate: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0; + uniffiFree: UniffiCallbackInterfaceFree; + }; +export type UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener = { + onUpdate: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0; + uniffiFree: UniffiCallbackInterfaceFree; +}; export type UniffiVTableCallbackInterfaceSyncServiceStateObserver = { onUpdate: UniffiCallbackInterfaceSyncServiceStateObserverMethod0; uniffiFree: UniffiCallbackInterfaceFree; diff --git a/src/generated/matrix_sdk_ffi.ts b/src/generated/matrix_sdk_ffi.ts index 6d0bbfe..b1cb762 100644 --- a/src/generated/matrix_sdk_ffi.ts +++ b/src/generated/matrix_sdk_ffi.ts @@ -54,6 +54,9 @@ import nativeModule, { type UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener, type UniffiVTableCallbackInterfaceSendQueueRoomErrorListener, type UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate, + type UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener, + type UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener, + type UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener, type UniffiVTableCallbackInterfaceSyncServiceStateObserver, type UniffiVTableCallbackInterfaceTimelineListener, type UniffiVTableCallbackInterfaceTypingNotificationsListener, @@ -64,6 +67,7 @@ import nativeModule, { import { type OAuthAuthorizationDataInterface, type RoomPowerLevelChanges, + type ServerVendorInfo, type VirtualElementCallWidgetOptions, BackupDownloadStrategy, RoomMemberRole, @@ -77,7 +81,11 @@ import { IdentityState, UtdCause, } from './matrix_sdk_crypto'; -import { EventItemOrigin, RoomPinnedEventsChange } from './matrix_sdk_ui'; +import { + EventItemOrigin, + RoomPinnedEventsChange, + SpaceRoomListPaginationState, +} from './matrix_sdk_ui'; import { type FfiConverter, type UniffiByteArray, @@ -134,6 +142,7 @@ const { FfiConverterTypeRoomMemberRole, FfiConverterTypeRoomPaginationStatus, FfiConverterTypeRoomPowerLevelChanges, + FfiConverterTypeServerVendorInfo, FfiConverterTypeVirtualElementCallWidgetOptions, } = uniffiMatrixSdkModule.converters; const { @@ -151,6 +160,7 @@ const { const { FfiConverterTypeEventItemOrigin, FfiConverterTypeRoomPinnedEventsChange, + FfiConverterTypeSpaceRoomListPaginationState, } = uniffiMatrixSdkUiModule.converters; const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 })); @@ -623,11 +633,19 @@ export function sdkGitSha(): string { ) ); } +/** + * Get the suggested power level for the given role. + * + * Returns an error if the value of the power level is unsupported. + */ export function suggestedPowerLevelForRole( role: RoomMemberRole -): /*i64*/ bigint { - return FfiConverterInt64.lift( - uniffiCaller.rustCall( +): PowerLevel /*throws*/ { + return FfiConverterTypePowerLevel.lift( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ), /*caller:*/ (callStatus) => { return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( FfiConverterTypeRoomMemberRole.lower(role), @@ -638,14 +656,23 @@ export function suggestedPowerLevelForRole( ) ); } +/** + * Get the suggested role for the given power level. + * + * Returns an error if the value of the power level is out of range for numbers + * accepted in canonical JSON. + */ export function suggestedRoleForPowerLevel( - powerLevel: /*i64*/ bigint -): RoomMemberRole { + powerLevel: PowerLevel +): RoomMemberRole /*throws*/ { return FfiConverterTypeRoomMemberRole.lift( - uniffiCaller.rustCall( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ), /*caller:*/ (callStatus) => { return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - FfiConverterInt64.lower(powerLevel), + FfiConverterTypePowerLevel.lower(powerLevel), callStatus ); }, @@ -2070,6 +2097,155 @@ const uniffiCallbackInterfaceSessionVerificationControllerDelegate: { const FfiConverterTypeSessionVerificationControllerDelegate = new FfiConverterCallback(); +export interface SpaceRoomListEntriesListener { + onUpdate(rooms: Array): void; +} + +// Put the implementation in a struct so we don't pollute the top-level namespace +const uniffiCallbackInterfaceSpaceRoomListEntriesListener: { + vtable: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener; + register: () => void; +} = { + // Create the VTable using a series of closures. + // ts automatically converts these into C callback functions. + vtable: { + onUpdate: (uniffiHandle: bigint, rooms: Uint8Array) => { + const uniffiMakeCall = (): void => { + const jsCallback = + FfiConverterTypeSpaceRoomListEntriesListener.lift(uniffiHandle); + return jsCallback.onUpdate( + FfiConverterArrayTypeSpaceListUpdate.lift(rooms) + ); + }; + const uniffiResult = UniffiResult.ready(); + const uniffiHandleSuccess = (obj: any) => {}; + const uniffiHandleError = (code: number, errBuf: UniffiByteArray) => { + UniffiResult.writeError(uniffiResult, code, errBuf); + }; + uniffiTraitInterfaceCall( + /*makeCall:*/ uniffiMakeCall, + /*handleSuccess:*/ uniffiHandleSuccess, + /*handleError:*/ uniffiHandleError, + /*lowerString:*/ FfiConverterString.lower + ); + return uniffiResult; + }, + uniffiFree: (uniffiHandle: UniffiHandle): void => { + // SpaceRoomListEntriesListener: this will throw a stale handle error if the handle isn't found. + FfiConverterTypeSpaceRoomListEntriesListener.drop(uniffiHandle); + }, + }, + register: () => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( + uniffiCallbackInterfaceSpaceRoomListEntriesListener.vtable + ); + }, +}; + +// FfiConverter protocol for callback interfaces +const FfiConverterTypeSpaceRoomListEntriesListener = + new FfiConverterCallback(); + +export interface SpaceRoomListPaginationStateListener { + onUpdate(paginationState: SpaceRoomListPaginationState): void; +} + +// Put the implementation in a struct so we don't pollute the top-level namespace +const uniffiCallbackInterfaceSpaceRoomListPaginationStateListener: { + vtable: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener; + register: () => void; +} = { + // Create the VTable using a series of closures. + // ts automatically converts these into C callback functions. + vtable: { + onUpdate: (uniffiHandle: bigint, paginationState: Uint8Array) => { + const uniffiMakeCall = (): void => { + const jsCallback = + FfiConverterTypeSpaceRoomListPaginationStateListener.lift( + uniffiHandle + ); + return jsCallback.onUpdate( + FfiConverterTypeSpaceRoomListPaginationState.lift(paginationState) + ); + }; + const uniffiResult = UniffiResult.ready(); + const uniffiHandleSuccess = (obj: any) => {}; + const uniffiHandleError = (code: number, errBuf: UniffiByteArray) => { + UniffiResult.writeError(uniffiResult, code, errBuf); + }; + uniffiTraitInterfaceCall( + /*makeCall:*/ uniffiMakeCall, + /*handleSuccess:*/ uniffiHandleSuccess, + /*handleError:*/ uniffiHandleError, + /*lowerString:*/ FfiConverterString.lower + ); + return uniffiResult; + }, + uniffiFree: (uniffiHandle: UniffiHandle): void => { + // SpaceRoomListPaginationStateListener: this will throw a stale handle error if the handle isn't found. + FfiConverterTypeSpaceRoomListPaginationStateListener.drop(uniffiHandle); + }, + }, + register: () => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( + uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.vtable + ); + }, +}; + +// FfiConverter protocol for callback interfaces +const FfiConverterTypeSpaceRoomListPaginationStateListener = + new FfiConverterCallback(); + +export interface SpaceServiceJoinedSpacesListener { + onUpdate(roomUpdates: Array): void; +} + +// Put the implementation in a struct so we don't pollute the top-level namespace +const uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener: { + vtable: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener; + register: () => void; +} = { + // Create the VTable using a series of closures. + // ts automatically converts these into C callback functions. + vtable: { + onUpdate: (uniffiHandle: bigint, roomUpdates: Uint8Array) => { + const uniffiMakeCall = (): void => { + const jsCallback = + FfiConverterTypeSpaceServiceJoinedSpacesListener.lift(uniffiHandle); + return jsCallback.onUpdate( + FfiConverterArrayTypeSpaceListUpdate.lift(roomUpdates) + ); + }; + const uniffiResult = UniffiResult.ready(); + const uniffiHandleSuccess = (obj: any) => {}; + const uniffiHandleError = (code: number, errBuf: UniffiByteArray) => { + UniffiResult.writeError(uniffiResult, code, errBuf); + }; + uniffiTraitInterfaceCall( + /*makeCall:*/ uniffiMakeCall, + /*handleSuccess:*/ uniffiHandleSuccess, + /*handleError:*/ uniffiHandleError, + /*lowerString:*/ FfiConverterString.lower + ); + return uniffiResult; + }, + uniffiFree: (uniffiHandle: UniffiHandle): void => { + // SpaceServiceJoinedSpacesListener: this will throw a stale handle error if the handle isn't found. + FfiConverterTypeSpaceServiceJoinedSpacesListener.drop(uniffiHandle); + }, + }, + register: () => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( + uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.vtable + ); + }, +}; + +// FfiConverter protocol for callback interfaces +const FfiConverterTypeSpaceServiceJoinedSpacesListener = + new FfiConverterCallback(); + export interface SyncServiceStateObserver { onUpdate(state: SyncServiceState): void; } @@ -2120,7 +2296,7 @@ const FfiConverterTypeSyncServiceStateObserver = new FfiConverterCallback(); export interface TimelineListener { - onUpdate(diff: Array): void; + onUpdate(diff: Array): void; } // Put the implementation in a struct so we don't pollute the top-level namespace @@ -2364,6 +2540,79 @@ const uniffiCallbackInterfaceWidgetCapabilitiesProvider: { const FfiConverterTypeWidgetCapabilitiesProvider = new FfiConverterCallback(); +/** + * Progress of an operation in abstract units. + * + * Contrary to [`TransmissionProgress`], this allows tracking the progress + * of sending or receiving a payload in estimated pseudo units representing a + * percentage. This is helpful in cases where the exact progress in bytes isn't + * known, for instance, because encryption (which changes the size) happens on + * the fly. + */ +export type AbstractProgress = { + /** + * How many units were already transferred. + */ + current: /*u64*/ bigint; + /** + * How many units there are in total. + */ + total: /*u64*/ bigint; +}; + +/** + * Generated factory for {@link AbstractProgress} record objects. + */ +export const AbstractProgress = (() => { + const defaults = () => ({}); + const create = (() => { + return uniffiCreateRecord>( + defaults + ); + })(); + return Object.freeze({ + /** + * Create a frozen instance of {@link AbstractProgress}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + create, + + /** + * Create a frozen instance of {@link AbstractProgress}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + new: create, + + /** + * Defaults specified in the {@link matrix_sdk_ffi} crate. + */ + defaults: () => Object.freeze(defaults()) as Partial, + }); +})(); + +const FfiConverterTypeAbstractProgress = (() => { + type TypeName = AbstractProgress; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + return { + current: FfiConverterUInt64.read(from), + total: FfiConverterUInt64.read(from), + }; + } + write(value: TypeName, into: RustBuffer): void { + FfiConverterUInt64.write(value.current, into); + FfiConverterUInt64.write(value.total, into); + } + allocationSize(value: TypeName): number { + return ( + FfiConverterUInt64.allocationSize(value.current) + + FfiConverterUInt64.allocationSize(value.total) + ); + } + } + return new FFIConverter(); +})(); + export type AudioInfo = { duration: UniffiDuration | undefined; size: /*u64*/ bigint | undefined; @@ -3459,9 +3708,9 @@ export type GalleryUploadParameters = { */ mentions: Mentions | undefined; /** - * Optional parameters for sending the media as (threaded) reply. + * Optional Event ID to reply to. */ - replyParams: ReplyParameters | undefined; + inReplyTo: string | undefined; }; /** @@ -3504,14 +3753,14 @@ const FfiConverterTypeGalleryUploadParameters = (() => { caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), mentions: FfiConverterOptionalTypeMentions.read(from), - replyParams: FfiConverterOptionalTypeReplyParameters.read(from), + inReplyTo: FfiConverterOptionalString.read(from), }; } write(value: TypeName, into: RustBuffer): void { FfiConverterOptionalString.write(value.caption, into); FfiConverterOptionalTypeFormattedBody.write(value.formattedCaption, into); FfiConverterOptionalTypeMentions.write(value.mentions, into); - FfiConverterOptionalTypeReplyParameters.write(value.replyParams, into); + FfiConverterOptionalString.write(value.inReplyTo, into); } allocationSize(value: TypeName): number { return ( @@ -3520,9 +3769,7 @@ const FfiConverterTypeGalleryUploadParameters = (() => { value.formattedCaption ) + FfiConverterOptionalTypeMentions.allocationSize(value.mentions) + - FfiConverterOptionalTypeReplyParameters.allocationSize( - value.replyParams - ) + FfiConverterOptionalString.allocationSize(value.inReplyTo) ); } } @@ -3866,64 +4113,6 @@ const FfiConverterTypeImageMessageContent = (() => { return new FFIConverter(); })(); -export type InsertData = { - index: /*u32*/ number; - item: TimelineItemInterface; -}; - -/** - * Generated factory for {@link InsertData} record objects. - */ -export const InsertData = (() => { - const defaults = () => ({}); - const create = (() => { - return uniffiCreateRecord>( - defaults - ); - })(); - return Object.freeze({ - /** - * Create a frozen instance of {@link InsertData}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - create, - - /** - * Create a frozen instance of {@link InsertData}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - new: create, - - /** - * Defaults specified in the {@link matrix_sdk_ffi} crate. - */ - defaults: () => Object.freeze(defaults()) as Partial, - }); -})(); - -const FfiConverterTypeInsertData = (() => { - type TypeName = InsertData; - class FFIConverter extends AbstractFfiConverterByteArray { - read(from: RustBuffer): TypeName { - return { - index: FfiConverterUInt32.read(from), - item: FfiConverterTypeTimelineItem.read(from), - }; - } - write(value: TypeName, into: RustBuffer): void { - FfiConverterUInt32.write(value.index, into); - FfiConverterTypeTimelineItem.write(value.item, into); - } - allocationSize(value: TypeName): number { - return ( - FfiConverterUInt32.allocationSize(value.index) + - FfiConverterTypeTimelineItem.allocationSize(value.item) - ); - } - } - return new FFIConverter(); -})(); - /** * An FFI representation of a request to join a room. */ @@ -4322,11 +4511,11 @@ export type MediaPreviewConfig = { /** * The media previews setting for the user. */ - mediaPreviews: MediaPreviews; + mediaPreviews: MediaPreviews | undefined; /** * The invite avatars setting for the user. */ - inviteAvatars: InviteAvatars; + inviteAvatars: InviteAvatars | undefined; }; /** @@ -4364,18 +4553,93 @@ const FfiConverterTypeMediaPreviewConfig = (() => { class FFIConverter extends AbstractFfiConverterByteArray { read(from: RustBuffer): TypeName { return { - mediaPreviews: FfiConverterTypeMediaPreviews.read(from), - inviteAvatars: FfiConverterTypeInviteAvatars.read(from), + mediaPreviews: FfiConverterOptionalTypeMediaPreviews.read(from), + inviteAvatars: FfiConverterOptionalTypeInviteAvatars.read(from), + }; + } + write(value: TypeName, into: RustBuffer): void { + FfiConverterOptionalTypeMediaPreviews.write(value.mediaPreviews, into); + FfiConverterOptionalTypeInviteAvatars.write(value.inviteAvatars, into); + } + allocationSize(value: TypeName): number { + return ( + FfiConverterOptionalTypeMediaPreviews.allocationSize( + value.mediaPreviews + ) + + FfiConverterOptionalTypeInviteAvatars.allocationSize( + value.inviteAvatars + ) + ); + } + } + return new FFIConverter(); +})(); + +/** + * This type represents the progress of a media (consisting of a file and + * possibly a thumbnail) being uploaded. + */ +export type MediaUploadProgress = { + /** + * The index of the media within the transaction. A file and its + * thumbnail share the same index. Will always be 0 for non-gallery + * media uploads. + */ + index: /*u64*/ bigint; + /** + * The current combined upload progress for both the file and, + * if it exists, its thumbnail. + */ + progress: AbstractProgress; +}; + +/** + * Generated factory for {@link MediaUploadProgress} record objects. + */ +export const MediaUploadProgress = (() => { + const defaults = () => ({}); + const create = (() => { + return uniffiCreateRecord>( + defaults + ); + })(); + return Object.freeze({ + /** + * Create a frozen instance of {@link MediaUploadProgress}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + create, + + /** + * Create a frozen instance of {@link MediaUploadProgress}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + new: create, + + /** + * Defaults specified in the {@link matrix_sdk_ffi} crate. + */ + defaults: () => Object.freeze(defaults()) as Partial, + }); +})(); + +const FfiConverterTypeMediaUploadProgress = (() => { + type TypeName = MediaUploadProgress; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + return { + index: FfiConverterUInt64.read(from), + progress: FfiConverterTypeAbstractProgress.read(from), }; } write(value: TypeName, into: RustBuffer): void { - FfiConverterTypeMediaPreviews.write(value.mediaPreviews, into); - FfiConverterTypeInviteAvatars.write(value.inviteAvatars, into); + FfiConverterUInt64.write(value.index, into); + FfiConverterTypeAbstractProgress.write(value.progress, into); } allocationSize(value: TypeName): number { return ( - FfiConverterTypeMediaPreviews.allocationSize(value.mediaPreviews) + - FfiConverterTypeInviteAvatars.allocationSize(value.inviteAvatars) + FfiConverterUInt64.allocationSize(value.index) + + FfiConverterTypeAbstractProgress.allocationSize(value.progress) ); } } @@ -5567,10 +5831,6 @@ export type PredecessorRoom = { * The ID of the replacement room. */ roomId: string; - /** - * The event ID of the last known event in the predecesssor room. - */ - lastEventId: string; }; /** @@ -5609,18 +5869,13 @@ const FfiConverterTypePredecessorRoom = (() => { read(from: RustBuffer): TypeName { return { roomId: FfiConverterString.read(from), - lastEventId: FfiConverterString.read(from), }; } write(value: TypeName, into: RustBuffer): void { FfiConverterString.write(value.roomId, into); - FfiConverterString.write(value.lastEventId, into); } allocationSize(value: TypeName): number { - return ( - FfiConverterString.allocationSize(value.roomId) + - FfiConverterString.allocationSize(value.lastEventId) - ); + return FfiConverterString.allocationSize(value.roomId); } } return new FFIConverter(); @@ -5848,78 +6103,6 @@ const FfiConverterTypeReceipt = (() => { return new FFIConverter(); })(); -export type ReplyParameters = { - /** - * The ID of the event to reply to. - */ - eventId: string; - /** - * Whether to enforce a thread relation. - */ - enforceThread: boolean; - /** - * If enforcing a threaded relation, whether the message is a reply on a - * thread. - */ - replyWithinThread: boolean; -}; - -/** - * Generated factory for {@link ReplyParameters} record objects. - */ -export const ReplyParameters = (() => { - const defaults = () => ({}); - const create = (() => { - return uniffiCreateRecord>( - defaults - ); - })(); - return Object.freeze({ - /** - * Create a frozen instance of {@link ReplyParameters}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - create, - - /** - * Create a frozen instance of {@link ReplyParameters}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - new: create, - - /** - * Defaults specified in the {@link matrix_sdk_ffi} crate. - */ - defaults: () => Object.freeze(defaults()) as Partial, - }); -})(); - -const FfiConverterTypeReplyParameters = (() => { - type TypeName = ReplyParameters; - class FFIConverter extends AbstractFfiConverterByteArray { - read(from: RustBuffer): TypeName { - return { - eventId: FfiConverterString.read(from), - enforceThread: FfiConverterBool.read(from), - replyWithinThread: FfiConverterBool.read(from), - }; - } - write(value: TypeName, into: RustBuffer): void { - FfiConverterString.write(value.eventId, into); - FfiConverterBool.write(value.enforceThread, into); - FfiConverterBool.write(value.replyWithinThread, into); - } - allocationSize(value: TypeName): number { - return ( - FfiConverterString.allocationSize(value.eventId) + - FfiConverterBool.allocationSize(value.enforceThread) + - FfiConverterBool.allocationSize(value.replyWithinThread) - ); - } - } - return new FFIConverter(); -})(); - /** * The config to use for HTTP requests by default in this client. */ @@ -6152,60 +6335,6 @@ const FfiConverterTypeRoomDescription = (() => { return new FFIConverter(); })(); -export type RoomDirectorySearchEntriesResult = { - entriesStream: TaskHandleInterface; -}; - -/** - * Generated factory for {@link RoomDirectorySearchEntriesResult} record objects. - */ -export const RoomDirectorySearchEntriesResult = (() => { - const defaults = () => ({}); - const create = (() => { - return uniffiCreateRecord< - RoomDirectorySearchEntriesResult, - ReturnType - >(defaults); - })(); - return Object.freeze({ - /** - * Create a frozen instance of {@link RoomDirectorySearchEntriesResult}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - create, - - /** - * Create a frozen instance of {@link RoomDirectorySearchEntriesResult}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ - new: create, - - /** - * Defaults specified in the {@link matrix_sdk_ffi} crate. - */ - defaults: () => - Object.freeze(defaults()) as Partial, - }); -})(); - -const FfiConverterTypeRoomDirectorySearchEntriesResult = (() => { - type TypeName = RoomDirectorySearchEntriesResult; - class FFIConverter extends AbstractFfiConverterByteArray { - read(from: RustBuffer): TypeName { - return { - entriesStream: FfiConverterTypeTaskHandle.read(from), - }; - } - write(value: TypeName, into: RustBuffer): void { - FfiConverterTypeTaskHandle.write(value.entriesStream, into); - } - allocationSize(value: TypeName): number { - return FfiConverterTypeTaskHandle.allocationSize(value.entriesStream); - } - } - return new FFIConverter(); -})(); - /** * Information about a member considered to be a room hero. */ @@ -6281,7 +6410,7 @@ const FfiConverterTypeRoomHero = (() => { export type RoomInfo = { id: string; encryptionState: EncryptionState; - creator: string | undefined; + creators: Array | undefined; /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. @@ -6364,6 +6493,15 @@ export type RoomInfo = { * Can be missing if the room power levels event is missing from the store. */ powerLevels: RoomPowerLevelsInterface | undefined; + /** + * This room's version. + */ + roomVersion: string | undefined; + /** + * Whether creators are privileged over every other user (have infinite + * power level). + */ + privilegedCreatorsRole: boolean; }; /** @@ -6401,7 +6539,7 @@ const FfiConverterTypeRoomInfo = (() => { return { id: FfiConverterString.read(from), encryptionState: FfiConverterTypeEncryptionState.read(from), - creator: FfiConverterOptionalString.read(from), + creators: FfiConverterOptionalArrayString.read(from), displayName: FfiConverterOptionalString.read(from), rawName: FfiConverterOptionalString.read(from), topic: FfiConverterOptionalString.read(from), @@ -6433,12 +6571,14 @@ const FfiConverterTypeRoomInfo = (() => { joinRule: FfiConverterOptionalTypeJoinRule.read(from), historyVisibility: FfiConverterTypeRoomHistoryVisibility.read(from), powerLevels: FfiConverterOptionalTypeRoomPowerLevels.read(from), + roomVersion: FfiConverterOptionalString.read(from), + privilegedCreatorsRole: FfiConverterBool.read(from), }; } write(value: TypeName, into: RustBuffer): void { FfiConverterString.write(value.id, into); FfiConverterTypeEncryptionState.write(value.encryptionState, into); - FfiConverterOptionalString.write(value.creator, into); + FfiConverterOptionalArrayString.write(value.creators, into); FfiConverterOptionalString.write(value.displayName, into); FfiConverterOptionalString.write(value.rawName, into); FfiConverterOptionalString.write(value.topic, into); @@ -6475,12 +6615,14 @@ const FfiConverterTypeRoomInfo = (() => { into ); FfiConverterOptionalTypeRoomPowerLevels.write(value.powerLevels, into); + FfiConverterOptionalString.write(value.roomVersion, into); + FfiConverterBool.write(value.privilegedCreatorsRole, into); } allocationSize(value: TypeName): number { return ( FfiConverterString.allocationSize(value.id) + FfiConverterTypeEncryptionState.allocationSize(value.encryptionState) + - FfiConverterOptionalString.allocationSize(value.creator) + + FfiConverterOptionalArrayString.allocationSize(value.creators) + FfiConverterOptionalString.allocationSize(value.displayName) + FfiConverterOptionalString.allocationSize(value.rawName) + FfiConverterOptionalString.allocationSize(value.topic) + @@ -6520,7 +6662,9 @@ const FfiConverterTypeRoomInfo = (() => { ) + FfiConverterOptionalTypeRoomPowerLevels.allocationSize( value.powerLevels - ) + ) + + FfiConverterOptionalString.allocationSize(value.roomVersion) + + FfiConverterBool.allocationSize(value.privilegedCreatorsRole) ); } } @@ -6593,8 +6737,8 @@ export type RoomMember = { avatarUrl: string | undefined; membership: MembershipState; isNameAmbiguous: boolean; - powerLevel: /*i64*/ bigint; - normalizedPowerLevel: /*i64*/ bigint; + powerLevel: PowerLevel; + normalizedPowerLevel: PowerLevel; isIgnored: boolean; suggestedRoleForPowerLevel: RoomMemberRole; membershipChangeReason: string | undefined; @@ -6640,8 +6784,8 @@ const FfiConverterTypeRoomMember = (() => { avatarUrl: FfiConverterOptionalString.read(from), membership: FfiConverterTypeMembershipState.read(from), isNameAmbiguous: FfiConverterBool.read(from), - powerLevel: FfiConverterInt64.read(from), - normalizedPowerLevel: FfiConverterInt64.read(from), + powerLevel: FfiConverterTypePowerLevel.read(from), + normalizedPowerLevel: FfiConverterTypePowerLevel.read(from), isIgnored: FfiConverterBool.read(from), suggestedRoleForPowerLevel: FfiConverterTypeRoomMemberRole.read(from), membershipChangeReason: FfiConverterOptionalString.read(from), @@ -6653,8 +6797,8 @@ const FfiConverterTypeRoomMember = (() => { FfiConverterOptionalString.write(value.avatarUrl, into); FfiConverterTypeMembershipState.write(value.membership, into); FfiConverterBool.write(value.isNameAmbiguous, into); - FfiConverterInt64.write(value.powerLevel, into); - FfiConverterInt64.write(value.normalizedPowerLevel, into); + FfiConverterTypePowerLevel.write(value.powerLevel, into); + FfiConverterTypePowerLevel.write(value.normalizedPowerLevel, into); FfiConverterBool.write(value.isIgnored, into); FfiConverterTypeRoomMemberRole.write( value.suggestedRoleForPowerLevel, @@ -6669,8 +6813,8 @@ const FfiConverterTypeRoomMember = (() => { FfiConverterOptionalString.allocationSize(value.avatarUrl) + FfiConverterTypeMembershipState.allocationSize(value.membership) + FfiConverterBool.allocationSize(value.isNameAmbiguous) + - FfiConverterInt64.allocationSize(value.powerLevel) + - FfiConverterInt64.allocationSize(value.normalizedPowerLevel) + + FfiConverterTypePowerLevel.allocationSize(value.powerLevel) + + FfiConverterTypePowerLevel.allocationSize(value.normalizedPowerLevel) + FfiConverterBool.allocationSize(value.isIgnored) + FfiConverterTypeRoomMemberRole.allocationSize( value.suggestedRoleForPowerLevel @@ -7494,28 +7638,52 @@ const FfiConverterTypeSessionVerificationRequestDetails = (() => { return new FFIConverter(); })(); -export type SetData = { - index: /*u32*/ number; - item: TimelineItemInterface; +/** + * A push rule is a single rule that states under what conditions an event + * should be passed onto a push gateway and how the notification should be + * presented. + */ +export type SimplePushRule = { + /** + * Actions to determine if and how a notification is delivered for events + * matching this rule. + */ + actions: Array; + /** + * Whether this is a default rule, or has been set explicitly. + */ + default_: boolean; + /** + * Whether the push rule is enabled or not. + */ + enabled: boolean; + /** + * The ID of this rule. + * + * This is generally the Matrix ID of the entity that it applies to. + */ + ruleId: string; }; /** - * Generated factory for {@link SetData} record objects. + * Generated factory for {@link SimplePushRule} record objects. */ -export const SetData = (() => { +export const SimplePushRule = (() => { const defaults = () => ({}); const create = (() => { - return uniffiCreateRecord>(defaults); + return uniffiCreateRecord>( + defaults + ); })(); return Object.freeze({ /** - * Create a frozen instance of {@link SetData}, with defaults specified + * Create a frozen instance of {@link SimplePushRule}, with defaults specified * in Rust, in the {@link matrix_sdk_ffi} crate. */ create, /** - * Create a frozen instance of {@link SetData}, with defaults specified + * Create a frozen instance of {@link SimplePushRule}, with defaults specified * in Rust, in the {@link matrix_sdk_ffi} crate. */ new: create, @@ -7523,27 +7691,33 @@ export const SetData = (() => { /** * Defaults specified in the {@link matrix_sdk_ffi} crate. */ - defaults: () => Object.freeze(defaults()) as Partial, + defaults: () => Object.freeze(defaults()) as Partial, }); })(); -const FfiConverterTypeSetData = (() => { - type TypeName = SetData; +const FfiConverterTypeSimplePushRule = (() => { + type TypeName = SimplePushRule; class FFIConverter extends AbstractFfiConverterByteArray { read(from: RustBuffer): TypeName { return { - index: FfiConverterUInt32.read(from), - item: FfiConverterTypeTimelineItem.read(from), + actions: FfiConverterArrayTypeAction.read(from), + default_: FfiConverterBool.read(from), + enabled: FfiConverterBool.read(from), + ruleId: FfiConverterString.read(from), }; } write(value: TypeName, into: RustBuffer): void { - FfiConverterUInt32.write(value.index, into); - FfiConverterTypeTimelineItem.write(value.item, into); + FfiConverterArrayTypeAction.write(value.actions, into); + FfiConverterBool.write(value.default_, into); + FfiConverterBool.write(value.enabled, into); + FfiConverterString.write(value.ruleId, into); } allocationSize(value: TypeName): number { return ( - FfiConverterUInt32.allocationSize(value.index) + - FfiConverterTypeTimelineItem.allocationSize(value.item) + FfiConverterArrayTypeAction.allocationSize(value.actions) + + FfiConverterBool.allocationSize(value.default_) + + FfiConverterBool.allocationSize(value.enabled) + + FfiConverterString.allocationSize(value.ruleId) ); } } @@ -7551,51 +7725,81 @@ const FfiConverterTypeSetData = (() => { })(); /** - * A push rule is a single rule that states under what conditions an event - * should be passed onto a push gateway and how the notification should be - * presented. + * Structure representing a room in a space and aggregated information + * relevant to the UI layer. */ -export type SimplePushRule = { +export type SpaceRoom = { /** - * Actions to determine if and how a notification is delivered for events - * matching this rule. + * The ID of the room. */ - actions: Array; + roomId: string; /** - * Whether this is a default rule, or has been set explicitly. + * The canonical alias of the room, if any. */ - default_: boolean; + canonicalAlias: string | undefined; /** - * Whether the push rule is enabled or not. + * The name of the room, if any. */ - enabled: boolean; + name: string | undefined; /** - * The ID of this rule. - * - * This is generally the Matrix ID of the entity that it applies to. + * The topic of the room, if any. */ - ruleId: string; + topic: string | undefined; + /** + * The URL for the room's avatar, if one is set. + */ + avatarUrl: string | undefined; + /** + * The type of room from `m.room.create`, if any. + */ + roomType: RoomType; + /** + * The number of members joined to the room. + */ + numJoinedMembers: /*u64*/ bigint; + /** + * The join rule of the room. + */ + joinRule: JoinRule | undefined; + /** + * Whether the room may be viewed by users without joining. + */ + worldReadable: boolean | undefined; + /** + * Whether guest users may join the room and participate in it. + */ + guestCanJoin: boolean; + /** + * The number of children room this has, if a space. + */ + childrenCount: /*u64*/ bigint; + /** + * Whether this room is joined, left etc. + */ + state: Membership | undefined; + /** + * A list of room members considered to be heroes. + */ + heroes: Array | undefined; }; /** - * Generated factory for {@link SimplePushRule} record objects. + * Generated factory for {@link SpaceRoom} record objects. */ -export const SimplePushRule = (() => { +export const SpaceRoom = (() => { const defaults = () => ({}); const create = (() => { - return uniffiCreateRecord>( - defaults - ); + return uniffiCreateRecord>(defaults); })(); return Object.freeze({ /** - * Create a frozen instance of {@link SimplePushRule}, with defaults specified + * Create a frozen instance of {@link SpaceRoom}, with defaults specified * in Rust, in the {@link matrix_sdk_ffi} crate. */ create, /** - * Create a frozen instance of {@link SimplePushRule}, with defaults specified + * Create a frozen instance of {@link SpaceRoom}, with defaults specified * in Rust, in the {@link matrix_sdk_ffi} crate. */ new: create, @@ -7603,33 +7807,60 @@ export const SimplePushRule = (() => { /** * Defaults specified in the {@link matrix_sdk_ffi} crate. */ - defaults: () => Object.freeze(defaults()) as Partial, + defaults: () => Object.freeze(defaults()) as Partial, }); })(); -const FfiConverterTypeSimplePushRule = (() => { - type TypeName = SimplePushRule; +const FfiConverterTypeSpaceRoom = (() => { + type TypeName = SpaceRoom; class FFIConverter extends AbstractFfiConverterByteArray { read(from: RustBuffer): TypeName { return { - actions: FfiConverterArrayTypeAction.read(from), - default_: FfiConverterBool.read(from), - enabled: FfiConverterBool.read(from), - ruleId: FfiConverterString.read(from), + roomId: FfiConverterString.read(from), + canonicalAlias: FfiConverterOptionalString.read(from), + name: FfiConverterOptionalString.read(from), + topic: FfiConverterOptionalString.read(from), + avatarUrl: FfiConverterOptionalString.read(from), + roomType: FfiConverterTypeRoomType.read(from), + numJoinedMembers: FfiConverterUInt64.read(from), + joinRule: FfiConverterOptionalTypeJoinRule.read(from), + worldReadable: FfiConverterOptionalBool.read(from), + guestCanJoin: FfiConverterBool.read(from), + childrenCount: FfiConverterUInt64.read(from), + state: FfiConverterOptionalTypeMembership.read(from), + heroes: FfiConverterOptionalArrayTypeRoomHero.read(from), }; } write(value: TypeName, into: RustBuffer): void { - FfiConverterArrayTypeAction.write(value.actions, into); - FfiConverterBool.write(value.default_, into); - FfiConverterBool.write(value.enabled, into); - FfiConverterString.write(value.ruleId, into); + FfiConverterString.write(value.roomId, into); + FfiConverterOptionalString.write(value.canonicalAlias, into); + FfiConverterOptionalString.write(value.name, into); + FfiConverterOptionalString.write(value.topic, into); + FfiConverterOptionalString.write(value.avatarUrl, into); + FfiConverterTypeRoomType.write(value.roomType, into); + FfiConverterUInt64.write(value.numJoinedMembers, into); + FfiConverterOptionalTypeJoinRule.write(value.joinRule, into); + FfiConverterOptionalBool.write(value.worldReadable, into); + FfiConverterBool.write(value.guestCanJoin, into); + FfiConverterUInt64.write(value.childrenCount, into); + FfiConverterOptionalTypeMembership.write(value.state, into); + FfiConverterOptionalArrayTypeRoomHero.write(value.heroes, into); } allocationSize(value: TypeName): number { return ( - FfiConverterArrayTypeAction.allocationSize(value.actions) + - FfiConverterBool.allocationSize(value.default_) + - FfiConverterBool.allocationSize(value.enabled) + - FfiConverterString.allocationSize(value.ruleId) + FfiConverterString.allocationSize(value.roomId) + + FfiConverterOptionalString.allocationSize(value.canonicalAlias) + + FfiConverterOptionalString.allocationSize(value.name) + + FfiConverterOptionalString.allocationSize(value.topic) + + FfiConverterOptionalString.allocationSize(value.avatarUrl) + + FfiConverterTypeRoomType.allocationSize(value.roomType) + + FfiConverterUInt64.allocationSize(value.numJoinedMembers) + + FfiConverterOptionalTypeJoinRule.allocationSize(value.joinRule) + + FfiConverterOptionalBool.allocationSize(value.worldReadable) + + FfiConverterBool.allocationSize(value.guestCanJoin) + + FfiConverterUInt64.allocationSize(value.childrenCount) + + FfiConverterOptionalTypeMembership.allocationSize(value.state) + + FfiConverterOptionalArrayTypeRoomHero.allocationSize(value.heroes) ); } } @@ -7823,6 +8054,65 @@ const FfiConverterTypeTextMessageContent = (() => { return new FFIConverter(); })(); +/** + * A thread subscription (MSC4306). + */ +export type ThreadSubscription = { + /** + * Whether the thread subscription happened automatically (e.g. after a + * mention) or if it was manually requested by the user. + */ + automatic: boolean; +}; + +/** + * Generated factory for {@link ThreadSubscription} record objects. + */ +export const ThreadSubscription = (() => { + const defaults = () => ({}); + const create = (() => { + return uniffiCreateRecord>( + defaults + ); + })(); + return Object.freeze({ + /** + * Create a frozen instance of {@link ThreadSubscription}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + create, + + /** + * Create a frozen instance of {@link ThreadSubscription}, with defaults specified + * in Rust, in the {@link matrix_sdk_ffi} crate. + */ + new: create, + + /** + * Defaults specified in the {@link matrix_sdk_ffi} crate. + */ + defaults: () => Object.freeze(defaults()) as Partial, + }); +})(); + +const FfiConverterTypeThreadSubscription = (() => { + type TypeName = ThreadSubscription; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + return { + automatic: FfiConverterBool.read(from), + }; + } + write(value: TypeName, into: RustBuffer): void { + FfiConverterBool.write(value.automatic, into); + } + allocationSize(value: TypeName): number { + return FfiConverterBool.allocationSize(value.automatic); + } + } + return new FFIConverter(); +})(); + export type ThumbnailInfo = { height: /*u64*/ bigint | undefined; width: /*u64*/ bigint | undefined; @@ -8519,15 +8809,9 @@ export type UploadParameters = { */ mentions: Mentions | undefined; /** - * Optional parameters for sending the media as (threaded) reply. + * Optional Event ID to reply to. */ - replyParams: ReplyParameters | undefined; - /** - * Should the media be sent with the send queue, or synchronously? - * - * Watching progress only works with the synchronous method, at the moment. - */ - useSendQueue: boolean; + inReplyTo: string | undefined; }; /** @@ -8569,8 +8853,7 @@ const FfiConverterTypeUploadParameters = (() => { caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), mentions: FfiConverterOptionalTypeMentions.read(from), - replyParams: FfiConverterOptionalTypeReplyParameters.read(from), - useSendQueue: FfiConverterBool.read(from), + inReplyTo: FfiConverterOptionalString.read(from), }; } write(value: TypeName, into: RustBuffer): void { @@ -8578,8 +8861,7 @@ const FfiConverterTypeUploadParameters = (() => { FfiConverterOptionalString.write(value.caption, into); FfiConverterOptionalTypeFormattedBody.write(value.formattedCaption, into); FfiConverterOptionalTypeMentions.write(value.mentions, into); - FfiConverterOptionalTypeReplyParameters.write(value.replyParams, into); - FfiConverterBool.write(value.useSendQueue, into); + FfiConverterOptionalString.write(value.inReplyTo, into); } allocationSize(value: TypeName): number { return ( @@ -8589,10 +8871,7 @@ const FfiConverterTypeUploadParameters = (() => { value.formattedCaption ) + FfiConverterOptionalTypeMentions.allocationSize(value.mentions) + - FfiConverterOptionalTypeReplyParameters.allocationSize( - value.replyParams - ) + - FfiConverterBool.allocationSize(value.useSendQueue) + FfiConverterOptionalString.allocationSize(value.inReplyTo) ); } } @@ -15425,6 +15704,7 @@ export enum EventSendState_Tags { export const EventSendState = (() => { type NotSentYet__interface = { tag: EventSendState_Tags.NotSentYet; + inner: Readonly<{ progress: MediaUploadProgress | undefined }>; }; /** @@ -15437,12 +15717,24 @@ export const EventSendState = (() => { */ readonly [uniffiTypeNameSymbol] = 'EventSendState'; readonly tag = EventSendState_Tags.NotSentYet; - constructor() { + readonly inner: Readonly<{ progress: MediaUploadProgress | undefined }>; + constructor(inner: { + /** + * The progress of the sending operation, if the event involves a media + * upload. + */ progress: MediaUploadProgress | undefined; + }) { super('EventSendState', 'NotSentYet'); + this.inner = Object.freeze(inner); } - static new(): NotSentYet_ { - return new NotSentYet_(); + static new(inner: { + /** + * The progress of the sending operation, if the event involves a media + * upload. + */ progress: MediaUploadProgress | undefined; + }): NotSentYet_ { + return new NotSentYet_(inner); } static instanceOf(obj: any): obj is NotSentYet_ { @@ -15564,7 +15856,9 @@ const FfiConverterTypeEventSendState = (() => { read(from: RustBuffer): TypeName { switch (ordinalConverter.read(from)) { case 1: - return new EventSendState.NotSentYet(); + return new EventSendState.NotSentYet({ + progress: FfiConverterOptionalTypeMediaUploadProgress.read(from), + }); case 2: return new EventSendState.SendingFailed({ error: FfiConverterTypeQueueWedgeError.read(from), @@ -15582,6 +15876,11 @@ const FfiConverterTypeEventSendState = (() => { switch (value.tag) { case EventSendState_Tags.NotSentYet: { ordinalConverter.write(1, into); + const inner = value.inner; + FfiConverterOptionalTypeMediaUploadProgress.write( + inner.progress, + into + ); return; } case EventSendState_Tags.SendingFailed: { @@ -15605,7 +15904,12 @@ const FfiConverterTypeEventSendState = (() => { allocationSize(value: TypeName): number { switch (value.tag) { case EventSendState_Tags.NotSentYet: { - return ordinalConverter.allocationSize(1); + const inner = value.inner; + let size = ordinalConverter.allocationSize(1); + size += FfiConverterOptionalTypeMediaUploadProgress.allocationSize( + inner.progress + ); + return size; } case EventSendState_Tags.SendingFailed: { const inner = value.inner; @@ -15996,7 +16300,7 @@ export const GalleryItemInfo = (() => { tag: GalleryItemInfo_Tags.Audio; inner: Readonly<{ audioInfo: AudioInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }>; @@ -16011,13 +16315,13 @@ export const GalleryItemInfo = (() => { readonly tag = GalleryItemInfo_Tags.Audio; readonly inner: Readonly<{ audioInfo: AudioInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }>; constructor(inner: { audioInfo: AudioInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }) { @@ -16027,7 +16331,7 @@ export const GalleryItemInfo = (() => { static new(inner: { audioInfo: AudioInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }): Audio_ { @@ -16043,7 +16347,7 @@ export const GalleryItemInfo = (() => { tag: GalleryItemInfo_Tags.File; inner: Readonly<{ fileInfo: FileInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }>; @@ -16058,13 +16362,13 @@ export const GalleryItemInfo = (() => { readonly tag = GalleryItemInfo_Tags.File; readonly inner: Readonly<{ fileInfo: FileInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }>; constructor(inner: { fileInfo: FileInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }) { @@ -16074,7 +16378,7 @@ export const GalleryItemInfo = (() => { static new(inner: { fileInfo: FileInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; }): File_ { @@ -16090,10 +16394,10 @@ export const GalleryItemInfo = (() => { tag: GalleryItemInfo_Tags.Image; inner: Readonly<{ imageInfo: ImageInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }>; }; @@ -16106,17 +16410,17 @@ export const GalleryItemInfo = (() => { readonly tag = GalleryItemInfo_Tags.Image; readonly inner: Readonly<{ imageInfo: ImageInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }>; constructor(inner: { imageInfo: ImageInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }) { super('GalleryItemInfo', 'Image'); this.inner = Object.freeze(inner); @@ -16124,10 +16428,10 @@ export const GalleryItemInfo = (() => { static new(inner: { imageInfo: ImageInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }): Image_ { return new Image_(inner); } @@ -16141,10 +16445,10 @@ export const GalleryItemInfo = (() => { tag: GalleryItemInfo_Tags.Video; inner: Readonly<{ videoInfo: VideoInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }>; }; @@ -16157,17 +16461,17 @@ export const GalleryItemInfo = (() => { readonly tag = GalleryItemInfo_Tags.Video; readonly inner: Readonly<{ videoInfo: VideoInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }>; constructor(inner: { videoInfo: VideoInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }) { super('GalleryItemInfo', 'Video'); this.inner = Object.freeze(inner); @@ -16175,10 +16479,10 @@ export const GalleryItemInfo = (() => { static new(inner: { videoInfo: VideoInfo; - filename: string; + source: UploadSource; caption: string | undefined; formattedCaption: FormattedBody | undefined; - thumbnailPath: string | undefined; + thumbnailSource: UploadSource | undefined; }): Video_ { return new Video_(inner); } @@ -16215,32 +16519,32 @@ const FfiConverterTypeGalleryItemInfo = (() => { case 1: return new GalleryItemInfo.Audio({ audioInfo: FfiConverterTypeAudioInfo.read(from), - filename: FfiConverterString.read(from), + source: FfiConverterTypeUploadSource.read(from), caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), }); case 2: return new GalleryItemInfo.File({ fileInfo: FfiConverterTypeFileInfo.read(from), - filename: FfiConverterString.read(from), + source: FfiConverterTypeUploadSource.read(from), caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), }); case 3: return new GalleryItemInfo.Image({ imageInfo: FfiConverterTypeImageInfo.read(from), - filename: FfiConverterString.read(from), + source: FfiConverterTypeUploadSource.read(from), caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), - thumbnailPath: FfiConverterOptionalString.read(from), + thumbnailSource: FfiConverterOptionalTypeUploadSource.read(from), }); case 4: return new GalleryItemInfo.Video({ videoInfo: FfiConverterTypeVideoInfo.read(from), - filename: FfiConverterString.read(from), + source: FfiConverterTypeUploadSource.read(from), caption: FfiConverterOptionalString.read(from), formattedCaption: FfiConverterOptionalTypeFormattedBody.read(from), - thumbnailPath: FfiConverterOptionalString.read(from), + thumbnailSource: FfiConverterOptionalTypeUploadSource.read(from), }); default: throw new UniffiInternalError.UnexpectedEnumCase(); @@ -16252,7 +16556,7 @@ const FfiConverterTypeGalleryItemInfo = (() => { ordinalConverter.write(1, into); const inner = value.inner; FfiConverterTypeAudioInfo.write(inner.audioInfo, into); - FfiConverterString.write(inner.filename, into); + FfiConverterTypeUploadSource.write(inner.source, into); FfiConverterOptionalString.write(inner.caption, into); FfiConverterOptionalTypeFormattedBody.write( inner.formattedCaption, @@ -16264,7 +16568,7 @@ const FfiConverterTypeGalleryItemInfo = (() => { ordinalConverter.write(2, into); const inner = value.inner; FfiConverterTypeFileInfo.write(inner.fileInfo, into); - FfiConverterString.write(inner.filename, into); + FfiConverterTypeUploadSource.write(inner.source, into); FfiConverterOptionalString.write(inner.caption, into); FfiConverterOptionalTypeFormattedBody.write( inner.formattedCaption, @@ -16276,26 +16580,32 @@ const FfiConverterTypeGalleryItemInfo = (() => { ordinalConverter.write(3, into); const inner = value.inner; FfiConverterTypeImageInfo.write(inner.imageInfo, into); - FfiConverterString.write(inner.filename, into); + FfiConverterTypeUploadSource.write(inner.source, into); FfiConverterOptionalString.write(inner.caption, into); FfiConverterOptionalTypeFormattedBody.write( inner.formattedCaption, into ); - FfiConverterOptionalString.write(inner.thumbnailPath, into); + FfiConverterOptionalTypeUploadSource.write( + inner.thumbnailSource, + into + ); return; } case GalleryItemInfo_Tags.Video: { ordinalConverter.write(4, into); const inner = value.inner; FfiConverterTypeVideoInfo.write(inner.videoInfo, into); - FfiConverterString.write(inner.filename, into); + FfiConverterTypeUploadSource.write(inner.source, into); FfiConverterOptionalString.write(inner.caption, into); FfiConverterOptionalTypeFormattedBody.write( inner.formattedCaption, into ); - FfiConverterOptionalString.write(inner.thumbnailPath, into); + FfiConverterOptionalTypeUploadSource.write( + inner.thumbnailSource, + into + ); return; } default: @@ -16309,7 +16619,7 @@ const FfiConverterTypeGalleryItemInfo = (() => { const inner = value.inner; let size = ordinalConverter.allocationSize(1); size += FfiConverterTypeAudioInfo.allocationSize(inner.audioInfo); - size += FfiConverterString.allocationSize(inner.filename); + size += FfiConverterTypeUploadSource.allocationSize(inner.source); size += FfiConverterOptionalString.allocationSize(inner.caption); size += FfiConverterOptionalTypeFormattedBody.allocationSize( inner.formattedCaption @@ -16320,7 +16630,7 @@ const FfiConverterTypeGalleryItemInfo = (() => { const inner = value.inner; let size = ordinalConverter.allocationSize(2); size += FfiConverterTypeFileInfo.allocationSize(inner.fileInfo); - size += FfiConverterString.allocationSize(inner.filename); + size += FfiConverterTypeUploadSource.allocationSize(inner.source); size += FfiConverterOptionalString.allocationSize(inner.caption); size += FfiConverterOptionalTypeFormattedBody.allocationSize( inner.formattedCaption @@ -16331,13 +16641,13 @@ const FfiConverterTypeGalleryItemInfo = (() => { const inner = value.inner; let size = ordinalConverter.allocationSize(3); size += FfiConverterTypeImageInfo.allocationSize(inner.imageInfo); - size += FfiConverterString.allocationSize(inner.filename); + size += FfiConverterTypeUploadSource.allocationSize(inner.source); size += FfiConverterOptionalString.allocationSize(inner.caption); size += FfiConverterOptionalTypeFormattedBody.allocationSize( inner.formattedCaption ); - size += FfiConverterOptionalString.allocationSize( - inner.thumbnailPath + size += FfiConverterOptionalTypeUploadSource.allocationSize( + inner.thumbnailSource ); return size; } @@ -16345,13 +16655,13 @@ const FfiConverterTypeGalleryItemInfo = (() => { const inner = value.inner; let size = ordinalConverter.allocationSize(4); size += FfiConverterTypeVideoInfo.allocationSize(inner.videoInfo); - size += FfiConverterString.allocationSize(inner.filename); + size += FfiConverterTypeUploadSource.allocationSize(inner.source); size += FfiConverterOptionalString.allocationSize(inner.caption); size += FfiConverterOptionalTypeFormattedBody.allocationSize( inner.formattedCaption ); - size += FfiConverterOptionalString.allocationSize( - inner.thumbnailPath + size += FfiConverterOptionalTypeUploadSource.allocationSize( + inner.thumbnailSource ); return size; } @@ -17720,6 +18030,245 @@ const FfiConverterTypeKeyDerivationAlgorithm = (() => { return new FFIConverter(); })(); +// Enum: LatestEventValue +export enum LatestEventValue_Tags { + None = 'None', + Remote = 'Remote', + Local = 'Local', +} +/** + * Mimic the [`UiLatestEventValue`] type. + */ +export const LatestEventValue = (() => { + type None__interface = { + tag: LatestEventValue_Tags.None; + }; + + class None_ extends UniffiEnum implements None__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'LatestEventValue'; + readonly tag = LatestEventValue_Tags.None; + constructor() { + super('LatestEventValue', 'None'); + } + + static new(): None_ { + return new None_(); + } + + static instanceOf(obj: any): obj is None_ { + return obj.tag === LatestEventValue_Tags.None; + } + } + + type Remote__interface = { + tag: LatestEventValue_Tags.Remote; + inner: Readonly<{ + timestamp: Timestamp; + sender: string; + isOwn: boolean; + profile: ProfileDetails; + content: TimelineItemContent; + }>; + }; + + class Remote_ extends UniffiEnum implements Remote__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'LatestEventValue'; + readonly tag = LatestEventValue_Tags.Remote; + readonly inner: Readonly<{ + timestamp: Timestamp; + sender: string; + isOwn: boolean; + profile: ProfileDetails; + content: TimelineItemContent; + }>; + constructor(inner: { + timestamp: Timestamp; + sender: string; + isOwn: boolean; + profile: ProfileDetails; + content: TimelineItemContent; + }) { + super('LatestEventValue', 'Remote'); + this.inner = Object.freeze(inner); + } + + static new(inner: { + timestamp: Timestamp; + sender: string; + isOwn: boolean; + profile: ProfileDetails; + content: TimelineItemContent; + }): Remote_ { + return new Remote_(inner); + } + + static instanceOf(obj: any): obj is Remote_ { + return obj.tag === LatestEventValue_Tags.Remote; + } + } + + type Local__interface = { + tag: LatestEventValue_Tags.Local; + inner: Readonly<{ + timestamp: Timestamp; + content: TimelineItemContent; + isSending: boolean; + }>; + }; + + class Local_ extends UniffiEnum implements Local__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'LatestEventValue'; + readonly tag = LatestEventValue_Tags.Local; + readonly inner: Readonly<{ + timestamp: Timestamp; + content: TimelineItemContent; + isSending: boolean; + }>; + constructor(inner: { + timestamp: Timestamp; + content: TimelineItemContent; + isSending: boolean; + }) { + super('LatestEventValue', 'Local'); + this.inner = Object.freeze(inner); + } + + static new(inner: { + timestamp: Timestamp; + content: TimelineItemContent; + isSending: boolean; + }): Local_ { + return new Local_(inner); + } + + static instanceOf(obj: any): obj is Local_ { + return obj.tag === LatestEventValue_Tags.Local; + } + } + + function instanceOf(obj: any): obj is LatestEventValue { + return obj[uniffiTypeNameSymbol] === 'LatestEventValue'; + } + + return Object.freeze({ + instanceOf, + None: None_, + Remote: Remote_, + Local: Local_, + }); +})(); + +/** + * Mimic the [`UiLatestEventValue`] type. + */ + +export type LatestEventValue = InstanceType< + (typeof LatestEventValue)[keyof Omit] +>; + +// FfiConverter for enum LatestEventValue +const FfiConverterTypeLatestEventValue = (() => { + const ordinalConverter = FfiConverterInt32; + type TypeName = LatestEventValue; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + switch (ordinalConverter.read(from)) { + case 1: + return new LatestEventValue.None(); + case 2: + return new LatestEventValue.Remote({ + timestamp: FfiConverterTypeTimestamp.read(from), + sender: FfiConverterString.read(from), + isOwn: FfiConverterBool.read(from), + profile: FfiConverterTypeProfileDetails.read(from), + content: FfiConverterTypeTimelineItemContent.read(from), + }); + case 3: + return new LatestEventValue.Local({ + timestamp: FfiConverterTypeTimestamp.read(from), + content: FfiConverterTypeTimelineItemContent.read(from), + isSending: FfiConverterBool.read(from), + }); + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + write(value: TypeName, into: RustBuffer): void { + switch (value.tag) { + case LatestEventValue_Tags.None: { + ordinalConverter.write(1, into); + return; + } + case LatestEventValue_Tags.Remote: { + ordinalConverter.write(2, into); + const inner = value.inner; + FfiConverterTypeTimestamp.write(inner.timestamp, into); + FfiConverterString.write(inner.sender, into); + FfiConverterBool.write(inner.isOwn, into); + FfiConverterTypeProfileDetails.write(inner.profile, into); + FfiConverterTypeTimelineItemContent.write(inner.content, into); + return; + } + case LatestEventValue_Tags.Local: { + ordinalConverter.write(3, into); + const inner = value.inner; + FfiConverterTypeTimestamp.write(inner.timestamp, into); + FfiConverterTypeTimelineItemContent.write(inner.content, into); + FfiConverterBool.write(inner.isSending, into); + return; + } + default: + // Throwing from here means that LatestEventValue_Tags hasn't matched an ordinal. + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + allocationSize(value: TypeName): number { + switch (value.tag) { + case LatestEventValue_Tags.None: { + return ordinalConverter.allocationSize(1); + } + case LatestEventValue_Tags.Remote: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(2); + size += FfiConverterTypeTimestamp.allocationSize(inner.timestamp); + size += FfiConverterString.allocationSize(inner.sender); + size += FfiConverterBool.allocationSize(inner.isOwn); + size += FfiConverterTypeProfileDetails.allocationSize(inner.profile); + size += FfiConverterTypeTimelineItemContent.allocationSize( + inner.content + ); + return size; + } + case LatestEventValue_Tags.Local: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(3); + size += FfiConverterTypeTimestamp.allocationSize(inner.timestamp); + size += FfiConverterTypeTimelineItemContent.allocationSize( + inner.content + ); + size += FfiConverterBool.allocationSize(inner.isSending); + return size; + } + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + } + return new FFIConverter(); +})(); + export enum LogLevel { Error, Warn, @@ -23166,6 +23715,137 @@ const FfiConverterTypePollKind = (() => { return new FFIConverter(); })(); +// Enum: PowerLevel +export enum PowerLevel_Tags { + Infinite = 'Infinite', + Value = 'Value', +} +export const PowerLevel = (() => { + type Infinite__interface = { + tag: PowerLevel_Tags.Infinite; + }; + + /** + * The user is a room creator and has infinite power level. + * + * This power level was introduced in room version 12. + */ + class Infinite_ extends UniffiEnum implements Infinite__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'PowerLevel'; + readonly tag = PowerLevel_Tags.Infinite; + constructor() { + super('PowerLevel', 'Infinite'); + } + + static new(): Infinite_ { + return new Infinite_(); + } + + static instanceOf(obj: any): obj is Infinite_ { + return obj.tag === PowerLevel_Tags.Infinite; + } + } + + type Value__interface = { + tag: PowerLevel_Tags.Value; + inner: Readonly<{ value: /*i64*/ bigint }>; + }; + + /** + * The user has the given power level. + */ + class Value_ extends UniffiEnum implements Value__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'PowerLevel'; + readonly tag = PowerLevel_Tags.Value; + readonly inner: Readonly<{ value: /*i64*/ bigint }>; + constructor(inner: { value: /*i64*/ bigint }) { + super('PowerLevel', 'Value'); + this.inner = Object.freeze(inner); + } + + static new(inner: { value: /*i64*/ bigint }): Value_ { + return new Value_(inner); + } + + static instanceOf(obj: any): obj is Value_ { + return obj.tag === PowerLevel_Tags.Value; + } + } + + function instanceOf(obj: any): obj is PowerLevel { + return obj[uniffiTypeNameSymbol] === 'PowerLevel'; + } + + return Object.freeze({ + instanceOf, + Infinite: Infinite_, + Value: Value_, + }); +})(); + +export type PowerLevel = InstanceType< + (typeof PowerLevel)[keyof Omit] +>; + +// FfiConverter for enum PowerLevel +const FfiConverterTypePowerLevel = (() => { + const ordinalConverter = FfiConverterInt32; + type TypeName = PowerLevel; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + switch (ordinalConverter.read(from)) { + case 1: + return new PowerLevel.Infinite(); + case 2: + return new PowerLevel.Value({ value: FfiConverterInt64.read(from) }); + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + write(value: TypeName, into: RustBuffer): void { + switch (value.tag) { + case PowerLevel_Tags.Infinite: { + ordinalConverter.write(1, into); + return; + } + case PowerLevel_Tags.Value: { + ordinalConverter.write(2, into); + const inner = value.inner; + FfiConverterInt64.write(inner.value, into); + return; + } + default: + // Throwing from here means that PowerLevel_Tags hasn't matched an ordinal. + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + allocationSize(value: TypeName): number { + switch (value.tag) { + case PowerLevel_Tags.Infinite: { + return ordinalConverter.allocationSize(1); + } + case PowerLevel_Tags.Value: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(2); + size += FfiConverterInt64.allocationSize(inner.value); + return size; + } + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + } + return new FFIConverter(); +})(); + // Enum: ProfileDetails export enum ProfileDetails_Tags { Unavailable = 'Unavailable', @@ -23396,6 +24076,9 @@ const FfiConverterTypeProfileDetails = (() => { export enum PublicRoomJoinRule { Public, Knock, + Restricted, + KnockRestricted, + Invite, } const FfiConverterTypePublicRoomJoinRule = (() => { @@ -23408,6 +24091,12 @@ const FfiConverterTypePublicRoomJoinRule = (() => { return PublicRoomJoinRule.Public; case 2: return PublicRoomJoinRule.Knock; + case 3: + return PublicRoomJoinRule.Restricted; + case 4: + return PublicRoomJoinRule.KnockRestricted; + case 5: + return PublicRoomJoinRule.Invite; default: throw new UniffiInternalError.UnexpectedEnumCase(); } @@ -23418,6 +24107,12 @@ const FfiConverterTypePublicRoomJoinRule = (() => { return ordinalConverter.write(1, into); case PublicRoomJoinRule.Knock: return ordinalConverter.write(2, into); + case PublicRoomJoinRule.Restricted: + return ordinalConverter.write(3, into); + case PublicRoomJoinRule.KnockRestricted: + return ordinalConverter.write(4, into); + case PublicRoomJoinRule.Invite: + return ordinalConverter.write(5, into); } } allocationSize(value: TypeName): number { @@ -26386,10 +27081,13 @@ const FfiConverterTypeRoomHistoryVisibility = (() => { export enum RoomListEntriesDynamicFilterKind_Tags { All = 'All', Any = 'Any', + NonSpace = 'NonSpace', NonLeft = 'NonLeft', Joined = 'Joined', Unread = 'Unread', Favourite = 'Favourite', + LowPriority = 'LowPriority', + NonLowPriority = 'NonLowPriority', Invite = 'Invite', Category = 'Category', None = 'None', @@ -26460,6 +27158,30 @@ export const RoomListEntriesDynamicFilterKind = (() => { } } + type NonSpace__interface = { + tag: RoomListEntriesDynamicFilterKind_Tags.NonSpace; + }; + + class NonSpace_ extends UniffiEnum implements NonSpace__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'RoomListEntriesDynamicFilterKind'; + readonly tag = RoomListEntriesDynamicFilterKind_Tags.NonSpace; + constructor() { + super('RoomListEntriesDynamicFilterKind', 'NonSpace'); + } + + static new(): NonSpace_ { + return new NonSpace_(); + } + + static instanceOf(obj: any): obj is NonSpace_ { + return obj.tag === RoomListEntriesDynamicFilterKind_Tags.NonSpace; + } + } + type NonLeft__interface = { tag: RoomListEntriesDynamicFilterKind_Tags.NonLeft; }; @@ -26556,6 +27278,57 @@ export const RoomListEntriesDynamicFilterKind = (() => { } } + type LowPriority__interface = { + tag: RoomListEntriesDynamicFilterKind_Tags.LowPriority; + }; + + class LowPriority_ extends UniffiEnum implements LowPriority__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'RoomListEntriesDynamicFilterKind'; + readonly tag = RoomListEntriesDynamicFilterKind_Tags.LowPriority; + constructor() { + super('RoomListEntriesDynamicFilterKind', 'LowPriority'); + } + + static new(): LowPriority_ { + return new LowPriority_(); + } + + static instanceOf(obj: any): obj is LowPriority_ { + return obj.tag === RoomListEntriesDynamicFilterKind_Tags.LowPriority; + } + } + + type NonLowPriority__interface = { + tag: RoomListEntriesDynamicFilterKind_Tags.NonLowPriority; + }; + + class NonLowPriority_ + extends UniffiEnum + implements NonLowPriority__interface + { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'RoomListEntriesDynamicFilterKind'; + readonly tag = RoomListEntriesDynamicFilterKind_Tags.NonLowPriority; + constructor() { + super('RoomListEntriesDynamicFilterKind', 'NonLowPriority'); + } + + static new(): NonLowPriority_ { + return new NonLowPriority_(); + } + + static instanceOf(obj: any): obj is NonLowPriority_ { + return obj.tag === RoomListEntriesDynamicFilterKind_Tags.NonLowPriority; + } + } + type Invite__interface = { tag: RoomListEntriesDynamicFilterKind_Tags.Invite; }; @@ -26734,10 +27507,13 @@ export const RoomListEntriesDynamicFilterKind = (() => { instanceOf, All: All_, Any: Any_, + NonSpace: NonSpace_, NonLeft: NonLeft_, Joined: Joined_, Unread: Unread_, Favourite: Favourite_, + LowPriority: LowPriority_, + NonLowPriority: NonLowPriority_, Invite: Invite_, Category: Category_, None: None_, @@ -26772,30 +27548,36 @@ const FfiConverterTypeRoomListEntriesDynamicFilterKind = (() => { FfiConverterArrayTypeRoomListEntriesDynamicFilterKind.read(from), }); case 3: - return new RoomListEntriesDynamicFilterKind.NonLeft(); + return new RoomListEntriesDynamicFilterKind.NonSpace(); case 4: - return new RoomListEntriesDynamicFilterKind.Joined(); + return new RoomListEntriesDynamicFilterKind.NonLeft(); case 5: - return new RoomListEntriesDynamicFilterKind.Unread(); + return new RoomListEntriesDynamicFilterKind.Joined(); case 6: - return new RoomListEntriesDynamicFilterKind.Favourite(); + return new RoomListEntriesDynamicFilterKind.Unread(); case 7: - return new RoomListEntriesDynamicFilterKind.Invite(); + return new RoomListEntriesDynamicFilterKind.Favourite(); case 8: + return new RoomListEntriesDynamicFilterKind.LowPriority(); + case 9: + return new RoomListEntriesDynamicFilterKind.NonLowPriority(); + case 10: + return new RoomListEntriesDynamicFilterKind.Invite(); + case 11: return new RoomListEntriesDynamicFilterKind.Category({ expect: FfiConverterTypeRoomListFilterCategory.read(from), }); - case 9: + case 12: return new RoomListEntriesDynamicFilterKind.None(); - case 10: + case 13: return new RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName({ pattern: FfiConverterString.read(from), }); - case 11: + case 14: return new RoomListEntriesDynamicFilterKind.FuzzyMatchRoomName({ pattern: FfiConverterString.read(from), }); - case 12: + case 15: return new RoomListEntriesDynamicFilterKind.DeduplicateVersions(); default: throw new UniffiInternalError.UnexpectedEnumCase(); @@ -26821,50 +27603,62 @@ const FfiConverterTypeRoomListEntriesDynamicFilterKind = (() => { ); return; } - case RoomListEntriesDynamicFilterKind_Tags.NonLeft: { + case RoomListEntriesDynamicFilterKind_Tags.NonSpace: { ordinalConverter.write(3, into); return; } - case RoomListEntriesDynamicFilterKind_Tags.Joined: { + case RoomListEntriesDynamicFilterKind_Tags.NonLeft: { ordinalConverter.write(4, into); return; } - case RoomListEntriesDynamicFilterKind_Tags.Unread: { + case RoomListEntriesDynamicFilterKind_Tags.Joined: { ordinalConverter.write(5, into); return; } - case RoomListEntriesDynamicFilterKind_Tags.Favourite: { + case RoomListEntriesDynamicFilterKind_Tags.Unread: { ordinalConverter.write(6, into); return; } - case RoomListEntriesDynamicFilterKind_Tags.Invite: { + case RoomListEntriesDynamicFilterKind_Tags.Favourite: { ordinalConverter.write(7, into); return; } - case RoomListEntriesDynamicFilterKind_Tags.Category: { + case RoomListEntriesDynamicFilterKind_Tags.LowPriority: { ordinalConverter.write(8, into); + return; + } + case RoomListEntriesDynamicFilterKind_Tags.NonLowPriority: { + ordinalConverter.write(9, into); + return; + } + case RoomListEntriesDynamicFilterKind_Tags.Invite: { + ordinalConverter.write(10, into); + return; + } + case RoomListEntriesDynamicFilterKind_Tags.Category: { + ordinalConverter.write(11, into); const inner = value.inner; FfiConverterTypeRoomListFilterCategory.write(inner.expect, into); return; } case RoomListEntriesDynamicFilterKind_Tags.None: { - ordinalConverter.write(9, into); + ordinalConverter.write(12, into); return; } case RoomListEntriesDynamicFilterKind_Tags.NormalizedMatchRoomName: { - ordinalConverter.write(10, into); + ordinalConverter.write(13, into); const inner = value.inner; FfiConverterString.write(inner.pattern, into); return; } case RoomListEntriesDynamicFilterKind_Tags.FuzzyMatchRoomName: { - ordinalConverter.write(11, into); + ordinalConverter.write(14, into); const inner = value.inner; FfiConverterString.write(inner.pattern, into); return; } case RoomListEntriesDynamicFilterKind_Tags.DeduplicateVersions: { - ordinalConverter.write(12, into); + ordinalConverter.write(15, into); return; } default: @@ -26892,46 +27686,55 @@ const FfiConverterTypeRoomListEntriesDynamicFilterKind = (() => { ); return size; } - case RoomListEntriesDynamicFilterKind_Tags.NonLeft: { + case RoomListEntriesDynamicFilterKind_Tags.NonSpace: { return ordinalConverter.allocationSize(3); } - case RoomListEntriesDynamicFilterKind_Tags.Joined: { + case RoomListEntriesDynamicFilterKind_Tags.NonLeft: { return ordinalConverter.allocationSize(4); } - case RoomListEntriesDynamicFilterKind_Tags.Unread: { + case RoomListEntriesDynamicFilterKind_Tags.Joined: { return ordinalConverter.allocationSize(5); } - case RoomListEntriesDynamicFilterKind_Tags.Favourite: { + case RoomListEntriesDynamicFilterKind_Tags.Unread: { return ordinalConverter.allocationSize(6); } - case RoomListEntriesDynamicFilterKind_Tags.Invite: { + case RoomListEntriesDynamicFilterKind_Tags.Favourite: { return ordinalConverter.allocationSize(7); } + case RoomListEntriesDynamicFilterKind_Tags.LowPriority: { + return ordinalConverter.allocationSize(8); + } + case RoomListEntriesDynamicFilterKind_Tags.NonLowPriority: { + return ordinalConverter.allocationSize(9); + } + case RoomListEntriesDynamicFilterKind_Tags.Invite: { + return ordinalConverter.allocationSize(10); + } case RoomListEntriesDynamicFilterKind_Tags.Category: { const inner = value.inner; - let size = ordinalConverter.allocationSize(8); + let size = ordinalConverter.allocationSize(11); size += FfiConverterTypeRoomListFilterCategory.allocationSize( inner.expect ); return size; } case RoomListEntriesDynamicFilterKind_Tags.None: { - return ordinalConverter.allocationSize(9); + return ordinalConverter.allocationSize(12); } case RoomListEntriesDynamicFilterKind_Tags.NormalizedMatchRoomName: { const inner = value.inner; - let size = ordinalConverter.allocationSize(10); + let size = ordinalConverter.allocationSize(13); size += FfiConverterString.allocationSize(inner.pattern); return size; } case RoomListEntriesDynamicFilterKind_Tags.FuzzyMatchRoomName: { const inner = value.inner; - let size = ordinalConverter.allocationSize(11); + let size = ordinalConverter.allocationSize(14); size += FfiConverterString.allocationSize(inner.pattern); return size; } case RoomListEntriesDynamicFilterKind_Tags.DeduplicateVersions: { - return ordinalConverter.allocationSize(12); + return ordinalConverter.allocationSize(15); } default: throw new UniffiInternalError.UnexpectedEnumCase(); @@ -29673,6 +30476,522 @@ const FfiConverterTypeSlidingSyncVersionBuilder = (() => { return new FFIConverter(); })(); +// Enum: SpaceListUpdate +export enum SpaceListUpdate_Tags { + Append = 'Append', + Clear = 'Clear', + PushFront = 'PushFront', + PushBack = 'PushBack', + PopFront = 'PopFront', + PopBack = 'PopBack', + Insert = 'Insert', + Set = 'Set', + Remove = 'Remove', + Truncate = 'Truncate', + Reset = 'Reset', +} +export const SpaceListUpdate = (() => { + type Append__interface = { + tag: SpaceListUpdate_Tags.Append; + inner: Readonly<{ values: Array }>; + }; + + class Append_ extends UniffiEnum implements Append__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Append; + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { + super('SpaceListUpdate', 'Append'); + this.inner = Object.freeze(inner); + } + + static new(inner: { values: Array }): Append_ { + return new Append_(inner); + } + + static instanceOf(obj: any): obj is Append_ { + return obj.tag === SpaceListUpdate_Tags.Append; + } + } + + type Clear__interface = { + tag: SpaceListUpdate_Tags.Clear; + }; + + class Clear_ extends UniffiEnum implements Clear__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Clear; + constructor() { + super('SpaceListUpdate', 'Clear'); + } + + static new(): Clear_ { + return new Clear_(); + } + + static instanceOf(obj: any): obj is Clear_ { + return obj.tag === SpaceListUpdate_Tags.Clear; + } + } + + type PushFront__interface = { + tag: SpaceListUpdate_Tags.PushFront; + inner: Readonly<{ value: SpaceRoom }>; + }; + + class PushFront_ extends UniffiEnum implements PushFront__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.PushFront; + readonly inner: Readonly<{ value: SpaceRoom }>; + constructor(inner: { value: SpaceRoom }) { + super('SpaceListUpdate', 'PushFront'); + this.inner = Object.freeze(inner); + } + + static new(inner: { value: SpaceRoom }): PushFront_ { + return new PushFront_(inner); + } + + static instanceOf(obj: any): obj is PushFront_ { + return obj.tag === SpaceListUpdate_Tags.PushFront; + } + } + + type PushBack__interface = { + tag: SpaceListUpdate_Tags.PushBack; + inner: Readonly<{ value: SpaceRoom }>; + }; + + class PushBack_ extends UniffiEnum implements PushBack__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.PushBack; + readonly inner: Readonly<{ value: SpaceRoom }>; + constructor(inner: { value: SpaceRoom }) { + super('SpaceListUpdate', 'PushBack'); + this.inner = Object.freeze(inner); + } + + static new(inner: { value: SpaceRoom }): PushBack_ { + return new PushBack_(inner); + } + + static instanceOf(obj: any): obj is PushBack_ { + return obj.tag === SpaceListUpdate_Tags.PushBack; + } + } + + type PopFront__interface = { + tag: SpaceListUpdate_Tags.PopFront; + }; + + class PopFront_ extends UniffiEnum implements PopFront__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.PopFront; + constructor() { + super('SpaceListUpdate', 'PopFront'); + } + + static new(): PopFront_ { + return new PopFront_(); + } + + static instanceOf(obj: any): obj is PopFront_ { + return obj.tag === SpaceListUpdate_Tags.PopFront; + } + } + + type PopBack__interface = { + tag: SpaceListUpdate_Tags.PopBack; + }; + + class PopBack_ extends UniffiEnum implements PopBack__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.PopBack; + constructor() { + super('SpaceListUpdate', 'PopBack'); + } + + static new(): PopBack_ { + return new PopBack_(); + } + + static instanceOf(obj: any): obj is PopBack_ { + return obj.tag === SpaceListUpdate_Tags.PopBack; + } + } + + type Insert__interface = { + tag: SpaceListUpdate_Tags.Insert; + inner: Readonly<{ index: /*u32*/ number; value: SpaceRoom }>; + }; + + class Insert_ extends UniffiEnum implements Insert__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Insert; + readonly inner: Readonly<{ index: /*u32*/ number; value: SpaceRoom }>; + constructor(inner: { index: /*u32*/ number; value: SpaceRoom }) { + super('SpaceListUpdate', 'Insert'); + this.inner = Object.freeze(inner); + } + + static new(inner: { index: /*u32*/ number; value: SpaceRoom }): Insert_ { + return new Insert_(inner); + } + + static instanceOf(obj: any): obj is Insert_ { + return obj.tag === SpaceListUpdate_Tags.Insert; + } + } + + type Set__interface = { + tag: SpaceListUpdate_Tags.Set; + inner: Readonly<{ index: /*u32*/ number; value: SpaceRoom }>; + }; + + class Set_ extends UniffiEnum implements Set__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Set; + readonly inner: Readonly<{ index: /*u32*/ number; value: SpaceRoom }>; + constructor(inner: { index: /*u32*/ number; value: SpaceRoom }) { + super('SpaceListUpdate', 'Set'); + this.inner = Object.freeze(inner); + } + + static new(inner: { index: /*u32*/ number; value: SpaceRoom }): Set_ { + return new Set_(inner); + } + + static instanceOf(obj: any): obj is Set_ { + return obj.tag === SpaceListUpdate_Tags.Set; + } + } + + type Remove__interface = { + tag: SpaceListUpdate_Tags.Remove; + inner: Readonly<{ index: /*u32*/ number }>; + }; + + class Remove_ extends UniffiEnum implements Remove__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Remove; + readonly inner: Readonly<{ index: /*u32*/ number }>; + constructor(inner: { index: /*u32*/ number }) { + super('SpaceListUpdate', 'Remove'); + this.inner = Object.freeze(inner); + } + + static new(inner: { index: /*u32*/ number }): Remove_ { + return new Remove_(inner); + } + + static instanceOf(obj: any): obj is Remove_ { + return obj.tag === SpaceListUpdate_Tags.Remove; + } + } + + type Truncate__interface = { + tag: SpaceListUpdate_Tags.Truncate; + inner: Readonly<{ length: /*u32*/ number }>; + }; + + class Truncate_ extends UniffiEnum implements Truncate__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Truncate; + readonly inner: Readonly<{ length: /*u32*/ number }>; + constructor(inner: { length: /*u32*/ number }) { + super('SpaceListUpdate', 'Truncate'); + this.inner = Object.freeze(inner); + } + + static new(inner: { length: /*u32*/ number }): Truncate_ { + return new Truncate_(inner); + } + + static instanceOf(obj: any): obj is Truncate_ { + return obj.tag === SpaceListUpdate_Tags.Truncate; + } + } + + type Reset__interface = { + tag: SpaceListUpdate_Tags.Reset; + inner: Readonly<{ values: Array }>; + }; + + class Reset_ extends UniffiEnum implements Reset__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceListUpdate'; + readonly tag = SpaceListUpdate_Tags.Reset; + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { + super('SpaceListUpdate', 'Reset'); + this.inner = Object.freeze(inner); + } + + static new(inner: { values: Array }): Reset_ { + return new Reset_(inner); + } + + static instanceOf(obj: any): obj is Reset_ { + return obj.tag === SpaceListUpdate_Tags.Reset; + } + } + + function instanceOf(obj: any): obj is SpaceListUpdate { + return obj[uniffiTypeNameSymbol] === 'SpaceListUpdate'; + } + + return Object.freeze({ + instanceOf, + Append: Append_, + Clear: Clear_, + PushFront: PushFront_, + PushBack: PushBack_, + PopFront: PopFront_, + PopBack: PopBack_, + Insert: Insert_, + Set: Set_, + Remove: Remove_, + Truncate: Truncate_, + Reset: Reset_, + }); +})(); + +export type SpaceListUpdate = InstanceType< + (typeof SpaceListUpdate)[keyof Omit] +>; + +// FfiConverter for enum SpaceListUpdate +const FfiConverterTypeSpaceListUpdate = (() => { + const ordinalConverter = FfiConverterInt32; + type TypeName = SpaceListUpdate; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + switch (ordinalConverter.read(from)) { + case 1: + return new SpaceListUpdate.Append({ + values: FfiConverterArrayTypeSpaceRoom.read(from), + }); + case 2: + return new SpaceListUpdate.Clear(); + case 3: + return new SpaceListUpdate.PushFront({ + value: FfiConverterTypeSpaceRoom.read(from), + }); + case 4: + return new SpaceListUpdate.PushBack({ + value: FfiConverterTypeSpaceRoom.read(from), + }); + case 5: + return new SpaceListUpdate.PopFront(); + case 6: + return new SpaceListUpdate.PopBack(); + case 7: + return new SpaceListUpdate.Insert({ + index: FfiConverterUInt32.read(from), + value: FfiConverterTypeSpaceRoom.read(from), + }); + case 8: + return new SpaceListUpdate.Set({ + index: FfiConverterUInt32.read(from), + value: FfiConverterTypeSpaceRoom.read(from), + }); + case 9: + return new SpaceListUpdate.Remove({ + index: FfiConverterUInt32.read(from), + }); + case 10: + return new SpaceListUpdate.Truncate({ + length: FfiConverterUInt32.read(from), + }); + case 11: + return new SpaceListUpdate.Reset({ + values: FfiConverterArrayTypeSpaceRoom.read(from), + }); + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + write(value: TypeName, into: RustBuffer): void { + switch (value.tag) { + case SpaceListUpdate_Tags.Append: { + ordinalConverter.write(1, into); + const inner = value.inner; + FfiConverterArrayTypeSpaceRoom.write(inner.values, into); + return; + } + case SpaceListUpdate_Tags.Clear: { + ordinalConverter.write(2, into); + return; + } + case SpaceListUpdate_Tags.PushFront: { + ordinalConverter.write(3, into); + const inner = value.inner; + FfiConverterTypeSpaceRoom.write(inner.value, into); + return; + } + case SpaceListUpdate_Tags.PushBack: { + ordinalConverter.write(4, into); + const inner = value.inner; + FfiConverterTypeSpaceRoom.write(inner.value, into); + return; + } + case SpaceListUpdate_Tags.PopFront: { + ordinalConverter.write(5, into); + return; + } + case SpaceListUpdate_Tags.PopBack: { + ordinalConverter.write(6, into); + return; + } + case SpaceListUpdate_Tags.Insert: { + ordinalConverter.write(7, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + FfiConverterTypeSpaceRoom.write(inner.value, into); + return; + } + case SpaceListUpdate_Tags.Set: { + ordinalConverter.write(8, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + FfiConverterTypeSpaceRoom.write(inner.value, into); + return; + } + case SpaceListUpdate_Tags.Remove: { + ordinalConverter.write(9, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + return; + } + case SpaceListUpdate_Tags.Truncate: { + ordinalConverter.write(10, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.length, into); + return; + } + case SpaceListUpdate_Tags.Reset: { + ordinalConverter.write(11, into); + const inner = value.inner; + FfiConverterArrayTypeSpaceRoom.write(inner.values, into); + return; + } + default: + // Throwing from here means that SpaceListUpdate_Tags hasn't matched an ordinal. + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + allocationSize(value: TypeName): number { + switch (value.tag) { + case SpaceListUpdate_Tags.Append: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(1); + size += FfiConverterArrayTypeSpaceRoom.allocationSize(inner.values); + return size; + } + case SpaceListUpdate_Tags.Clear: { + return ordinalConverter.allocationSize(2); + } + case SpaceListUpdate_Tags.PushFront: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(3); + size += FfiConverterTypeSpaceRoom.allocationSize(inner.value); + return size; + } + case SpaceListUpdate_Tags.PushBack: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(4); + size += FfiConverterTypeSpaceRoom.allocationSize(inner.value); + return size; + } + case SpaceListUpdate_Tags.PopFront: { + return ordinalConverter.allocationSize(5); + } + case SpaceListUpdate_Tags.PopBack: { + return ordinalConverter.allocationSize(6); + } + case SpaceListUpdate_Tags.Insert: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(7); + size += FfiConverterUInt32.allocationSize(inner.index); + size += FfiConverterTypeSpaceRoom.allocationSize(inner.value); + return size; + } + case SpaceListUpdate_Tags.Set: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(8); + size += FfiConverterUInt32.allocationSize(inner.index); + size += FfiConverterTypeSpaceRoom.allocationSize(inner.value); + return size; + } + case SpaceListUpdate_Tags.Remove: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(9); + size += FfiConverterUInt32.allocationSize(inner.index); + return size; + } + case SpaceListUpdate_Tags.Truncate: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(10); + size += FfiConverterUInt32.allocationSize(inner.length); + return size; + } + case SpaceListUpdate_Tags.Reset: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(11); + size += FfiConverterArrayTypeSpaceRoom.allocationSize(inner.values); + return size; + } + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + } + return new FFIConverter(); +})(); + // Flat error type: SsoError export enum SsoError_Tags { CallbackUrlInvalid = 'CallbackUrlInvalid', @@ -31165,80 +32484,539 @@ const FfiConverterTypeTagName = (() => { return new FFIConverter(); })(); -export enum TimelineChange { - Append, - Clear, - Insert, - Set, - Remove, - PushBack, - PushFront, - PopBack, - PopFront, - Truncate, - Reset, +// Enum: TimelineDiff +export enum TimelineDiff_Tags { + Append = 'Append', + Clear = 'Clear', + PushFront = 'PushFront', + PushBack = 'PushBack', + PopFront = 'PopFront', + PopBack = 'PopBack', + Insert = 'Insert', + Set = 'Set', + Remove = 'Remove', + Truncate = 'Truncate', + Reset = 'Reset', } +export const TimelineDiff = (() => { + type Append__interface = { + tag: TimelineDiff_Tags.Append; + inner: Readonly<{ values: Array }>; + }; + + class Append_ extends UniffiEnum implements Append__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Append; + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { + super('TimelineDiff', 'Append'); + this.inner = Object.freeze(inner); + } + + static new(inner: { values: Array }): Append_ { + return new Append_(inner); + } + + static instanceOf(obj: any): obj is Append_ { + return obj.tag === TimelineDiff_Tags.Append; + } + } + + type Clear__interface = { + tag: TimelineDiff_Tags.Clear; + }; + + class Clear_ extends UniffiEnum implements Clear__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Clear; + constructor() { + super('TimelineDiff', 'Clear'); + } + + static new(): Clear_ { + return new Clear_(); + } + + static instanceOf(obj: any): obj is Clear_ { + return obj.tag === TimelineDiff_Tags.Clear; + } + } + + type PushFront__interface = { + tag: TimelineDiff_Tags.PushFront; + inner: Readonly<{ value: TimelineItemInterface }>; + }; + + class PushFront_ extends UniffiEnum implements PushFront__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.PushFront; + readonly inner: Readonly<{ value: TimelineItemInterface }>; + constructor(inner: { value: TimelineItemInterface }) { + super('TimelineDiff', 'PushFront'); + this.inner = Object.freeze(inner); + } + + static new(inner: { value: TimelineItemInterface }): PushFront_ { + return new PushFront_(inner); + } + + static instanceOf(obj: any): obj is PushFront_ { + return obj.tag === TimelineDiff_Tags.PushFront; + } + } + + type PushBack__interface = { + tag: TimelineDiff_Tags.PushBack; + inner: Readonly<{ value: TimelineItemInterface }>; + }; + + class PushBack_ extends UniffiEnum implements PushBack__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.PushBack; + readonly inner: Readonly<{ value: TimelineItemInterface }>; + constructor(inner: { value: TimelineItemInterface }) { + super('TimelineDiff', 'PushBack'); + this.inner = Object.freeze(inner); + } + + static new(inner: { value: TimelineItemInterface }): PushBack_ { + return new PushBack_(inner); + } + + static instanceOf(obj: any): obj is PushBack_ { + return obj.tag === TimelineDiff_Tags.PushBack; + } + } + + type PopFront__interface = { + tag: TimelineDiff_Tags.PopFront; + }; + + class PopFront_ extends UniffiEnum implements PopFront__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.PopFront; + constructor() { + super('TimelineDiff', 'PopFront'); + } + + static new(): PopFront_ { + return new PopFront_(); + } + + static instanceOf(obj: any): obj is PopFront_ { + return obj.tag === TimelineDiff_Tags.PopFront; + } + } + + type PopBack__interface = { + tag: TimelineDiff_Tags.PopBack; + }; + + class PopBack_ extends UniffiEnum implements PopBack__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.PopBack; + constructor() { + super('TimelineDiff', 'PopBack'); + } + + static new(): PopBack_ { + return new PopBack_(); + } + + static instanceOf(obj: any): obj is PopBack_ { + return obj.tag === TimelineDiff_Tags.PopBack; + } + } + + type Insert__interface = { + tag: TimelineDiff_Tags.Insert; + inner: Readonly<{ index: /*u32*/ number; value: TimelineItemInterface }>; + }; + + class Insert_ extends UniffiEnum implements Insert__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Insert; + readonly inner: Readonly<{ + index: /*u32*/ number; + value: TimelineItemInterface; + }>; + constructor(inner: { + index: /*u32*/ number; + value: TimelineItemInterface; + }) { + super('TimelineDiff', 'Insert'); + this.inner = Object.freeze(inner); + } + + static new(inner: { + index: /*u32*/ number; + value: TimelineItemInterface; + }): Insert_ { + return new Insert_(inner); + } + + static instanceOf(obj: any): obj is Insert_ { + return obj.tag === TimelineDiff_Tags.Insert; + } + } + + type Set__interface = { + tag: TimelineDiff_Tags.Set; + inner: Readonly<{ index: /*u32*/ number; value: TimelineItemInterface }>; + }; + + class Set_ extends UniffiEnum implements Set__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Set; + readonly inner: Readonly<{ + index: /*u32*/ number; + value: TimelineItemInterface; + }>; + constructor(inner: { + index: /*u32*/ number; + value: TimelineItemInterface; + }) { + super('TimelineDiff', 'Set'); + this.inner = Object.freeze(inner); + } + + static new(inner: { + index: /*u32*/ number; + value: TimelineItemInterface; + }): Set_ { + return new Set_(inner); + } + + static instanceOf(obj: any): obj is Set_ { + return obj.tag === TimelineDiff_Tags.Set; + } + } + + type Remove__interface = { + tag: TimelineDiff_Tags.Remove; + inner: Readonly<{ index: /*u32*/ number }>; + }; + + class Remove_ extends UniffiEnum implements Remove__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Remove; + readonly inner: Readonly<{ index: /*u32*/ number }>; + constructor(inner: { index: /*u32*/ number }) { + super('TimelineDiff', 'Remove'); + this.inner = Object.freeze(inner); + } + + static new(inner: { index: /*u32*/ number }): Remove_ { + return new Remove_(inner); + } + + static instanceOf(obj: any): obj is Remove_ { + return obj.tag === TimelineDiff_Tags.Remove; + } + } + + type Truncate__interface = { + tag: TimelineDiff_Tags.Truncate; + inner: Readonly<{ length: /*u32*/ number }>; + }; + + class Truncate_ extends UniffiEnum implements Truncate__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Truncate; + readonly inner: Readonly<{ length: /*u32*/ number }>; + constructor(inner: { length: /*u32*/ number }) { + super('TimelineDiff', 'Truncate'); + this.inner = Object.freeze(inner); + } + + static new(inner: { length: /*u32*/ number }): Truncate_ { + return new Truncate_(inner); + } + + static instanceOf(obj: any): obj is Truncate_ { + return obj.tag === TimelineDiff_Tags.Truncate; + } + } + + type Reset__interface = { + tag: TimelineDiff_Tags.Reset; + inner: Readonly<{ values: Array }>; + }; + + class Reset_ extends UniffiEnum implements Reset__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; + readonly tag = TimelineDiff_Tags.Reset; + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { + super('TimelineDiff', 'Reset'); + this.inner = Object.freeze(inner); + } + + static new(inner: { values: Array }): Reset_ { + return new Reset_(inner); + } + + static instanceOf(obj: any): obj is Reset_ { + return obj.tag === TimelineDiff_Tags.Reset; + } + } + + function instanceOf(obj: any): obj is TimelineDiff { + return obj[uniffiTypeNameSymbol] === 'TimelineDiff'; + } + + return Object.freeze({ + instanceOf, + Append: Append_, + Clear: Clear_, + PushFront: PushFront_, + PushBack: PushBack_, + PopFront: PopFront_, + PopBack: PopBack_, + Insert: Insert_, + Set: Set_, + Remove: Remove_, + Truncate: Truncate_, + Reset: Reset_, + }); +})(); + +export type TimelineDiff = InstanceType< + (typeof TimelineDiff)[keyof Omit] +>; -const FfiConverterTypeTimelineChange = (() => { +// FfiConverter for enum TimelineDiff +const FfiConverterTypeTimelineDiff = (() => { const ordinalConverter = FfiConverterInt32; - type TypeName = TimelineChange; + type TypeName = TimelineDiff; class FFIConverter extends AbstractFfiConverterByteArray { read(from: RustBuffer): TypeName { switch (ordinalConverter.read(from)) { case 1: - return TimelineChange.Append; + return new TimelineDiff.Append({ + values: FfiConverterArrayTypeTimelineItem.read(from), + }); case 2: - return TimelineChange.Clear; + return new TimelineDiff.Clear(); case 3: - return TimelineChange.Insert; + return new TimelineDiff.PushFront({ + value: FfiConverterTypeTimelineItem.read(from), + }); case 4: - return TimelineChange.Set; + return new TimelineDiff.PushBack({ + value: FfiConverterTypeTimelineItem.read(from), + }); case 5: - return TimelineChange.Remove; + return new TimelineDiff.PopFront(); case 6: - return TimelineChange.PushBack; + return new TimelineDiff.PopBack(); case 7: - return TimelineChange.PushFront; + return new TimelineDiff.Insert({ + index: FfiConverterUInt32.read(from), + value: FfiConverterTypeTimelineItem.read(from), + }); case 8: - return TimelineChange.PopBack; + return new TimelineDiff.Set({ + index: FfiConverterUInt32.read(from), + value: FfiConverterTypeTimelineItem.read(from), + }); case 9: - return TimelineChange.PopFront; + return new TimelineDiff.Remove({ + index: FfiConverterUInt32.read(from), + }); case 10: - return TimelineChange.Truncate; + return new TimelineDiff.Truncate({ + length: FfiConverterUInt32.read(from), + }); case 11: - return TimelineChange.Reset; + return new TimelineDiff.Reset({ + values: FfiConverterArrayTypeTimelineItem.read(from), + }); default: throw new UniffiInternalError.UnexpectedEnumCase(); } } write(value: TypeName, into: RustBuffer): void { - switch (value) { - case TimelineChange.Append: - return ordinalConverter.write(1, into); - case TimelineChange.Clear: - return ordinalConverter.write(2, into); - case TimelineChange.Insert: - return ordinalConverter.write(3, into); - case TimelineChange.Set: - return ordinalConverter.write(4, into); - case TimelineChange.Remove: - return ordinalConverter.write(5, into); - case TimelineChange.PushBack: - return ordinalConverter.write(6, into); - case TimelineChange.PushFront: - return ordinalConverter.write(7, into); - case TimelineChange.PopBack: - return ordinalConverter.write(8, into); - case TimelineChange.PopFront: - return ordinalConverter.write(9, into); - case TimelineChange.Truncate: - return ordinalConverter.write(10, into); - case TimelineChange.Reset: - return ordinalConverter.write(11, into); + switch (value.tag) { + case TimelineDiff_Tags.Append: { + ordinalConverter.write(1, into); + const inner = value.inner; + FfiConverterArrayTypeTimelineItem.write(inner.values, into); + return; + } + case TimelineDiff_Tags.Clear: { + ordinalConverter.write(2, into); + return; + } + case TimelineDiff_Tags.PushFront: { + ordinalConverter.write(3, into); + const inner = value.inner; + FfiConverterTypeTimelineItem.write(inner.value, into); + return; + } + case TimelineDiff_Tags.PushBack: { + ordinalConverter.write(4, into); + const inner = value.inner; + FfiConverterTypeTimelineItem.write(inner.value, into); + return; + } + case TimelineDiff_Tags.PopFront: { + ordinalConverter.write(5, into); + return; + } + case TimelineDiff_Tags.PopBack: { + ordinalConverter.write(6, into); + return; + } + case TimelineDiff_Tags.Insert: { + ordinalConverter.write(7, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + FfiConverterTypeTimelineItem.write(inner.value, into); + return; + } + case TimelineDiff_Tags.Set: { + ordinalConverter.write(8, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + FfiConverterTypeTimelineItem.write(inner.value, into); + return; + } + case TimelineDiff_Tags.Remove: { + ordinalConverter.write(9, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.index, into); + return; + } + case TimelineDiff_Tags.Truncate: { + ordinalConverter.write(10, into); + const inner = value.inner; + FfiConverterUInt32.write(inner.length, into); + return; + } + case TimelineDiff_Tags.Reset: { + ordinalConverter.write(11, into); + const inner = value.inner; + FfiConverterArrayTypeTimelineItem.write(inner.values, into); + return; + } + default: + // Throwing from here means that TimelineDiff_Tags hasn't matched an ordinal. + throw new UniffiInternalError.UnexpectedEnumCase(); } } allocationSize(value: TypeName): number { - return ordinalConverter.allocationSize(0); + switch (value.tag) { + case TimelineDiff_Tags.Append: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(1); + size += FfiConverterArrayTypeTimelineItem.allocationSize( + inner.values + ); + return size; + } + case TimelineDiff_Tags.Clear: { + return ordinalConverter.allocationSize(2); + } + case TimelineDiff_Tags.PushFront: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(3); + size += FfiConverterTypeTimelineItem.allocationSize(inner.value); + return size; + } + case TimelineDiff_Tags.PushBack: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(4); + size += FfiConverterTypeTimelineItem.allocationSize(inner.value); + return size; + } + case TimelineDiff_Tags.PopFront: { + return ordinalConverter.allocationSize(5); + } + case TimelineDiff_Tags.PopBack: { + return ordinalConverter.allocationSize(6); + } + case TimelineDiff_Tags.Insert: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(7); + size += FfiConverterUInt32.allocationSize(inner.index); + size += FfiConverterTypeTimelineItem.allocationSize(inner.value); + return size; + } + case TimelineDiff_Tags.Set: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(8); + size += FfiConverterUInt32.allocationSize(inner.index); + size += FfiConverterTypeTimelineItem.allocationSize(inner.value); + return size; + } + case TimelineDiff_Tags.Remove: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(9); + size += FfiConverterUInt32.allocationSize(inner.index); + return size; + } + case TimelineDiff_Tags.Truncate: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(10); + size += FfiConverterUInt32.allocationSize(inner.length); + return size; + } + case TimelineDiff_Tags.Reset: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(11); + size += FfiConverterArrayTypeTimelineItem.allocationSize( + inner.values + ); + return size; + } + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } } } return new FFIConverter(); @@ -32386,6 +34164,10 @@ export enum TraceLogPacks { * Enables all the logs relevant to the notification client. */ NotificationClient, + /** + * Enables all the logs relevant to sync profiling. + */ + SyncProfiling, } const FfiConverterTypeTraceLogPacks = (() => { @@ -32402,6 +34184,8 @@ const FfiConverterTypeTraceLogPacks = (() => { return TraceLogPacks.Timeline; case 4: return TraceLogPacks.NotificationClient; + case 5: + return TraceLogPacks.SyncProfiling; default: throw new UniffiInternalError.UnexpectedEnumCase(); } @@ -32416,6 +34200,8 @@ const FfiConverterTypeTraceLogPacks = (() => { return ordinalConverter.write(3, into); case TraceLogPacks.NotificationClient: return ordinalConverter.write(4, into); + case TraceLogPacks.SyncProfiling: + return ordinalConverter.write(5, into); } } allocationSize(value: TypeName): number { @@ -33526,6 +35312,11 @@ export interface ClientInterface { enable: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise; + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */ + enableSendQueueUploadProgress(enable: boolean): void; encryption(): EncryptionInterface; /** * Fetch the media preview configuration from the server. @@ -33625,13 +35416,19 @@ export interface ClientInterface { signal: AbortSignal; }) /*throws*/ : Promise; /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ getUrl( url: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * The homeserver this client is configured to use. */ @@ -33734,6 +35531,25 @@ export interface ClientInterface { callbackUrl: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ + loginWithQrCode( + qrCodeData: QrCodeDataInterface, + oidcConfiguration: OidcConfiguration, + progressListener: QrLoginProgressListener, + asyncOpts_?: { signal: AbortSignal } + ) /*throws*/ : Promise; /** * Log the current user out. */ @@ -33834,6 +35650,15 @@ export interface ClientInterface { * name, then the homeserver has been discovered, and we know both. */ server(): string | undefined; + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ + serverVendorInfo(asyncOpts_?: { + signal: AbortSignal; + }) /*throws*/ : Promise; session() /*throws*/ : Session; /** * Set the given account data content for the given event type. @@ -33901,6 +35726,7 @@ export interface ClientInterface { * The sliding sync version. */ slidingSyncVersion(): SlidingSyncVersion; + spaceService(): SpaceServiceInterface; /** * Returns a handler to start the SSO login process. */ @@ -33986,11 +35812,24 @@ export interface ClientInterface { * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ urlForOidc( oidcConfiguration: OidcConfiguration, prompt: OidcPrompt | undefined, loginHint: string | undefined, + deviceId: string | undefined, + additionalScopes: Array | undefined, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; userId() /*throws*/ : string; @@ -34649,6 +36488,23 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */ + public enableSendQueueUploadProgress(enable: boolean): void { + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + uniffiTypeClientObjectFactory.clonePointer(this), + FfiConverterBool.lower(enable), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ); + } + public encryption(): EncryptionInterface { return FfiConverterTypeEncryption.lift( uniffiCaller.rustCall( @@ -35245,13 +37101,19 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ public async getUrl( url: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -35270,7 +37132,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/ nativeModule() .ubrn_ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, - /*liftFunc:*/ FfiConverterString.lift.bind(FfiConverterString), + /*liftFunc:*/ FfiConverterArrayBuffer.lift.bind( + FfiConverterArrayBuffer + ), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( @@ -35802,6 +37666,60 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ + public async loginWithQrCode( + qrCodeData: QrCodeDataInterface, + oidcConfiguration: OidcConfiguration, + progressListener: QrLoginProgressListener, + asyncOpts_?: { signal: AbortSignal } + ): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + uniffiTypeClientObjectFactory.clonePointer(this), + FfiConverterTypeQrCodeData.lower(qrCodeData), + FfiConverterTypeOidcConfiguration.lower(oidcConfiguration), + FfiConverterTypeQrLoginProgressListener.lower(progressListener) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, + /*liftFunc:*/ (_v) => {}, + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeHumanQrLoginError.lift.bind( + FfiConverterTypeHumanQrLoginError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + /** * Log the current user out. */ @@ -36281,6 +38199,49 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ + public async serverVendorInfo(asyncOpts_?: { + signal: AbortSignal; + }): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + uniffiTypeClientObjectFactory.clonePointer(this) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, + /*liftFunc:*/ FfiConverterTypeServerVendorInfo.lift.bind( + FfiConverterTypeServerVendorInfo + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + public session(): Session /*throws*/ { return FfiConverterTypeSession.lift( uniffiCaller.rustCallWithError( @@ -36631,6 +38592,20 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } + public spaceService(): SpaceServiceInterface { + return FfiConverterTypeSpaceService.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_client_space_service( + uniffiTypeClientObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Returns a handler to start the SSO login process. */ @@ -37001,11 +38976,24 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ public async urlForOidc( oidcConfiguration: OidcConfiguration, prompt: OidcPrompt | undefined, loginHint: string | undefined, + deviceId: string | undefined, + additionalScopes: Array | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -37017,7 +39005,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { uniffiTypeClientObjectFactory.clonePointer(this), FfiConverterTypeOidcConfiguration.lower(oidcConfiguration), FfiConverterOptionalTypeOidcPrompt.lower(prompt), - FfiConverterOptionalString.lower(loginHint) + FfiConverterOptionalString.lower(loginHint), + FfiConverterOptionalString.lower(deviceId), + FfiConverterOptionalArrayString.lower(additionalScopes) ); }, /*pollFunc:*/ nativeModule() @@ -37189,26 +39179,6 @@ export interface ClientBuilderInterface { build(asyncOpts_?: { signal: AbortSignal; }) /*throws*/ : Promise; - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ - buildWithQrCode( - qrCodeData: QrCodeDataInterface, - oidcConfiguration: OidcConfiguration, - progressListener: QrLoginProgressListener, - asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; crossProcessStoreLocksHolderName(holderName: string): ClientBuilderInterface; /** * Set the trust requirement to be used when decrypting events. @@ -37320,7 +39290,14 @@ export interface ClientBuilderInterface { * check [`SqliteStoreConfig::with_low_memory_config`]. */ systemIsMemoryConstrained(): ClientBuilderInterface; - threadsEnabled(enabled: boolean): ClientBuilderInterface; + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */ + threadsEnabled( + enabled: boolean, + threadSubscriptions: boolean + ): ClientBuilderInterface; userAgent(userAgent: string): ClientBuilderInterface; username(username: string): ClientBuilderInterface; } @@ -37459,61 +39436,6 @@ export class ClientBuilder } } - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ - public async buildWithQrCode( - qrCodeData: QrCodeDataInterface, - oidcConfiguration: OidcConfiguration, - progressListener: QrLoginProgressListener, - asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { - const __stack = uniffiIsDebug ? new Error().stack : undefined; - try { - return await uniffiRustCallAsync( - /*rustCaller:*/ uniffiCaller, - /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build_with_qr_code( - uniffiTypeClientBuilderObjectFactory.clonePointer(this), - FfiConverterTypeQrCodeData.lower(qrCodeData), - FfiConverterTypeOidcConfiguration.lower(oidcConfiguration), - FfiConverterTypeQrLoginProgressListener.lower(progressListener) - ); - }, - /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, - /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, - /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, - /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, - /*liftFunc:*/ FfiConverterTypeClient.lift.bind(FfiConverterTypeClient), - /*liftString:*/ FfiConverterString.lift, - /*asyncOpts:*/ asyncOpts_, - /*errorHandler:*/ FfiConverterTypeHumanQrLoginError.lift.bind( - FfiConverterTypeHumanQrLoginError - ) - ); - } catch (__error: any) { - if (uniffiIsDebug && __error instanceof Error) { - __error.stack = __stack; - } - throw __error; - } - } - public crossProcessStoreLocksHolderName( holderName: string ): ClientBuilderInterface { @@ -37926,13 +39848,21 @@ export class ClientBuilder ); } - public threadsEnabled(enabled: boolean): ClientBuilderInterface { + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */ + public threadsEnabled( + enabled: boolean, + threadSubscriptions: boolean + ): ClientBuilderInterface { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( uniffiTypeClientBuilderObjectFactory.clonePointer(this), FfiConverterBool.lower(enabled), + FfiConverterBool.lower(threadSubscriptions), callStatus ); }, @@ -38926,6 +40856,10 @@ export interface HomeserverLoginDetailsInterface { * Whether the current homeserver supports the password login flow. */ supportsPasswordLogin(): boolean; + /** + * Whether the current homeserver supports login using legacy SSO. + */ + supportsSsoLogin(): boolean; /** * The URL of the currently configured homeserver. */ @@ -39016,6 +40950,23 @@ export class HomeserverLoginDetails ); } + /** + * Whether the current homeserver supports login using legacy SSO. + */ + public supportsSsoLogin(): boolean { + return FfiConverterBool.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + uniffiTypeHomeserverLoginDetailsObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * The URL of the currently configured homeserver. */ @@ -41943,6 +43894,18 @@ export interface RoomInterface { */ enableSendQueue(enable: boolean): void; encryptionState(): EncryptionState; + /** + * Return the current MSC4306 thread subscription for the given thread root + * in this room. + * + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. + */ + fetchThreadSubscription( + threadRootEventId: string, + asyncOpts_?: { signal: AbortSignal } + ) /*throws*/ : Promise; /** * Forget this room. * @@ -42116,6 +44079,9 @@ export interface RoomInterface { * The room's current membership state. */ membership(): Membership; + newLatestEvent(asyncOpts_?: { + signal: AbortSignal; + }): Promise; ownUserId(): string; /** * If this room is the successor of a tombstoned room, return the @@ -42218,7 +44184,7 @@ export interface RoomInterface { * Returns an error if the room is not found or on rate limit */ reportRoom( - reason: string | undefined, + reason: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; resetPowerLevels(asyncOpts_?: { @@ -42241,45 +44207,6 @@ export interface RoomInterface { threadRoot: string | undefined, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; - /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. - */ - sendCallNotification( - callId: string, - application: RtcApplicationType, - notifyType: NotifyType, - mentions: Mentions, - asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; - /** - * This will only send a call notification event if appropriate. - * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. - * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify - * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ - sendCallNotificationIfNeeded(asyncOpts_?: { - signal: AbortSignal; - }) /*throws*/ : Promise; /** * Send the current users live location beacon in the room. */ @@ -42318,6 +44245,24 @@ export interface RoomInterface { name: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; + /** + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. + */ + setThreadSubscription( + threadRootEventId: string, + subscribed: boolean, + asyncOpts_?: { signal: AbortSignal } + ) /*throws*/ : Promise; /** * Sets a new topic in the room. */ @@ -42738,15 +44683,119 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * Forces the currently active room key, which is used to encrypt messages, - * to be rotated. - * - * A new room key will be crated and shared with all the room members the - * next time a message will be sent. You don't have to call this method, - * room keys will be rotated automatically when necessary. This method is - * still useful for debugging purposes. + * Forces the currently active room key, which is used to encrypt messages, + * to be rotated. + * + * A new room key will be crated and shared with all the room members the + * next time a message will be sent. You don't have to call this method, + * room keys will be rotated automatically when necessary. This method is + * still useful for debugging purposes. + */ + public async discardRoomKey(asyncOpts_?: { + signal: AbortSignal; + }): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + uniffiTypeRoomObjectFactory.clonePointer(this) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, + /*liftFunc:*/ (_v) => {}, + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + + /** + * Returns the room's name from the state event if available, otherwise + * compute a room name based on the room's nature (DM or not) and number of + * members. + */ + public displayName(): string | undefined { + return FfiConverterOptionalString.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_display_name( + uniffiTypeRoomObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * Edit an event given its event id. + * + * Useful outside the context of a timeline, or when a timeline doesn't + * have the full content of an event. + */ + public async edit( + eventId: string, + newContent: RoomMessageEventContentWithoutRelationInterface, + asyncOpts_?: { signal: AbortSignal } + ): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_edit( + uniffiTypeRoomObjectFactory.clonePointer(this), + FfiConverterString.lower(eventId), + FfiConverterTypeRoomMessageEventContentWithoutRelation.lower( + newContent + ) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, + /*liftFunc:*/ (_v) => {}, + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + + /** + * Enable End-to-end encryption in this room. */ - public async discardRoomKey(asyncOpts_?: { + public async enableEncryption(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42754,7 +44803,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( uniffiTypeRoomObjectFactory.clonePointer(this) ); }, @@ -42782,15 +44831,26 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * Returns the room's name from the state event if available, otherwise - * compute a room name based on the room's nature (DM or not) and number of - * members. + * Enable or disable the send queue for that particular room. */ - public displayName(): string | undefined { - return FfiConverterOptionalString.lift( + public enableSendQueue(enable: boolean): void { + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( + uniffiTypeRoomObjectFactory.clonePointer(this), + FfiConverterBool.lower(enable), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ); + } + + public encryptionState(): EncryptionState { + return FfiConverterTypeEncryptionState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_display_name( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( uniffiTypeRoomObjectFactory.clonePointer(this), callStatus ); @@ -42801,76 +44861,38 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * Edit an event given its event id. + * Return the current MSC4306 thread subscription for the given thread root + * in this room. * - * Useful outside the context of a timeline, or when a timeline doesn't - * have the full content of an event. + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. */ - public async edit( - eventId: string, - newContent: RoomMessageEventContentWithoutRelationInterface, + public async fetchThreadSubscription( + threadRootEventId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_edit( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterString.lower(eventId), - FfiConverterTypeRoomMessageEventContentWithoutRelation.lower( - newContent - ) - ); - }, - /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, - /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, - /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, - /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, - /*liftFunc:*/ (_v) => {}, - /*liftString:*/ FfiConverterString.lift, - /*asyncOpts:*/ asyncOpts_, - /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ) - ); - } catch (__error: any) { - if (uniffiIsDebug && __error instanceof Error) { - __error.stack = __stack; - } - throw __error; - } - } - - /** - * Enable End-to-end encryption in this room. - */ - public async enableEncryption(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { - const __stack = uniffiIsDebug ? new Error().stack : undefined; - try { - return await uniffiRustCallAsync( - /*rustCaller:*/ uniffiCaller, - /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( - uniffiTypeRoomObjectFactory.clonePointer(this) + FfiConverterString.lower(threadRootEventId) ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, - /*liftFunc:*/ (_v) => {}, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, + /*liftFunc:*/ FfiConverterOptionalTypeThreadSubscription.lift.bind( + FfiConverterOptionalTypeThreadSubscription + ), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( @@ -42885,36 +44907,6 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - /** - * Enable or disable the send queue for that particular room. - */ - public enableSendQueue(enable: boolean): void { - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( - uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterBool.lower(enable), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ); - } - - public encryptionState(): EncryptionState { - return FfiConverterTypeEncryptionState.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( - uniffiTypeRoomObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - /** * Forget this room. * @@ -44011,6 +46003,40 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } + public async newLatestEvent(asyncOpts_?: { + signal: AbortSignal; + }): Promise { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + uniffiTypeRoomObjectFactory.clonePointer(this) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, + /*liftFunc:*/ FfiConverterTypeLatestEventValue.lift.bind( + FfiConverterTypeLatestEventValue + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_ + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + public ownUserId(): string { return FfiConverterString.lift( uniffiCaller.rustCall( @@ -44356,7 +46382,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Returns an error if the room is not found or on rate limit */ public async reportRoom( - reason: string | undefined, + reason: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44366,7 +46392,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /*rustFutureFunc:*/ () => { return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_report_room( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterOptionalString.lower(reason) + FfiConverterString.lower(reason) ); }, /*pollFunc:*/ nativeModule() @@ -44551,23 +46577,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. + * Send the current users live location beacon in the room. */ - public async sendCallNotification( - callId: string, - application: RtcApplicationType, - notifyType: NotifyType, - mentions: Mentions, + public async sendLiveLocation( + geoUri: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44575,12 +46588,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterString.lower(callId), - FfiConverterTypeRtcApplicationType.lower(application), - FfiConverterTypeNotifyType.lower(notifyType), - FfiConverterTypeMentions.lower(mentions) + FfiConverterString.lower(geoUri) ); }, /*pollFunc:*/ nativeModule() @@ -44607,61 +46617,17 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * This will only send a call notification event if appropriate. + * Send a raw event to the room. * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. + * # Arguments * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify + * * `event_type` - The type of the event to send. * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ - public async sendCallNotificationIfNeeded(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { - const __stack = uniffiIsDebug ? new Error().stack : undefined; - try { - return await uniffiRustCallAsync( - /*rustCaller:*/ uniffiCaller, - /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - uniffiTypeRoomObjectFactory.clonePointer(this) - ); - }, - /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_i8, - /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_i8, - /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_i8, - /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_i8, - /*liftFunc:*/ FfiConverterBool.lift.bind(FfiConverterBool), - /*liftString:*/ FfiConverterString.lift, - /*asyncOpts:*/ asyncOpts_, - /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ) - ); - } catch (__error: any) { - if (uniffiIsDebug && __error instanceof Error) { - __error.stack = __stack; - } - throw __error; - } - } - - /** - * Send the current users live location beacon in the room. + * * `content` - The content of the event to send encoded as JSON string. */ - public async sendLiveLocation( - geoUri: string, + public async sendRaw( + eventType: string, + content: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44669,9 +46635,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_raw( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterString.lower(geoUri) + FfiConverterString.lower(eventType), + FfiConverterString.lower(content) ); }, /*pollFunc:*/ nativeModule() @@ -44697,18 +46664,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - /** - * Send a raw event to the room. - * - * # Arguments - * - * * `event_type` - The type of the event to send. - * - * * `content` - The content of the event to send encoded as JSON string. - */ - public async sendRaw( - eventType: string, - content: string, + public async setIsFavourite( + isFavourite: boolean, + tagOrder: /*f64*/ number | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44716,10 +46674,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_send_raw( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterString.lower(eventType), - FfiConverterString.lower(content) + FfiConverterBool.lower(isFavourite), + FfiConverterOptionalFloat64.lower(tagOrder) ); }, /*pollFunc:*/ nativeModule() @@ -44745,8 +46703,8 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async setIsFavourite( - isFavourite: boolean, + public async setIsLowPriority( + isLowPriority: boolean, tagOrder: /*f64*/ number | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -44755,9 +46713,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterBool.lower(isFavourite), + FfiConverterBool.lower(isLowPriority), FfiConverterOptionalFloat64.lower(tagOrder) ); }, @@ -44784,9 +46742,11 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async setIsLowPriority( - isLowPriority: boolean, - tagOrder: /*f64*/ number | undefined, + /** + * Sets a new name to the room. + */ + public async setName( + name: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44794,10 +46754,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_name( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterBool.lower(isLowPriority), - FfiConverterOptionalFloat64.lower(tagOrder) + FfiConverterString.lower(name) ); }, /*pollFunc:*/ nativeModule() @@ -44824,10 +46783,21 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } /** - * Sets a new name to the room. + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. */ - public async setName( - name: string, + public async setThreadSubscription( + threadRootEventId: string, + subscribed: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44835,9 +46805,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { return await uniffiRustCallAsync( /*rustCaller:*/ uniffiCaller, /*rustFutureFunc:*/ () => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_name( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( uniffiTypeRoomObjectFactory.clonePointer(this), - FfiConverterString.lower(name) + FfiConverterString.lower(threadRootEventId), + FfiConverterBool.lower(subscribed) ); }, /*pollFunc:*/ nativeModule() @@ -47848,7 +49819,7 @@ export interface RoomPreviewInterface { /** * Returns the room info the preview contains. */ - info() /*throws*/ : RoomPreviewInfo; + info(): RoomPreviewInfo; /** * Get the user who created the invite, if any. */ @@ -47933,12 +49904,9 @@ export class RoomPreview /** * Returns the room info the preview contains. */ - public info(): RoomPreviewInfo /*throws*/ { + public info(): RoomPreviewInfo { return FfiConverterTypeRoomPreviewInfo.lift( - uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ), + uniffiCaller.rustCall( /*caller:*/ (callStatus) => { return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_roompreview_info( uniffiTypeRoomPreviewObjectFactory.clonePointer(this), @@ -49173,38 +51141,449 @@ export class SessionVerificationController uniffiDestroy(): void { const ptr = (this as any)[destructorGuardSymbol]; if (ptr !== undefined) { - const pointer = - uniffiTypeSessionVerificationControllerObjectFactory.pointer(this); - uniffiTypeSessionVerificationControllerObjectFactory.freePointer(pointer); - uniffiTypeSessionVerificationControllerObjectFactory.unbless(ptr); + const pointer = + uniffiTypeSessionVerificationControllerObjectFactory.pointer(this); + uniffiTypeSessionVerificationControllerObjectFactory.freePointer(pointer); + uniffiTypeSessionVerificationControllerObjectFactory.unbless(ptr); + delete (this as any)[destructorGuardSymbol]; + } + } + + static instanceOf(obj: any): obj is SessionVerificationController { + return uniffiTypeSessionVerificationControllerObjectFactory.isConcreteType( + obj + ); + } +} + +const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory = + (() => { + return { + create( + pointer: UnsafeMutableRawPointer + ): SessionVerificationControllerInterface { + const instance = Object.create(SessionVerificationController.prototype); + instance[pointerLiteralSymbol] = pointer; + instance[destructorGuardSymbol] = this.bless(pointer); + instance[uniffiTypeNameSymbol] = 'SessionVerificationController'; + return instance; + }, + + bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + return uniffiCaller.rustCall( + /*caller:*/ (status) => + nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationcontroller_ffi__bless_pointer( + p, + status + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + unbless(ptr: UniffiRustArcPtr) { + ptr.markDestroyed(); + }, + + pointer( + obj: SessionVerificationControllerInterface + ): UnsafeMutableRawPointer { + if ((obj as any)[destructorGuardSymbol] === undefined) { + throw new UniffiInternalError.UnexpectedNullPointer(); + } + return (obj as any)[pointerLiteralSymbol]; + }, + + clonePointer( + obj: SessionVerificationControllerInterface + ): UnsafeMutableRawPointer { + const pointer = this.pointer(obj); + return uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + freePointer(pointer: UnsafeMutableRawPointer): void { + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + isConcreteType(obj: any): obj is SessionVerificationControllerInterface { + return ( + obj[destructorGuardSymbol] && + obj[uniffiTypeNameSymbol] === 'SessionVerificationController' + ); + }, + }; + })(); +// FfiConverter for SessionVerificationControllerInterface +const FfiConverterTypeSessionVerificationController = new FfiConverterObject( + uniffiTypeSessionVerificationControllerObjectFactory +); + +export interface SessionVerificationEmojiInterface { + description(): string; + symbol(): string; +} + +export class SessionVerificationEmoji + extends UniffiAbstractObject + implements SessionVerificationEmojiInterface +{ + readonly [uniffiTypeNameSymbol] = 'SessionVerificationEmoji'; + readonly [destructorGuardSymbol]: UniffiRustArcPtr; + readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + // No primary constructor declared for this class. + private constructor(pointer: UnsafeMutableRawPointer) { + super(); + this[pointerLiteralSymbol] = pointer; + this[destructorGuardSymbol] = + uniffiTypeSessionVerificationEmojiObjectFactory.bless(pointer); + } + + public description(): string { + return FfiConverterString.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( + uniffiTypeSessionVerificationEmojiObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + public symbol(): string { + return FfiConverterString.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( + uniffiTypeSessionVerificationEmojiObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} + */ + uniffiDestroy(): void { + const ptr = (this as any)[destructorGuardSymbol]; + if (ptr !== undefined) { + const pointer = + uniffiTypeSessionVerificationEmojiObjectFactory.pointer(this); + uniffiTypeSessionVerificationEmojiObjectFactory.freePointer(pointer); + uniffiTypeSessionVerificationEmojiObjectFactory.unbless(ptr); + delete (this as any)[destructorGuardSymbol]; + } + } + + static instanceOf(obj: any): obj is SessionVerificationEmoji { + return uniffiTypeSessionVerificationEmojiObjectFactory.isConcreteType(obj); + } +} + +const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory = + (() => { + return { + create( + pointer: UnsafeMutableRawPointer + ): SessionVerificationEmojiInterface { + const instance = Object.create(SessionVerificationEmoji.prototype); + instance[pointerLiteralSymbol] = pointer; + instance[destructorGuardSymbol] = this.bless(pointer); + instance[uniffiTypeNameSymbol] = 'SessionVerificationEmoji'; + return instance; + }, + + bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + return uniffiCaller.rustCall( + /*caller:*/ (status) => + nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( + p, + status + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + unbless(ptr: UniffiRustArcPtr) { + ptr.markDestroyed(); + }, + + pointer(obj: SessionVerificationEmojiInterface): UnsafeMutableRawPointer { + if ((obj as any)[destructorGuardSymbol] === undefined) { + throw new UniffiInternalError.UnexpectedNullPointer(); + } + return (obj as any)[pointerLiteralSymbol]; + }, + + clonePointer( + obj: SessionVerificationEmojiInterface + ): UnsafeMutableRawPointer { + const pointer = this.pointer(obj); + return uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + freePointer(pointer: UnsafeMutableRawPointer): void { + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, + + isConcreteType(obj: any): obj is SessionVerificationEmojiInterface { + return ( + obj[destructorGuardSymbol] && + obj[uniffiTypeNameSymbol] === 'SessionVerificationEmoji' + ); + }, + }; + })(); +// FfiConverter for SessionVerificationEmojiInterface +const FfiConverterTypeSessionVerificationEmoji = new FfiConverterObject( + uniffiTypeSessionVerificationEmojiObjectFactory +); + +/** + * The `SpaceRoomList`represents a paginated list of direct rooms + * that belong to a particular space. + * + * It can be used to paginate through the list (and have live updates on the + * pagination state) as well as subscribe to changes as rooms are joined or + * left. + * + * The `SpaceRoomList` also automatically subscribes to client room changes + * and updates the list accordingly as rooms are joined or left. + */ +export interface SpaceRoomListInterface { + /** + * Ask the list to retrieve the next page if the end hasn't been reached + * yet. Otherwise it no-ops. + */ + paginate(asyncOpts_?: { signal: AbortSignal }) /*throws*/ : Promise; + /** + * Returns if the room list is currently paginating or not. + */ + paginationState(): SpaceRoomListPaginationState; + /** + * Return the current list of rooms. + */ + rooms(): Array; + /** + * Subscribe to pagination updates. + */ + subscribeToPaginationStateUpdates( + listener: SpaceRoomListPaginationStateListener + ): TaskHandleInterface; + /** + * Subscribes to room list updates. + */ + subscribeToRoomUpdate( + listener: SpaceRoomListEntriesListener + ): TaskHandleInterface; +} + +/** + * The `SpaceRoomList`represents a paginated list of direct rooms + * that belong to a particular space. + * + * It can be used to paginate through the list (and have live updates on the + * pagination state) as well as subscribe to changes as rooms are joined or + * left. + * + * The `SpaceRoomList` also automatically subscribes to client room changes + * and updates the list accordingly as rooms are joined or left. + */ +export class SpaceRoomList + extends UniffiAbstractObject + implements SpaceRoomListInterface +{ + readonly [uniffiTypeNameSymbol] = 'SpaceRoomList'; + readonly [destructorGuardSymbol]: UniffiRustArcPtr; + readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + // No primary constructor declared for this class. + private constructor(pointer: UnsafeMutableRawPointer) { + super(); + this[pointerLiteralSymbol] = pointer; + this[destructorGuardSymbol] = + uniffiTypeSpaceRoomListObjectFactory.bless(pointer); + } + + /** + * Ask the list to retrieve the next page if the end hasn't been reached + * yet. Otherwise it no-ops. + */ + public async paginate(asyncOpts_?: { + signal: AbortSignal; + }): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + uniffiTypeSpaceRoomListObjectFactory.clonePointer(this) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, + /*liftFunc:*/ (_v) => {}, + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + + /** + * Returns if the room list is currently paginating or not. + */ + public paginationState(): SpaceRoomListPaginationState { + return FfiConverterTypeSpaceRoomListPaginationState.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + uniffiTypeSpaceRoomListObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * Return the current list of rooms. + */ + public rooms(): Array { + return FfiConverterArrayTypeSpaceRoom.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + uniffiTypeSpaceRoomListObjectFactory.clonePointer(this), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * Subscribe to pagination updates. + */ + public subscribeToPaginationStateUpdates( + listener: SpaceRoomListPaginationStateListener + ): TaskHandleInterface { + return FfiConverterTypeTaskHandle.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + uniffiTypeSpaceRoomListObjectFactory.clonePointer(this), + FfiConverterTypeSpaceRoomListPaginationStateListener.lower( + listener + ), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * Subscribes to room list updates. + */ + public subscribeToRoomUpdate( + listener: SpaceRoomListEntriesListener + ): TaskHandleInterface { + return FfiConverterTypeTaskHandle.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + uniffiTypeSpaceRoomListObjectFactory.clonePointer(this), + FfiConverterTypeSpaceRoomListEntriesListener.lower(listener), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + + /** + * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} + */ + uniffiDestroy(): void { + const ptr = (this as any)[destructorGuardSymbol]; + if (ptr !== undefined) { + const pointer = uniffiTypeSpaceRoomListObjectFactory.pointer(this); + uniffiTypeSpaceRoomListObjectFactory.freePointer(pointer); + uniffiTypeSpaceRoomListObjectFactory.unbless(ptr); delete (this as any)[destructorGuardSymbol]; } } - static instanceOf(obj: any): obj is SessionVerificationController { - return uniffiTypeSessionVerificationControllerObjectFactory.isConcreteType( - obj - ); + static instanceOf(obj: any): obj is SpaceRoomList { + return uniffiTypeSpaceRoomListObjectFactory.isConcreteType(obj); } } -const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory = +const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): SessionVerificationControllerInterface { - const instance = Object.create(SessionVerificationController.prototype); + create(pointer: UnsafeMutableRawPointer): SpaceRoomListInterface { + const instance = Object.create(SpaceRoomList.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); - instance[uniffiTypeNameSymbol] = 'SessionVerificationController'; + instance[uniffiTypeNameSymbol] = 'SpaceRoomList'; return instance; }, bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { return uniffiCaller.rustCall( /*caller:*/ (status) => - nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationcontroller_ffi__bless_pointer( + nativeModule().ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( p, status ), @@ -49216,22 +51595,18 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< ptr.markDestroyed(); }, - pointer( - obj: SessionVerificationControllerInterface - ): UnsafeMutableRawPointer { + pointer(obj: SpaceRoomListInterface): UnsafeMutableRawPointer { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer( - obj: SessionVerificationControllerInterface - ): UnsafeMutableRawPointer { + clonePointer(obj: SpaceRoomListInterface): UnsafeMutableRawPointer { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( pointer, callStatus ), @@ -49242,7 +51617,7 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< freePointer(pointer: UnsafeMutableRawPointer): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( pointer, callStatus ), @@ -49250,29 +51625,62 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< ); }, - isConcreteType(obj: any): obj is SessionVerificationControllerInterface { + isConcreteType(obj: any): obj is SpaceRoomListInterface { return ( obj[destructorGuardSymbol] && - obj[uniffiTypeNameSymbol] === 'SessionVerificationController' + obj[uniffiTypeNameSymbol] === 'SpaceRoomList' ); }, }; })(); -// FfiConverter for SessionVerificationControllerInterface -const FfiConverterTypeSessionVerificationController = new FfiConverterObject( - uniffiTypeSessionVerificationControllerObjectFactory +// FfiConverter for SpaceRoomListInterface +const FfiConverterTypeSpaceRoomList = new FfiConverterObject( + uniffiTypeSpaceRoomListObjectFactory ); -export interface SessionVerificationEmojiInterface { - description(): string; - symbol(): string; +/** + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. + */ +export interface SpaceServiceInterface { + /** + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. + */ + joinedSpaces(asyncOpts_?: { signal: AbortSignal }): Promise>; + /** + * Returns a `SpaceRoomList` for the given space ID. + */ + spaceRoomList( + spaceId: string, + asyncOpts_?: { signal: AbortSignal } + ) /*throws*/ : Promise; + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ + subscribeToJoinedSpaces( + listener: SpaceServiceJoinedSpacesListener, + asyncOpts_?: { signal: AbortSignal } + ): Promise; } -export class SessionVerificationEmoji +/** + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. + */ +export class SpaceService extends UniffiAbstractObject - implements SessionVerificationEmojiInterface + implements SpaceServiceInterface { - readonly [uniffiTypeNameSymbol] = 'SessionVerificationEmoji'; + readonly [uniffiTypeNameSymbol] = 'SpaceService'; readonly [destructorGuardSymbol]: UniffiRustArcPtr; readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; // No primary constructor declared for this class. @@ -49280,35 +51688,128 @@ export class SessionVerificationEmoji super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = - uniffiTypeSessionVerificationEmojiObjectFactory.bless(pointer); + uniffiTypeSpaceServiceObjectFactory.bless(pointer); } - public description(): string { - return FfiConverterString.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( - uniffiTypeSessionVerificationEmojiObjectFactory.clonePointer(this), - callStatus + /** + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. + */ + public async joinedSpaces(asyncOpts_?: { + signal: AbortSignal; + }): Promise> { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + uniffiTypeSpaceServiceObjectFactory.clonePointer(this) ); }, - /*liftString:*/ FfiConverterString.lift - ) - ); + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, + /*liftFunc:*/ FfiConverterArrayTypeSpaceRoom.lift.bind( + FfiConverterArrayTypeSpaceRoom + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_ + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } } - public symbol(): string { - return FfiConverterString.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( - uniffiTypeSessionVerificationEmojiObjectFactory.clonePointer(this), - callStatus + /** + * Returns a `SpaceRoomList` for the given space ID. + */ + public async spaceRoomList( + spaceId: string, + asyncOpts_?: { signal: AbortSignal } + ): Promise /*throws*/ { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + uniffiTypeSpaceServiceObjectFactory.clonePointer(this), + FfiConverterString.lower(spaceId) ); }, - /*liftString:*/ FfiConverterString.lift - ) - ); + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + /*liftFunc:*/ FfiConverterTypeSpaceRoomList.lift.bind( + FfiConverterTypeSpaceRoomList + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ + public async subscribeToJoinedSpaces( + listener: SpaceServiceJoinedSpacesListener, + asyncOpts_?: { signal: AbortSignal } + ): Promise { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + uniffiTypeSpaceServiceObjectFactory.clonePointer(this), + FfiConverterTypeSpaceServiceJoinedSpacesListener.lower(listener) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( + FfiConverterTypeTaskHandle + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_ + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } } /** @@ -49317,36 +51818,33 @@ export class SessionVerificationEmoji uniffiDestroy(): void { const ptr = (this as any)[destructorGuardSymbol]; if (ptr !== undefined) { - const pointer = - uniffiTypeSessionVerificationEmojiObjectFactory.pointer(this); - uniffiTypeSessionVerificationEmojiObjectFactory.freePointer(pointer); - uniffiTypeSessionVerificationEmojiObjectFactory.unbless(ptr); + const pointer = uniffiTypeSpaceServiceObjectFactory.pointer(this); + uniffiTypeSpaceServiceObjectFactory.freePointer(pointer); + uniffiTypeSpaceServiceObjectFactory.unbless(ptr); delete (this as any)[destructorGuardSymbol]; } } - static instanceOf(obj: any): obj is SessionVerificationEmoji { - return uniffiTypeSessionVerificationEmojiObjectFactory.isConcreteType(obj); + static instanceOf(obj: any): obj is SpaceService { + return uniffiTypeSpaceServiceObjectFactory.isConcreteType(obj); } } -const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory = +const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): SessionVerificationEmojiInterface { - const instance = Object.create(SessionVerificationEmoji.prototype); + create(pointer: UnsafeMutableRawPointer): SpaceServiceInterface { + const instance = Object.create(SpaceService.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); - instance[uniffiTypeNameSymbol] = 'SessionVerificationEmoji'; + instance[uniffiTypeNameSymbol] = 'SpaceService'; return instance; }, bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { return uniffiCaller.rustCall( /*caller:*/ (status) => - nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( + nativeModule().ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( p, status ), @@ -49358,20 +51856,18 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( pointer, callStatus ), @@ -49382,7 +51878,7 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice( pointer, callStatus ), @@ -49390,17 +51886,17 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory; roomListService(): RoomListServiceInterface; start(asyncOpts_?: { signal: AbortSignal }): Promise; state(listener: SyncServiceStateObserver): TaskHandleInterface; @@ -49803,6 +52307,45 @@ export class SyncService uniffiTypeSyncServiceObjectFactory.bless(pointer); } + /** + * Force expiring both sliding sync sessions. + * + * This ensures that the sync service is stopped before expiring both + * sessions. It should be used sparingly, as it will cause a restart of + * the sessions on the server as well. + */ + public async expireSessions(asyncOpts_?: { + signal: AbortSignal; + }): Promise { + const __stack = uniffiIsDebug ? new Error().stack : undefined; + try { + return await uniffiRustCallAsync( + /*rustCaller:*/ uniffiCaller, + /*rustFutureFunc:*/ () => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + uniffiTypeSyncServiceObjectFactory.clonePointer(this) + ); + }, + /*pollFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_void, + /*cancelFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_void, + /*completeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_void, + /*freeFunc:*/ nativeModule() + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_void, + /*liftFunc:*/ (_v) => {}, + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_ + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + public roomListService(): RoomListServiceInterface { return FfiConverterTypeRoomListService.lift( uniffiCaller.rustCall( @@ -50597,13 +53140,11 @@ export interface TimelineInterface { ) /*throws*/ : Promise; sendAudio( params: UploadParameters, - audioInfo: AudioInfo, - progressWatcher: ProgressWatcher | undefined + audioInfo: AudioInfo ) /*throws*/ : SendAttachmentJoinHandleInterface; sendFile( params: UploadParameters, - fileInfo: FileInfo, - progressWatcher: ProgressWatcher | undefined + fileInfo: FileInfo ) /*throws*/ : SendAttachmentJoinHandleInterface; sendGallery( params: GalleryUploadParameters, @@ -50611,9 +53152,8 @@ export interface TimelineInterface { ) /*throws*/ : SendGalleryJoinHandleInterface; sendImage( params: UploadParameters, - thumbnailPath: string | undefined, - imageInfo: ImageInfo, - progressWatcher: ProgressWatcher | undefined + thumbnailSource: UploadSource | undefined, + imageInfo: ImageInfo ) /*throws*/ : SendAttachmentJoinHandleInterface; sendLocation( body: string, @@ -50621,7 +53161,7 @@ export interface TimelineInterface { description: string | undefined, zoomLevel: /*u8*/ number | undefined, assetType: AssetType | undefined, - replyParams: ReplyParameters | undefined, + repliedToEventId: string | undefined, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; sendPollResponse( @@ -50643,20 +53183,18 @@ export interface TimelineInterface { */ sendReply( msg: RoomMessageEventContentWithoutRelationInterface, - replyParams: ReplyParameters, + eventId: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; sendVideo( params: UploadParameters, - thumbnailPath: string | undefined, - videoInfo: VideoInfo, - progressWatcher: ProgressWatcher | undefined + thumbnailSource: UploadSource | undefined, + videoInfo: VideoInfo ) /*throws*/ : SendAttachmentJoinHandleInterface; sendVoiceMessage( params: UploadParameters, audioInfo: AudioInfo, - waveform: Array, - progressWatcher: ProgressWatcher | undefined + waveform: Array ) /*throws*/ : SendAttachmentJoinHandleInterface; subscribeToBackPaginationStatus( listener: PaginationStatusListener, @@ -51339,8 +53877,7 @@ export class Timeline public sendAudio( params: UploadParameters, - audioInfo: AudioInfo, - progressWatcher: ProgressWatcher | undefined + audioInfo: AudioInfo ): SendAttachmentJoinHandleInterface /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( @@ -51352,7 +53889,6 @@ export class Timeline uniffiTypeTimelineObjectFactory.clonePointer(this), FfiConverterTypeUploadParameters.lower(params), FfiConverterTypeAudioInfo.lower(audioInfo), - FfiConverterOptionalTypeProgressWatcher.lower(progressWatcher), callStatus ); }, @@ -51363,8 +53899,7 @@ export class Timeline public sendFile( params: UploadParameters, - fileInfo: FileInfo, - progressWatcher: ProgressWatcher | undefined + fileInfo: FileInfo ): SendAttachmentJoinHandleInterface /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( @@ -51376,7 +53911,6 @@ export class Timeline uniffiTypeTimelineObjectFactory.clonePointer(this), FfiConverterTypeUploadParameters.lower(params), FfiConverterTypeFileInfo.lower(fileInfo), - FfiConverterOptionalTypeProgressWatcher.lower(progressWatcher), callStatus ); }, @@ -51409,9 +53943,8 @@ export class Timeline public sendImage( params: UploadParameters, - thumbnailPath: string | undefined, - imageInfo: ImageInfo, - progressWatcher: ProgressWatcher | undefined + thumbnailSource: UploadSource | undefined, + imageInfo: ImageInfo ): SendAttachmentJoinHandleInterface /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( @@ -51422,9 +53955,8 @@ export class Timeline return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( uniffiTypeTimelineObjectFactory.clonePointer(this), FfiConverterTypeUploadParameters.lower(params), - FfiConverterOptionalString.lower(thumbnailPath), + FfiConverterOptionalTypeUploadSource.lower(thumbnailSource), FfiConverterTypeImageInfo.lower(imageInfo), - FfiConverterOptionalTypeProgressWatcher.lower(progressWatcher), callStatus ); }, @@ -51439,7 +53971,7 @@ export class Timeline description: string | undefined, zoomLevel: /*u8*/ number | undefined, assetType: AssetType | undefined, - replyParams: ReplyParameters | undefined, + repliedToEventId: string | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51454,7 +53986,7 @@ export class Timeline FfiConverterOptionalString.lower(description), FfiConverterOptionalUInt8.lower(zoomLevel), FfiConverterOptionalTypeAssetType.lower(assetType), - FfiConverterOptionalTypeReplyParameters.lower(replyParams) + FfiConverterOptionalString.lower(repliedToEventId) ); }, /*pollFunc:*/ nativeModule() @@ -51567,7 +54099,7 @@ export class Timeline */ public async sendReply( msg: RoomMessageEventContentWithoutRelationInterface, - replyParams: ReplyParameters, + eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51578,7 +54110,7 @@ export class Timeline return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( uniffiTypeTimelineObjectFactory.clonePointer(this), FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(msg), - FfiConverterTypeReplyParameters.lower(replyParams) + FfiConverterString.lower(eventId) ); }, /*pollFunc:*/ nativeModule() @@ -51606,9 +54138,8 @@ export class Timeline public sendVideo( params: UploadParameters, - thumbnailPath: string | undefined, - videoInfo: VideoInfo, - progressWatcher: ProgressWatcher | undefined + thumbnailSource: UploadSource | undefined, + videoInfo: VideoInfo ): SendAttachmentJoinHandleInterface /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( @@ -51619,9 +54150,8 @@ export class Timeline return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( uniffiTypeTimelineObjectFactory.clonePointer(this), FfiConverterTypeUploadParameters.lower(params), - FfiConverterOptionalString.lower(thumbnailPath), + FfiConverterOptionalTypeUploadSource.lower(thumbnailSource), FfiConverterTypeVideoInfo.lower(videoInfo), - FfiConverterOptionalTypeProgressWatcher.lower(progressWatcher), callStatus ); }, @@ -51633,8 +54163,7 @@ export class Timeline public sendVoiceMessage( params: UploadParameters, audioInfo: AudioInfo, - waveform: Array, - progressWatcher: ProgressWatcher | undefined + waveform: Array ): SendAttachmentJoinHandleInterface /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( @@ -51647,7 +54176,6 @@ export class Timeline FfiConverterTypeUploadParameters.lower(params), FfiConverterTypeAudioInfo.lower(audioInfo), FfiConverterArrayUInt16.lower(waveform), - FfiConverterOptionalTypeProgressWatcher.lower(progressWatcher), callStatus ); }, @@ -51877,246 +54405,6 @@ const FfiConverterTypeTimeline = new FfiConverterObject( uniffiTypeTimelineObjectFactory ); -export interface TimelineDiffInterface { - append(): Array | undefined; - change(): TimelineChange; - insert(): InsertData | undefined; - pushBack(): TimelineItemInterface | undefined; - pushFront(): TimelineItemInterface | undefined; - remove(): /*u32*/ number | undefined; - reset(): Array | undefined; - set(): SetData | undefined; - truncate(): /*u32*/ number | undefined; -} - -export class TimelineDiff - extends UniffiAbstractObject - implements TimelineDiffInterface -{ - readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; - // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { - super(); - this[pointerLiteralSymbol] = pointer; - this[destructorGuardSymbol] = - uniffiTypeTimelineDiffObjectFactory.bless(pointer); - } - - public append(): Array | undefined { - return FfiConverterOptionalArrayTypeTimelineItem.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_append( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public change(): TimelineChange { - return FfiConverterTypeTimelineChange.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_change( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public insert(): InsertData | undefined { - return FfiConverterOptionalTypeInsertData.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public pushBack(): TimelineItemInterface | undefined { - return FfiConverterOptionalTypeTimelineItem.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public pushFront(): TimelineItemInterface | undefined { - return FfiConverterOptionalTypeTimelineItem.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public remove(): /*u32*/ number | undefined { - return FfiConverterOptionalUInt32.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public reset(): Array | undefined { - return FfiConverterOptionalArrayTypeTimelineItem.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public set(): SetData | undefined { - return FfiConverterOptionalTypeSetData.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_set( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public truncate(): /*u32*/ number | undefined { - return FfiConverterOptionalUInt32.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate( - uniffiTypeTimelineDiffObjectFactory.clonePointer(this), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - /** - * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} - */ - uniffiDestroy(): void { - const ptr = (this as any)[destructorGuardSymbol]; - if (ptr !== undefined) { - const pointer = uniffiTypeTimelineDiffObjectFactory.pointer(this); - uniffiTypeTimelineDiffObjectFactory.freePointer(pointer); - uniffiTypeTimelineDiffObjectFactory.unbless(ptr); - delete (this as any)[destructorGuardSymbol]; - } - } - - static instanceOf(obj: any): obj is TimelineDiff { - return uniffiTypeTimelineDiffObjectFactory.isConcreteType(obj); - } -} - -const uniffiTypeTimelineDiffObjectFactory: UniffiObjectFactory = - (() => { - return { - create(pointer: UnsafeMutableRawPointer): TimelineDiffInterface { - const instance = Object.create(TimelineDiff.prototype); - instance[pointerLiteralSymbol] = pointer; - instance[destructorGuardSymbol] = this.bless(pointer); - instance[uniffiTypeNameSymbol] = 'TimelineDiff'; - return instance; - }, - - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { - return uniffiCaller.rustCall( - /*caller:*/ (status) => - nativeModule().ubrn_uniffi_internal_fn_method_timelinediff_ffi__bless_pointer( - p, - status - ), - /*liftString:*/ FfiConverterString.lift - ); - }, - - unbless(ptr: UniffiRustArcPtr) { - ptr.markDestroyed(); - }, - - pointer(obj: TimelineDiffInterface): UnsafeMutableRawPointer { - if ((obj as any)[destructorGuardSymbol] === undefined) { - throw new UniffiInternalError.UnexpectedNullPointer(); - } - return (obj as any)[pointerLiteralSymbol]; - }, - - clonePointer(obj: TimelineDiffInterface): UnsafeMutableRawPointer { - const pointer = this.pointer(obj); - return uniffiCaller.rustCall( - /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelinediff( - pointer, - callStatus - ), - /*liftString:*/ FfiConverterString.lift - ); - }, - - freePointer(pointer: UnsafeMutableRawPointer): void { - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_timelinediff( - pointer, - callStatus - ), - /*liftString:*/ FfiConverterString.lift - ); - }, - - isConcreteType(obj: any): obj is TimelineDiffInterface { - return ( - obj[destructorGuardSymbol] && - obj[uniffiTypeNameSymbol] === 'TimelineDiff' - ); - }, - }; - })(); -// FfiConverter for TimelineDiffInterface -const FfiConverterTypeTimelineDiff = new FfiConverterObject( - uniffiTypeTimelineDiffObjectFactory -); - export interface TimelineEventInterface { eventId(): string; eventType() /*throws*/ : TimelineEventType; @@ -53525,11 +55813,6 @@ const FfiConverterOptionalTypeImageInfo = new FfiConverterOptional( FfiConverterTypeImageInfo ); -// FfiConverter for InsertData | undefined -const FfiConverterOptionalTypeInsertData = new FfiConverterOptional( - FfiConverterTypeInsertData -); - // FfiConverter for MatrixEntity | undefined const FfiConverterOptionalTypeMatrixEntity = new FfiConverterOptional( FfiConverterTypeMatrixEntity @@ -53540,6 +55823,11 @@ const FfiConverterOptionalTypeMediaPreviewConfig = new FfiConverterOptional( FfiConverterTypeMediaPreviewConfig ); +// FfiConverter for MediaUploadProgress | undefined +const FfiConverterOptionalTypeMediaUploadProgress = new FfiConverterOptional( + FfiConverterTypeMediaUploadProgress +); + // FfiConverter for Mentions | undefined const FfiConverterOptionalTypeMentions = new FfiConverterOptional( FfiConverterTypeMentions @@ -53564,11 +55852,6 @@ const FfiConverterOptionalTypePredecessorRoom = new FfiConverterOptional( FfiConverterTypePredecessorRoom ); -// FfiConverter for ReplyParameters | undefined -const FfiConverterOptionalTypeReplyParameters = new FfiConverterOptional( - FfiConverterTypeReplyParameters -); - // FfiConverter for ResolvedRoomAlias | undefined const FfiConverterOptionalTypeResolvedRoomAlias = new FfiConverterOptional( FfiConverterTypeResolvedRoomAlias @@ -53583,16 +55866,16 @@ const FfiConverterOptionalTypeRoomMember = new FfiConverterOptional( const FfiConverterOptionalTypeRoomMemberWithSenderInfo = new FfiConverterOptional(FfiConverterTypeRoomMemberWithSenderInfo); -// FfiConverter for SetData | undefined -const FfiConverterOptionalTypeSetData = new FfiConverterOptional( - FfiConverterTypeSetData -); - // FfiConverter for SuccessorRoom | undefined const FfiConverterOptionalTypeSuccessorRoom = new FfiConverterOptional( FfiConverterTypeSuccessorRoom ); +// FfiConverter for ThreadSubscription | undefined +const FfiConverterOptionalTypeThreadSubscription = new FfiConverterOptional( + FfiConverterTypeThreadSubscription +); + // FfiConverter for ThumbnailInfo | undefined const FfiConverterOptionalTypeThumbnailInfo = new FfiConverterOptional( FfiConverterTypeThumbnailInfo @@ -53701,6 +55984,11 @@ const FfiConverterArrayTypeSimplePushRule = new FfiConverterArray( FfiConverterTypeSimplePushRule ); +// FfiConverter for Array +const FfiConverterArrayTypeSpaceRoom = new FfiConverterArray( + FfiConverterTypeSpaceRoom +); + // FfiConverter for Array const FfiConverterArrayTypeUserPowerLevelUpdate = new FfiConverterArray( FfiConverterTypeUserPowerLevelUpdate @@ -53814,6 +56102,11 @@ const FfiConverterOptionalTypeShieldState = new FfiConverterOptional( FfiConverterTypeShieldState ); +// FfiConverter for UploadSource | undefined +const FfiConverterOptionalTypeUploadSource = new FfiConverterOptional( + FfiConverterTypeUploadSource +); + // FfiConverter for VirtualTimelineItem | undefined const FfiConverterOptionalTypeVirtualTimelineItem = new FfiConverterOptional( FfiConverterTypeVirtualTimelineItem @@ -53875,11 +56168,6 @@ const FfiConverterOptionalTypeThreadSummary = new FfiConverterOptional( FfiConverterTypeThreadSummary ); -// FfiConverter for TimelineItemInterface | undefined -const FfiConverterOptionalTypeTimelineItem = new FfiConverterOptional( - FfiConverterTypeTimelineItem -); - // FfiConverter for UserIdentityInterface | undefined const FfiConverterOptionalTypeUserIdentity = new FfiConverterOptional( FfiConverterTypeUserIdentity @@ -53963,6 +56251,16 @@ const FfiConverterArrayTypeSlidingSyncVersion = new FfiConverterArray( FfiConverterTypeSlidingSyncVersion ); +// FfiConverter for Array +const FfiConverterArrayTypeSpaceListUpdate = new FfiConverterArray( + FfiConverterTypeSpaceListUpdate +); + +// FfiConverter for Array +const FfiConverterArrayTypeTimelineDiff = new FfiConverterArray( + FfiConverterTypeTimelineDiff +); + // FfiConverter for Array const FfiConverterArrayTypeTraceLogPacks = new FfiConverterArray( FfiConverterTypeTraceLogPacks @@ -53981,21 +56279,11 @@ const FfiConverterArrayTypeSessionVerificationEmoji = new FfiConverterArray( FfiConverterTypeSessionVerificationEmoji ); -// FfiConverter for Array -const FfiConverterArrayTypeTimelineDiff = new FfiConverterArray( - FfiConverterTypeTimelineDiff -); - // FfiConverter for Array const FfiConverterArrayTypeTimelineItem = new FfiConverterArray( FfiConverterTypeTimelineItem ); -// FfiConverter for Array | undefined -const FfiConverterOptionalArrayTypeTimelineItem = new FfiConverterOptional( - FfiConverterArrayTypeTimelineItem -); - /** * This should be called before anything else. * @@ -54188,7 +56476,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() !== - 61777 + 29703 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role' @@ -54196,7 +56484,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() !== - 48532 + 13856 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level' @@ -54330,6 +56618,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() !== + 10688 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_encryption() !== 9657 @@ -54460,7 +56756,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_url() !== - 50489 + 32541 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_url' @@ -54570,6 +56866,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code() !== + 3481 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_logout() !== 42911 @@ -54682,6 +56986,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_client_server' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() !== + 51933 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_session() !== 8085 @@ -54762,6 +57074,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_space_service() !== + 31959 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_space_service' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() !== 34571 @@ -54844,7 +57164,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() !== - 28386 + 19369 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc' @@ -54906,14 +57226,6 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code() !== - 42452 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build_with_qr_code' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() !== 46627 @@ -55084,7 +57396,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() !== - 33768 + 23935 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled' @@ -55298,6 +57610,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() !== + 37773 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() !== 61326 @@ -55762,6 +58082,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() !== + 51696 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_forget() !== 37840 @@ -56026,6 +58354,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_room_membership' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() !== + 11947 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() !== 39510 @@ -56100,7 +58436,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_report_room() !== - 8059 + 6449 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_report_room' @@ -56138,22 +58474,6 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification() !== - 43366 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed() !== - 52926 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() !== 34248 @@ -56194,6 +58514,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_room_set_name' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() !== + 48337 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() !== 5576 @@ -56716,7 +59044,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() !== - 9145 + 50237 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_info' @@ -56882,6 +59210,70 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() !== + 57707 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() !== + 33381 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() !== + 24664 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() !== + 16775 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() !== + 55793 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() !== + 54285 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() !== + 6768 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() !== + 10090 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter() !== 8900 @@ -56922,6 +59314,14 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() !== + 45579 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() !== 26426 @@ -57148,7 +59548,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() !== - 22559 + 36723 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio' @@ -57156,7 +59556,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() !== - 4588 + 4740 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file' @@ -57172,7 +59572,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() !== - 25436 + 29043 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image' @@ -57180,7 +59580,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() !== - 57832 + 39080 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location' @@ -57204,7 +59604,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() !== - 31468 + 11149 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply' @@ -57212,7 +59612,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() !== - 1445 + 52974 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video' @@ -57220,7 +59620,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() !== - 50042 + 17589 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message' @@ -57250,78 +59650,6 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append() !== - 8453 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change() !== - 4562 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert() !== - 26630 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back() !== - 53464 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front() !== - 42084 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove() !== - 74 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset() !== - 34118 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set() !== - 13334 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate() !== - 34040 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() !== 11088 @@ -57802,6 +60130,30 @@ function uniffiEnsureInitialized() { 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() !== + 31502 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() !== + 11960 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() !== + 19262 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() !== 62231 @@ -57812,7 +60164,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() !== - 30147 + 53990 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update' @@ -57876,6 +60228,9 @@ function uniffiEnsureInitialized() { uniffiCallbackInterfaceRoomListServiceSyncIndicatorListener.register(); uniffiCallbackInterfaceSendQueueRoomErrorListener.register(); uniffiCallbackInterfaceSessionVerificationControllerDelegate.register(); + uniffiCallbackInterfaceSpaceRoomListEntriesListener.register(); + uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.register(); + uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.register(); uniffiCallbackInterfaceSyncServiceStateObserver.register(); uniffiCallbackInterfaceTimelineListener.register(); uniffiCallbackInterfaceTypingNotificationsListener.register(); @@ -57887,6 +60242,7 @@ function uniffiEnsureInitialized() { export default Object.freeze({ initialize: uniffiEnsureInitialized, converters: { + FfiConverterTypeAbstractProgress, FfiConverterTypeAccountDataEvent, FfiConverterTypeAccountDataEventType, FfiConverterTypeAccountManagementAction, @@ -57941,7 +60297,6 @@ export default Object.freeze({ FfiConverterTypeImageInfo, FfiConverterTypeImageMessageContent, FfiConverterTypeInReplyToDetails, - FfiConverterTypeInsertData, FfiConverterTypeInviteAvatars, FfiConverterTypeJoinRule, FfiConverterTypeJsonValue, @@ -57949,6 +60304,7 @@ export default Object.freeze({ FfiConverterTypeKnockRequest, FfiConverterTypeKnockRequestActions, FfiConverterTypeLastLocation, + FfiConverterTypeLatestEventValue, FfiConverterTypeLazyTimelineItemProvider, FfiConverterTypeLiveLocationShare, FfiConverterTypeLocationContent, @@ -57960,6 +60316,7 @@ export default Object.freeze({ FfiConverterTypeMediaPreviewConfig, FfiConverterTypeMediaPreviews, FfiConverterTypeMediaSource, + FfiConverterTypeMediaUploadProgress, FfiConverterTypeMembership, FfiConverterTypeMembershipChange, FfiConverterTypeMembershipState, @@ -57995,6 +60352,7 @@ export default Object.freeze({ FfiConverterTypePollAnswer, FfiConverterTypePollData, FfiConverterTypePollKind, + FfiConverterTypePowerLevel, FfiConverterTypePowerLevels, FfiConverterTypePredecessorRoom, FfiConverterTypeProfileDetails, @@ -58013,7 +60371,6 @@ export default Object.freeze({ FfiConverterTypeReceiptType, FfiConverterTypeRecoveryError, FfiConverterTypeRecoveryState, - FfiConverterTypeReplyParameters, FfiConverterTypeRequestConfig, FfiConverterTypeResolvedRoomAlias, FfiConverterTypeRoom, @@ -58021,7 +60378,6 @@ export default Object.freeze({ FfiConverterTypeRoomAccountDataEventType, FfiConverterTypeRoomDescription, FfiConverterTypeRoomDirectorySearch, - FfiConverterTypeRoomDirectorySearchEntriesResult, FfiConverterTypeRoomDirectorySearchEntryUpdate, FfiConverterTypeRoomError, FfiConverterTypeRoomHero, @@ -58068,11 +60424,14 @@ export default Object.freeze({ FfiConverterTypeSessionVerificationData, FfiConverterTypeSessionVerificationEmoji, FfiConverterTypeSessionVerificationRequestDetails, - FfiConverterTypeSetData, FfiConverterTypeShieldState, FfiConverterTypeSimplePushRule, FfiConverterTypeSlidingSyncVersion, FfiConverterTypeSlidingSyncVersionBuilder, + FfiConverterTypeSpaceListUpdate, + FfiConverterTypeSpaceRoom, + FfiConverterTypeSpaceRoomList, + FfiConverterTypeSpaceService, FfiConverterTypeSpan, FfiConverterTypeSsoError, FfiConverterTypeSsoHandler, @@ -58087,10 +60446,10 @@ export default Object.freeze({ FfiConverterTypeTagName, FfiConverterTypeTaskHandle, FfiConverterTypeTextMessageContent, + FfiConverterTypeThreadSubscription, FfiConverterTypeThreadSummary, FfiConverterTypeThumbnailInfo, FfiConverterTypeTimeline, - FfiConverterTypeTimelineChange, FfiConverterTypeTimelineConfiguration, FfiConverterTypeTimelineDiff, FfiConverterTypeTimelineEvent, diff --git a/src/generated/matrix_sdk_ui.ts b/src/generated/matrix_sdk_ui.ts index a262890..0018d66 100644 --- a/src/generated/matrix_sdk_ui.ts +++ b/src/generated/matrix_sdk_ui.ts @@ -33,11 +33,14 @@ import nativeModule, { import { type UniffiByteArray, AbstractFfiConverterByteArray, + FfiConverterBool, FfiConverterInt32, RustBuffer, + UniffiEnum, UniffiInternalError, UniffiRustCaller, uniffiCreateFfiConverterString, + uniffiTypeNameSymbol, } from 'uniffi-bindgen-react-native'; // Get converters from the other files, if any. @@ -186,6 +189,134 @@ const FfiConverterTypeRoomPinnedEventsChange = (() => { return new FFIConverter(); })(); +// Enum: SpaceRoomListPaginationState +export enum SpaceRoomListPaginationState_Tags { + Idle = 'Idle', + Loading = 'Loading', +} +export const SpaceRoomListPaginationState = (() => { + type Idle__interface = { + tag: SpaceRoomListPaginationState_Tags.Idle; + inner: Readonly<{ endReached: boolean }>; + }; + + class Idle_ extends UniffiEnum implements Idle__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceRoomListPaginationState'; + readonly tag = SpaceRoomListPaginationState_Tags.Idle; + readonly inner: Readonly<{ endReached: boolean }>; + constructor(inner: { endReached: boolean }) { + super('SpaceRoomListPaginationState', 'Idle'); + this.inner = Object.freeze(inner); + } + + static new(inner: { endReached: boolean }): Idle_ { + return new Idle_(inner); + } + + static instanceOf(obj: any): obj is Idle_ { + return obj.tag === SpaceRoomListPaginationState_Tags.Idle; + } + } + + type Loading__interface = { + tag: SpaceRoomListPaginationState_Tags.Loading; + }; + + class Loading_ extends UniffiEnum implements Loading__interface { + /** + * @private + * This field is private and should not be used, use `tag` instead. + */ + readonly [uniffiTypeNameSymbol] = 'SpaceRoomListPaginationState'; + readonly tag = SpaceRoomListPaginationState_Tags.Loading; + constructor() { + super('SpaceRoomListPaginationState', 'Loading'); + } + + static new(): Loading_ { + return new Loading_(); + } + + static instanceOf(obj: any): obj is Loading_ { + return obj.tag === SpaceRoomListPaginationState_Tags.Loading; + } + } + + function instanceOf(obj: any): obj is SpaceRoomListPaginationState { + return obj[uniffiTypeNameSymbol] === 'SpaceRoomListPaginationState'; + } + + return Object.freeze({ + instanceOf, + Idle: Idle_, + Loading: Loading_, + }); +})(); + +export type SpaceRoomListPaginationState = InstanceType< + (typeof SpaceRoomListPaginationState)[keyof Omit< + typeof SpaceRoomListPaginationState, + 'instanceOf' + >] +>; + +// FfiConverter for enum SpaceRoomListPaginationState +const FfiConverterTypeSpaceRoomListPaginationState = (() => { + const ordinalConverter = FfiConverterInt32; + type TypeName = SpaceRoomListPaginationState; + class FFIConverter extends AbstractFfiConverterByteArray { + read(from: RustBuffer): TypeName { + switch (ordinalConverter.read(from)) { + case 1: + return new SpaceRoomListPaginationState.Idle({ + endReached: FfiConverterBool.read(from), + }); + case 2: + return new SpaceRoomListPaginationState.Loading(); + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + write(value: TypeName, into: RustBuffer): void { + switch (value.tag) { + case SpaceRoomListPaginationState_Tags.Idle: { + ordinalConverter.write(1, into); + const inner = value.inner; + FfiConverterBool.write(inner.endReached, into); + return; + } + case SpaceRoomListPaginationState_Tags.Loading: { + ordinalConverter.write(2, into); + return; + } + default: + // Throwing from here means that SpaceRoomListPaginationState_Tags hasn't matched an ordinal. + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + allocationSize(value: TypeName): number { + switch (value.tag) { + case SpaceRoomListPaginationState_Tags.Idle: { + const inner = value.inner; + let size = ordinalConverter.allocationSize(1); + size += FfiConverterBool.allocationSize(inner.endReached); + return size; + } + case SpaceRoomListPaginationState_Tags.Loading: { + return ordinalConverter.allocationSize(2); + } + default: + throw new UniffiInternalError.UnexpectedEnumCase(); + } + } + } + return new FFIConverter(); +})(); + /** * This should be called before anything else. * @@ -215,5 +346,6 @@ export default Object.freeze({ converters: { FfiConverterTypeEventItemOrigin, FfiConverterTypeRoomPinnedEventsChange, + FfiConverterTypeSpaceRoomListPaginationState, }, }); diff --git a/swift/matrix_sdk.swift b/swift/matrix_sdk.swift index 674c744..c3dc714 100644 --- a/swift/matrix_sdk.swift +++ b/swift/matrix_sdk.swift @@ -828,6 +828,91 @@ public func FfiConverterTypeRoomPowerLevelChanges_lower(_ value: RoomPowerLevelC } +/** + * Information about the server vendor obtained from the federation API. + */ +public struct ServerVendorInfo { + /** + * The server name. + */ + public var serverName: String + /** + * The server version. + */ + public var version: String + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * The server name. + */serverName: String, + /** + * The server version. + */version: String) { + self.serverName = serverName + self.version = version + } +} + +#if compiler(>=6) +extension ServerVendorInfo: Sendable {} +#endif + + +extension ServerVendorInfo: Equatable, Hashable { + public static func ==(lhs: ServerVendorInfo, rhs: ServerVendorInfo) -> Bool { + if lhs.serverName != rhs.serverName { + return false + } + if lhs.version != rhs.version { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(serverName) + hasher.combine(version) + } +} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeServerVendorInfo: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ServerVendorInfo { + return + try ServerVendorInfo( + serverName: FfiConverterString.read(from: &buf), + version: FfiConverterString.read(from: &buf) + ) + } + + public static func write(_ value: ServerVendorInfo, into buf: inout [UInt8]) { + FfiConverterString.write(value.serverName, into: &buf) + FfiConverterString.write(value.version, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeServerVendorInfo_lift(_ buf: RustBuffer) throws -> ServerVendorInfo { + return try FfiConverterTypeServerVendorInfo.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeServerVendorInfo_lower(_ value: ServerVendorInfo) -> RustBuffer { + return FfiConverterTypeServerVendorInfo.lower(value) +} + + /** * Properties to create a new virtual Element Call widget. */ @@ -951,6 +1036,11 @@ public struct VirtualElementCallWidgetOptions { * client. (used on ios & android) */ public var controlledMediaDevices: Bool + /** + * Whether and what type of notification Element Call should send, when + * starting a call. + */ + public var sendNotificationType: NotificationType? // Default memberwise initializers are never public by default, so we // declare one manually. @@ -1053,7 +1143,11 @@ public struct VirtualElementCallWidgetOptions { /** * - `false`: the webview shows a a list of devices injected by the * client. (used on ios & android) - */controlledMediaDevices: Bool) { + */controlledMediaDevices: Bool, + /** + * Whether and what type of notification Element Call should send, when + * starting a call. + */sendNotificationType: NotificationType?) { self.elementCallUrl = elementCallUrl self.widgetId = widgetId self.parentUrl = parentUrl @@ -1074,6 +1168,7 @@ public struct VirtualElementCallWidgetOptions { self.sentryDsn = sentryDsn self.sentryEnvironment = sentryEnvironment self.controlledMediaDevices = controlledMediaDevices + self.sendNotificationType = sendNotificationType } } @@ -1144,6 +1239,9 @@ extension VirtualElementCallWidgetOptions: Equatable, Hashable { if lhs.controlledMediaDevices != rhs.controlledMediaDevices { return false } + if lhs.sendNotificationType != rhs.sendNotificationType { + return false + } return true } @@ -1168,6 +1266,7 @@ extension VirtualElementCallWidgetOptions: Equatable, Hashable { hasher.combine(sentryDsn) hasher.combine(sentryEnvironment) hasher.combine(controlledMediaDevices) + hasher.combine(sendNotificationType) } } @@ -1199,7 +1298,8 @@ public struct FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB rageshakeSubmitUrl: FfiConverterOptionString.read(from: &buf), sentryDsn: FfiConverterOptionString.read(from: &buf), sentryEnvironment: FfiConverterOptionString.read(from: &buf), - controlledMediaDevices: FfiConverterBool.read(from: &buf) + controlledMediaDevices: FfiConverterBool.read(from: &buf), + sendNotificationType: FfiConverterOptionTypeNotificationType.read(from: &buf) ) } @@ -1224,6 +1324,7 @@ public struct FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB FfiConverterOptionString.write(value.sentryDsn, into: &buf) FfiConverterOptionString.write(value.sentryEnvironment, into: &buf) FfiConverterBool.write(value.controlledMediaDevices, into: &buf) + FfiConverterOptionTypeNotificationType.write(value.sendNotificationType, into: &buf) } } @@ -1613,6 +1714,85 @@ extension Intent: Equatable, Hashable {} +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. +/** + * Types of call notifications. + */ + +public enum NotificationType { + + /** + * The receiving client should display a visual notification. + */ + case notification + /** + * The receiving client should ring with an audible sound. + */ + case ring +} + + +#if compiler(>=6) +extension NotificationType: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeNotificationType: FfiConverterRustBuffer { + typealias SwiftType = NotificationType + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NotificationType { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .notification + + case 2: return .ring + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: NotificationType, into buf: inout [UInt8]) { + switch value { + + + case .notification: + writeInt(&buf, Int32(1)) + + + case .ring: + writeInt(&buf, Int32(2)) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeNotificationType_lift(_ buf: RustBuffer) throws -> NotificationType { + return try FfiConverterTypeNotificationType.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeNotificationType_lower(_ value: NotificationType) -> RustBuffer { + return FfiConverterTypeNotificationType.lower(value) +} + + +extension NotificationType: Equatable, Hashable {} + + + + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -1897,6 +2077,19 @@ extension QrCodeLoginError: Foundation.LocalizedError { public enum RoomMemberRole { + /** + * The member is a creator. + * + * A creator has an infinite power level and cannot be demoted, so this + * role is immutable. A room can have several creators. + * + * It is available in room versions where + * `explicitly_privilege_room_creators` in [`AuthorizationRules`] is set to + * `true`. + * + * [`AuthorizationRules`]: ruma::room_version_rules::AuthorizationRules + */ + case creator /** * The member is an administrator. */ @@ -1926,11 +2119,13 @@ public struct FfiConverterTypeRoomMemberRole: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { - case 1: return .administrator + case 1: return .creator - case 2: return .moderator + case 2: return .administrator - case 3: return .user + case 3: return .moderator + + case 4: return .user default: throw UniffiInternalError.unexpectedEnumCase } @@ -1940,17 +2135,21 @@ public struct FfiConverterTypeRoomMemberRole: FfiConverterRustBuffer { switch value { - case .administrator: + case .creator: writeInt(&buf, Int32(1)) - case .moderator: + case .administrator: writeInt(&buf, Int32(2)) - case .user: + case .moderator: writeInt(&buf, Int32(3)) + + case .user: + writeInt(&buf, Int32(4)) + } } } @@ -2208,6 +2407,30 @@ fileprivate struct FfiConverterOptionTypeIntent: FfiConverterRustBuffer { } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterOptionTypeNotificationType: FfiConverterRustBuffer { + typealias SwiftType = NotificationType? + + public static func write(_ value: SwiftType, into buf: inout [UInt8]) { + guard let value = value else { + writeInt(&buf, Int8(0)) + return + } + writeInt(&buf, Int8(1)) + FfiConverterTypeNotificationType.write(value, into: &buf) + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + switch try readInt(&buf) as Int8 { + case 0: return nil + case 1: return try FfiConverterTypeNotificationType.read(from: &buf) + default: throw UniffiInternalError.unexpectedOptionalTag + } + } +} + private enum InitializationResult { case ok case contractVersionMismatch diff --git a/swift/matrix_sdk_ffi.swift b/swift/matrix_sdk_ffi.swift index f6b32f6..c3fadc2 100644 --- a/swift/matrix_sdk_ffi.swift +++ b/swift/matrix_sdk_ffi.swift @@ -753,6 +753,12 @@ public protocol ClientProtocol: AnyObject, Sendable { */ func enableAllSendQueues(enable: Bool) async + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */ + func enableSendQueueUploadProgress(enable: Bool) + func encryption() -> Encryption /** @@ -829,10 +835,16 @@ public protocol ClientProtocol: AnyObject, Sendable { func getSessionVerificationController() async throws -> SessionVerificationController /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ - func getUrl(url: String) async throws -> String + func getUrl(url: String) async throws -> Data /** * The homeserver this client is configured to use. @@ -908,6 +920,21 @@ public protocol ClientProtocol: AnyObject, Sendable { */ func loginWithOidcCallback(callbackUrl: String) async throws + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ + func loginWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener) async throws + /** * Log the current user out. */ @@ -993,6 +1020,14 @@ public protocol ClientProtocol: AnyObject, Sendable { */ func server() -> String? + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ + func serverVendorInfo() async throws -> ServerVendorInfo + func session() throws -> Session /** @@ -1041,6 +1076,8 @@ public protocol ClientProtocol: AnyObject, Sendable { */ func slidingSyncVersion() -> SlidingSyncVersion + func spaceService() -> SpaceService + /** * Returns a handler to start the SSO login process. */ @@ -1108,8 +1145,19 @@ public protocol ClientProtocol: AnyObject, Sendable { * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ - func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, loginHint: String?) async throws -> OAuthAuthorizationData + func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, loginHint: String?, deviceId: String?, additionalScopes: [String]?) async throws -> OAuthAuthorizationData func userId() throws -> String @@ -1516,6 +1564,17 @@ open func enableAllSendQueues(enable: Bool)async { ) } + /** + * Enables or disables progress reporting for media uploads in the send + * queue. + */ +open func enableSendQueueUploadProgress(enable: Bool) {try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress(self.uniffiClonePointer(), + FfiConverterBool.lower(enable),$0 + ) +} +} + open func encryption() -> Encryption { return try! FfiConverterTypeEncryption_lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_client_encryption(self.uniffiClonePointer(),$0 @@ -1805,10 +1864,16 @@ open func getSessionVerificationController()async throws -> SessionVerification } /** - * Allows generic GET requests to be made through the SDKs internal HTTP - * client + * Allows generic GET requests to be made through the SDK's internal HTTP + * client. This is useful when the caller's native HTTP client wouldn't + * have the same configuration (such as certificates, proxies, etc.) This + * method returns the raw bytes of the response, so that any kind of + * resource can be fetched including images, files, etc. + * + * Note: When an HTTP error occurs, the error response can be found in the + * `ClientError::Generic`'s `details` field. */ -open func getUrl(url: String)async throws -> String { +open func getUrl(url: String)async throws -> Data { return try await uniffiRustCallAsync( rustFutureFunc: { @@ -1820,7 +1885,7 @@ open func getUrl(url: String)async throws -> String { 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: FfiConverterString.lift, + liftFunc: FfiConverterData.lift, errorHandler: FfiConverterTypeClientError_lift ) } @@ -2085,6 +2150,36 @@ open func loginWithOidcCallback(callbackUrl: String)async throws { ) } + /** + * Log in using the provided [`QrCodeData`]. The `Client` must be built + * by providing [`QrCodeData::server_name`] as the server name for this + * login to succeed. + * + * This method uses the login mechanism described in [MSC4108]. As such + * this method requires OAuth 2.0 support as well as sliding sync support. + * + * The usage of the progress_listener is required to transfer the + * [`CheckCode`] to the existing client. + * + * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 + */ +open func loginWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener)async throws { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_login_with_qr_code( + self.uniffiClonePointer(), + FfiConverterTypeQrCodeData_lower(qrCodeData),FfiConverterTypeOidcConfiguration_lower(oidcConfiguration),FfiConverterCallbackInterfaceQrLoginProgressListener_lower(progressListener) + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: FfiConverterTypeHumanQrLoginError_lift + ) +} + /** * Log the current user out. */ @@ -2335,6 +2430,29 @@ open func server() -> String? { }) } + /** + * Get server vendor information from the federation API. + * + * This method retrieves information about the server's name and version + * by calling the `/_matrix/federation/v1/version` endpoint. + */ +open func serverVendorInfo()async throws -> ServerVendorInfo { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + 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: FfiConverterTypeServerVendorInfo_lift, + errorHandler: FfiConverterTypeClientError_lift + ) +} + open func session()throws -> Session { return try FfiConverterTypeSession_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { uniffi_matrix_sdk_ffi_fn_method_client_session(self.uniffiClonePointer(),$0 @@ -2502,6 +2620,13 @@ open func slidingSyncVersion() -> SlidingSyncVersion { uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version(self.uniffiClonePointer(),$0 ) }) +} + +open func spaceService() -> SpaceService { + return try! FfiConverterTypeSpaceService_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_client_space_service(self.uniffiClonePointer(),$0 + ) +}) } /** @@ -2693,14 +2818,25 @@ open func uploadMedia(mimeType: String, data: Data, progressWatcher: ProgressWat * However, it should be noted that when providing a user ID as a hint * for MAS (with no upstream provider), then the format to use is defined * by [MSC4198]: https://github.com/matrix-org/matrix-spec-proposals/pull/4198 + * + * * `device_id` - The unique ID that will be associated with the session. + * If not set, a random one will be generated. It can be an existing + * device ID from a previous login call. Note that this should be done + * only if the client also holds the corresponding encryption keys. + * + * * `additional_scopes` - Additional scopes to request from the + * authorization server, e.g. "urn:matrix:client:com.example.msc9999.foo". + * The scopes for API access and the device ID according to the + * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) + * are always requested. */ -open func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, loginHint: String?)async throws -> OAuthAuthorizationData { +open func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, loginHint: String?, deviceId: String?, additionalScopes: [String]?)async throws -> OAuthAuthorizationData { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( self.uniffiClonePointer(), - FfiConverterTypeOidcConfiguration_lower(oidcConfiguration),FfiConverterOptionTypeOidcPrompt.lower(prompt),FfiConverterOptionString.lower(loginHint) + FfiConverterTypeOidcConfiguration_lower(oidcConfiguration),FfiConverterOptionTypeOidcPrompt.lower(prompt),FfiConverterOptionString.lower(loginHint),FfiConverterOptionString.lower(deviceId),FfiConverterOptionSequenceString.lower(additionalScopes) ) }, pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer, @@ -2807,22 +2943,6 @@ public protocol ClientBuilderProtocol: AnyObject, Sendable { func build() async throws -> Client - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ - func buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener) async throws -> Client - func crossProcessStoreLocksHolderName(holderName: String) -> ClientBuilder /** @@ -2941,7 +3061,11 @@ public protocol ClientBuilderProtocol: AnyObject, Sendable { */ func systemIsMemoryConstrained() -> ClientBuilder - func threadsEnabled(enabled: Bool) -> ClientBuilder + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */ + func threadsEnabled(enabled: Bool, threadSubscriptions: Bool) -> ClientBuilder func userAgent(userAgent: String) -> ClientBuilder @@ -3065,37 +3189,6 @@ open func build()async throws -> Client { ) } - /** - * Finish the building of the client and attempt to log in using the - * provided [`QrCodeData`]. - * - * This method will build the client and immediately attempt to log the - * client in using the provided [`QrCodeData`] using the login - * mechanism described in [MSC4108]. As such this methods requires OAuth - * 2.0 support as well as sliding sync support. - * - * The usage of the progress_listener is required to transfer the - * [`CheckCode`] to the existing client. - * - * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 - */ -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: FfiConverterTypeHumanQrLoginError_lift - ) -} - open func crossProcessStoreLocksHolderName(holderName: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name(self.uniffiClonePointer(), @@ -3336,10 +3429,15 @@ open func systemIsMemoryConstrained() -> ClientBuilder { }) } -open func threadsEnabled(enabled: Bool) -> ClientBuilder { + /** + * Whether the client should support threads client-side or not, and enable + * experimental support for MSC4306 (threads subscriptions) or not. + */ +open func threadsEnabled(enabled: Bool, threadSubscriptions: Bool) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled(self.uniffiClonePointer(), - FfiConverterBool.lower(enabled),$0 + FfiConverterBool.lower(enabled), + FfiConverterBool.lower(threadSubscriptions),$0 ) }) } @@ -3970,6 +4068,11 @@ public protocol HomeserverLoginDetailsProtocol: AnyObject, Sendable { */ func supportsPasswordLogin() -> Bool + /** + * Whether the current homeserver supports login using legacy SSO. + */ + func supportsSsoLogin() -> Bool + /** * The URL of the currently configured homeserver. */ @@ -4067,6 +4170,16 @@ open func supportsPasswordLogin() -> Bool { uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login(self.uniffiClonePointer(),$0 ) }) +} + + /** + * Whether the current homeserver supports login using legacy SSO. + */ +open func supportsSsoLogin() -> Bool { + return try! FfiConverterBool.lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login(self.uniffiClonePointer(),$0 + ) +}) } /** @@ -6297,6 +6410,16 @@ public protocol RoomProtocol: AnyObject, Sendable { func encryptionState() -> EncryptionState + /** + * Return the current MSC4306 thread subscription for the given thread root + * in this room. + * + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. + */ + func fetchThreadSubscription(threadRootEventId: String) async throws -> ThreadSubscription? + /** * Forget this room. * @@ -6452,6 +6575,8 @@ public protocol RoomProtocol: AnyObject, Sendable { */ func membership() -> Membership + func newLatestEvent() async -> LatestEventValue + func ownUserId() -> String /** @@ -6544,7 +6669,7 @@ public protocol RoomProtocol: AnyObject, Sendable { * * Returns an error if the room is not found or on rate limit */ - func reportRoom(reason: String?) async throws + func reportRoom(reason: String) async throws func resetPowerLevels() async throws -> RoomPowerLevels @@ -6562,39 +6687,6 @@ public protocol RoomProtocol: AnyObject, Sendable { */ func saveComposerDraft(draft: ComposerDraft, threadRoot: String?) async throws - /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. - */ - func sendCallNotification(callId: String, application: RtcApplicationType, notifyType: NotifyType, mentions: Mentions) async throws - - /** - * This will only send a call notification event if appropriate. - * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. - * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify - * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ - func sendCallNotificationIfNeeded() async throws -> Bool - /** * Send the current users live location beacon in the room. */ @@ -6620,6 +6712,21 @@ public protocol RoomProtocol: AnyObject, Sendable { */ func setName(name: String) async throws + /** + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. + */ + func setThreadSubscription(threadRootEventId: String, subscribed: Bool) async throws + /** * Sets a new topic in the room. */ @@ -7024,6 +7131,31 @@ open func encryptionState() -> EncryptionState { }) } + /** + * Return the current MSC4306 thread subscription for the given thread root + * in this room. + * + * Returns `None` if the thread doesn't exist, or isn't subscribed to, or + * the server can't handle MSC4306; otherwise, returns the thread + * subscription status. + */ +open func fetchThreadSubscription(threadRootEventId: String)async throws -> ThreadSubscription? { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + self.uniffiClonePointer(), + FfiConverterString.lower(threadRootEventId) + ) + }, + 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: FfiConverterOptionTypeThreadSubscription.lift, + errorHandler: FfiConverterTypeClientError_lift + ) +} + /** * Forget this room. * @@ -7587,6 +7719,24 @@ open func membership() -> Membership { }) } +open func newLatestEvent()async -> LatestEventValue { + return + try! await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + 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: FfiConverterTypeLatestEventValue_lift, + errorHandler: nil + + ) +} + open func ownUserId() -> String { return try! FfiConverterString.lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(self.uniffiClonePointer(),$0 @@ -7784,13 +7934,13 @@ open func reportContent(eventId: String, score: Int32?, reason: String?)async th * * Returns an error if the room is not found or on rate limit */ -open func reportRoom(reason: String?)async throws { +open func reportRoom(reason: String)async throws { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_report_room( self.uniffiClonePointer(), - FfiConverterOptionString.lower(reason) + FfiConverterString.lower(reason) ) }, pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, @@ -7877,69 +8027,6 @@ open func saveComposerDraft(draft: ComposerDraft, threadRoot: String?)async thro ) } - /** - * Send a call notification event in the current room. - * - * This is only supposed to be used in **custom** situations where the user - * explicitly chooses to send a `m.call.notify` event to invite/notify - * someone explicitly in unusual conditions. The default should be to - * use `send_call_notification_if_necessary` just before a new room call is - * created/joined. - * - * One example could be that the UI allows to start a call with a subset of - * users of the room members first. And then later on the user can - * invite more users to the call. - */ -open func sendCallNotification(callId: String, application: RtcApplicationType, notifyType: NotifyType, mentions: Mentions)async throws { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification( - self.uniffiClonePointer(), - FfiConverterString.lower(callId),FfiConverterTypeRtcApplicationType_lower(application),FfiConverterTypeNotifyType_lower(notifyType),FfiConverterTypeMentions_lower(mentions) - ) - }, - pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, - completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, - freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, - liftFunc: { $0 }, - errorHandler: FfiConverterTypeClientError_lift - ) -} - - /** - * This will only send a call notification event if appropriate. - * - * This function is supposed to be called whenever the user creates a room - * call. It will send a `m.call.notify` event if: - * - there is not yet a running call. - * - * It will configure the notify type: ring or notify based on: - * - is this a DM room -> ring - * - is this a group with more than one other member -> notify - * - * Returns: - * - `Ok(true)` if the event was successfully sent. - * - `Ok(false)` if we didn't send it because it was unnecessary. - * - `Err(_)` if sending the event failed. - */ -open func sendCallNotificationIfNeeded()async throws -> Bool { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_room_send_call_notification_if_needed( - self.uniffiClonePointer() - - ) - }, - pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_i8, - completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_i8, - freeFunc: ffi_matrix_sdk_ffi_rust_future_free_i8, - liftFunc: FfiConverterBool.lift, - errorHandler: FfiConverterTypeClientError_lift - ) -} - /** * Send the current users live location beacon in the room. */ @@ -8040,6 +8127,36 @@ open func setName(name: String)async throws { ) } + /** + * Set a MSC4306 subscription to a thread in this room, based on the thread + * root event id. + * + * If `subscribed` is `true`, it will subscribe to the thread, with a + * precision that the subscription was manually requested by the user + * (i.e. not automatic). + * + * If the thread was already subscribed to (resp. unsubscribed from), while + * trying to subscribe to it (resp. unsubscribe from it), it will do + * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an + * idempotent operation. + */ +open func setThreadSubscription(threadRootEventId: String, subscribed: Bool)async throws { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + self.uniffiClonePointer(), + FfiConverterString.lower(threadRootEventId),FfiConverterBool.lower(subscribed) + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: FfiConverterTypeClientError_lift + ) +} + /** * Sets a new topic in the room. */ @@ -10156,7 +10273,7 @@ public protocol RoomPreviewProtocol: AnyObject, Sendable { /** * Returns the room info the preview contains. */ - func info() throws -> RoomPreviewInfo + func info() -> RoomPreviewInfo /** * Get the user who created the invite, if any. @@ -10259,8 +10376,8 @@ open func forget()async throws { /** * Returns the room info the preview contains. */ -open func info()throws -> RoomPreviewInfo { - return try FfiConverterTypeRoomPreviewInfo_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { +open func info() -> RoomPreviewInfo { + return try! FfiConverterTypeRoomPreviewInfo_lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_roompreview_info(self.uniffiClonePointer(),$0 ) }) @@ -11378,16 +11495,450 @@ public func FfiConverterTypeSessionVerificationEmoji_lower(_ value: SessionVerif -public protocol SpanProtocol: AnyObject, Sendable { +/** + * The `SpaceRoomList`represents a paginated list of direct rooms + * that belong to a particular space. + * + * It can be used to paginate through the list (and have live updates on the + * pagination state) as well as subscribe to changes as rooms are joined or + * left. + * + * The `SpaceRoomList` also automatically subscribes to client room changes + * and updates the list accordingly as rooms are joined or left. + */ +public protocol SpaceRoomListProtocol: AnyObject, Sendable { - func enter() + /** + * Ask the list to retrieve the next page if the end hasn't been reached + * yet. Otherwise it no-ops. + */ + func paginate() async throws - func exit() + /** + * Returns if the room list is currently paginating or not. + */ + func paginationState() -> SpaceRoomListPaginationState - func isNone() -> Bool + /** + * Return the current list of rooms. + */ + func rooms() -> [SpaceRoom] + + /** + * Subscribe to pagination updates. + */ + func subscribeToPaginationStateUpdates(listener: SpaceRoomListPaginationStateListener) -> TaskHandle + + /** + * Subscribes to room list updates. + */ + func subscribeToRoomUpdate(listener: SpaceRoomListEntriesListener) -> TaskHandle } -open class Span: SpanProtocol, @unchecked Sendable { +/** + * The `SpaceRoomList`represents a paginated list of direct rooms + * that belong to a particular space. + * + * It can be used to paginate through the list (and have live updates on the + * pagination state) as well as subscribe to changes as rooms are joined or + * left. + * + * The `SpaceRoomList` also automatically subscribes to client room changes + * and updates the list accordingly as rooms are joined or left. + */ +open class SpaceRoomList: SpaceRoomListProtocol, @unchecked Sendable { + fileprivate let pointer: UnsafeMutableRawPointer! + + /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + 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`. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + 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. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public init(noPointer: NoPointer) { + self.pointer = nil + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public func uniffiClonePointer() -> UnsafeMutableRawPointer { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(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_spaceroomlist(pointer, $0) } + } + + + + + /** + * Ask the list to retrieve the next page if the end hasn't been reached + * yet. Otherwise it no-ops. + */ +open func paginate()async throws { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + self.uniffiClonePointer() + + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: FfiConverterTypeClientError_lift + ) +} + + /** + * Returns if the room list is currently paginating or not. + */ +open func paginationState() -> SpaceRoomListPaginationState { + return try! FfiConverterTypeSpaceRoomListPaginationState_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state(self.uniffiClonePointer(),$0 + ) +}) +} + + /** + * Return the current list of rooms. + */ +open func rooms() -> [SpaceRoom] { + return try! FfiConverterSequenceTypeSpaceRoom.lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(self.uniffiClonePointer(),$0 + ) +}) +} + + /** + * Subscribe to pagination updates. + */ +open func subscribeToPaginationStateUpdates(listener: SpaceRoomListPaginationStateListener) -> TaskHandle { + return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates(self.uniffiClonePointer(), + FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener_lower(listener),$0 + ) +}) +} + + /** + * Subscribes to room list updates. + */ +open func subscribeToRoomUpdate(listener: SpaceRoomListEntriesListener) -> TaskHandle { + return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update(self.uniffiClonePointer(), + FfiConverterCallbackInterfaceSpaceRoomListEntriesListener_lower(listener),$0 + ) +}) +} + + +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSpaceRoomList: FfiConverter { + + typealias FfiType = UnsafeMutableRawPointer + typealias SwiftType = SpaceRoomList + + public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceRoomList { + return SpaceRoomList(unsafeFromRawPointer: pointer) + } + + public static func lower(_ value: SpaceRoomList) -> UnsafeMutableRawPointer { + return value.uniffiClonePointer() + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SpaceRoomList { + 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: SpaceRoomList, 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))))) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoomList_lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceRoomList { + return try FfiConverterTypeSpaceRoomList.lift(pointer) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoomList_lower(_ value: SpaceRoomList) -> UnsafeMutableRawPointer { + return FfiConverterTypeSpaceRoomList.lower(value) +} + + + + + + +/** + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. + */ +public protocol SpaceServiceProtocol: AnyObject, Sendable { + + /** + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. + */ + func joinedSpaces() async -> [SpaceRoom] + + /** + * Returns a `SpaceRoomList` for the given space ID. + */ + func spaceRoomList(spaceId: String) async throws -> SpaceRoomList + + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ + func subscribeToJoinedSpaces(listener: SpaceServiceJoinedSpacesListener) async -> TaskHandle + +} +/** + * The main entry point into the Spaces facilities. + * + * The spaces service is responsible for retrieving one's joined rooms, + * building a graph out of their `m.space.parent` and `m.space.child` state + * events, and providing access to the top-level spaces and their children. + */ +open class SpaceService: SpaceServiceProtocol, @unchecked Sendable { + fileprivate let pointer: UnsafeMutableRawPointer! + + /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + 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`. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + 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. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public init(noPointer: NoPointer) { + self.pointer = nil + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public func uniffiClonePointer() -> UnsafeMutableRawPointer { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_spaceservice(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_spaceservice(pointer, $0) } + } + + + + + /** + * Returns a list of all the top-level joined spaces. It will eagerly + * compute the latest version and also notify subscribers if there were + * any changes. + */ +open func joinedSpaces()async -> [SpaceRoom] { + return + try! await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + 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: FfiConverterSequenceTypeSpaceRoom.lift, + errorHandler: nil + + ) +} + + /** + * Returns a `SpaceRoomList` for the given space ID. + */ +open func spaceRoomList(spaceId: String)async throws -> SpaceRoomList { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + self.uniffiClonePointer(), + FfiConverterString.lower(spaceId) + ) + }, + 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: FfiConverterTypeSpaceRoomList_lift, + errorHandler: FfiConverterTypeClientError_lift + ) +} + + /** + * Subscribes to updates on the joined spaces list. If space rooms are + * joined or left, the stream will yield diffs that reflect the changes. + */ +open func subscribeToJoinedSpaces(listener: SpaceServiceJoinedSpacesListener)async -> TaskHandle { + return + try! await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + self.uniffiClonePointer(), + FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener_lower(listener) + ) + }, + 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: FfiConverterTypeTaskHandle_lift, + errorHandler: nil + + ) +} + + +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSpaceService: FfiConverter { + + typealias FfiType = UnsafeMutableRawPointer + typealias SwiftType = SpaceService + + public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceService { + return SpaceService(unsafeFromRawPointer: pointer) + } + + public static func lower(_ value: SpaceService) -> UnsafeMutableRawPointer { + return value.uniffiClonePointer() + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SpaceService { + 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: SpaceService, 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))))) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceService_lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceService { + return try FfiConverterTypeSpaceService.lift(pointer) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceService_lower(_ value: SpaceService) -> UnsafeMutableRawPointer { + return FfiConverterTypeSpaceService.lower(value) +} + + + + + + +public protocol SpanProtocol: AnyObject, Sendable { + + func enter() + + func exit() + + func isNone() -> Bool + +} +open class Span: SpanProtocol, @unchecked Sendable { fileprivate let pointer: UnsafeMutableRawPointer! /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. @@ -11726,6 +12277,15 @@ public func FfiConverterTypeSsoHandler_lower(_ value: SsoHandler) -> UnsafeMutab public protocol SyncServiceProtocol: AnyObject, Sendable { + /** + * Force expiring both sliding sync sessions. + * + * This ensures that the sync service is stopped before expiring both + * sessions. It should be used sparingly, as it will cause a restart of + * the sessions on the server as well. + */ + func expireSessions() async + func roomListService() -> RoomListService func start() async @@ -11787,6 +12347,31 @@ open class SyncService: SyncServiceProtocol, @unchecked Sendable { + /** + * Force expiring both sliding sync sessions. + * + * This ensures that the sync service is stopped before expiring both + * sessions. It should be used sparingly, as it will cause a restart of + * the sessions on the server as well. + */ +open func expireSessions()async { + return + try! await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + self.uniffiClonePointer() + + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: nil + + ) +} + open func roomListService() -> RoomListService { return try! FfiConverterTypeRoomListService_lift(try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service(self.uniffiClonePointer(),$0 @@ -12444,15 +13029,15 @@ public protocol TimelineProtocol: AnyObject, Sendable { */ func send(msg: RoomMessageEventContentWithoutRelation) async throws -> SendHandle - func sendAudio(params: UploadParameters, audioInfo: AudioInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle + func sendAudio(params: UploadParameters, audioInfo: AudioInfo) throws -> SendAttachmentJoinHandle - func sendFile(params: UploadParameters, fileInfo: FileInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle + func sendFile(params: UploadParameters, fileInfo: FileInfo) throws -> SendAttachmentJoinHandle func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemInfo]) throws -> SendGalleryJoinHandle - func sendImage(params: UploadParameters, thumbnailPath: String?, imageInfo: ImageInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle + func sendImage(params: UploadParameters, thumbnailSource: UploadSource?, imageInfo: ImageInfo) throws -> SendAttachmentJoinHandle - func sendLocation(body: String, geoUri: String, description: String?, zoomLevel: UInt8?, assetType: AssetType?, replyParams: ReplyParameters?) async throws + func sendLocation(body: String, geoUri: String, description: String?, zoomLevel: UInt8?, assetType: AssetType?, repliedToEventId: String?) async throws func sendPollResponse(pollStartEventId: String, answers: [String]) async throws @@ -12465,11 +13050,11 @@ public protocol TimelineProtocol: AnyObject, Sendable { * reply so that clients that support threads can render the reply * inside the thread. */ - func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: ReplyParameters) async throws + func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String) async throws - func sendVideo(params: UploadParameters, thumbnailPath: String?, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle + func sendVideo(params: UploadParameters, thumbnailSource: UploadSource?, videoInfo: VideoInfo) throws -> SendAttachmentJoinHandle - func sendVoiceMessage(params: UploadParameters, audioInfo: AudioInfo, waveform: [UInt16], progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle + func sendVoiceMessage(params: UploadParameters, audioInfo: AudioInfo, waveform: [UInt16]) throws -> SendAttachmentJoinHandle func subscribeToBackPaginationStatus(listener: PaginationStatusListener) async throws -> TaskHandle @@ -12874,22 +13459,20 @@ open func send(msg: RoomMessageEventContentWithoutRelation)async throws -> Send ) } -open func sendAudio(params: UploadParameters, audioInfo: AudioInfo, progressWatcher: ProgressWatcher?)throws -> SendAttachmentJoinHandle { +open func sendAudio(params: UploadParameters, audioInfo: AudioInfo)throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio(self.uniffiClonePointer(), FfiConverterTypeUploadParameters_lower(params), - FfiConverterTypeAudioInfo_lower(audioInfo), - FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0 + FfiConverterTypeAudioInfo_lower(audioInfo),$0 ) }) } -open func sendFile(params: UploadParameters, fileInfo: FileInfo, progressWatcher: ProgressWatcher?)throws -> SendAttachmentJoinHandle { +open func sendFile(params: UploadParameters, fileInfo: FileInfo)throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { uniffi_matrix_sdk_ffi_fn_method_timeline_send_file(self.uniffiClonePointer(), FfiConverterTypeUploadParameters_lower(params), - FfiConverterTypeFileInfo_lower(fileInfo), - FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0 + FfiConverterTypeFileInfo_lower(fileInfo),$0 ) }) } @@ -12903,24 +13486,23 @@ open func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemIn }) } -open func sendImage(params: UploadParameters, thumbnailPath: String?, imageInfo: ImageInfo, progressWatcher: ProgressWatcher?)throws -> SendAttachmentJoinHandle { +open func sendImage(params: UploadParameters, thumbnailSource: UploadSource?, imageInfo: ImageInfo)throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { uniffi_matrix_sdk_ffi_fn_method_timeline_send_image(self.uniffiClonePointer(), FfiConverterTypeUploadParameters_lower(params), - FfiConverterOptionString.lower(thumbnailPath), - FfiConverterTypeImageInfo_lower(imageInfo), - FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0 + FfiConverterOptionTypeUploadSource.lower(thumbnailSource), + FfiConverterTypeImageInfo_lower(imageInfo),$0 ) }) } -open func sendLocation(body: String, geoUri: String, description: String?, zoomLevel: UInt8?, assetType: AssetType?, replyParams: ReplyParameters?)async throws { +open func sendLocation(body: String, geoUri: String, description: String?, zoomLevel: UInt8?, assetType: AssetType?, repliedToEventId: String?)async throws { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( self.uniffiClonePointer(), - FfiConverterString.lower(body),FfiConverterString.lower(geoUri),FfiConverterOptionString.lower(description),FfiConverterOptionUInt8.lower(zoomLevel),FfiConverterOptionTypeAssetType.lower(assetType),FfiConverterOptionTypeReplyParameters.lower(replyParams) + FfiConverterString.lower(body),FfiConverterString.lower(geoUri),FfiConverterOptionString.lower(description),FfiConverterOptionUInt8.lower(zoomLevel),FfiConverterOptionTypeAssetType.lower(assetType),FfiConverterOptionString.lower(repliedToEventId) ) }, pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, @@ -12972,13 +13554,13 @@ open func sendReadReceipt(receiptType: ReceiptType, eventId: String)async throws * reply so that clients that support threads can render the reply * inside the thread. */ -open func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: ReplyParameters)async throws { +open func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String)async throws { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( self.uniffiClonePointer(), - FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(msg),FfiConverterTypeReplyParameters_lower(replyParams) + FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(msg),FfiConverterString.lower(eventId) ) }, pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, @@ -12989,24 +13571,22 @@ open func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: Re ) } -open func sendVideo(params: UploadParameters, thumbnailPath: String?, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?)throws -> SendAttachmentJoinHandle { +open func sendVideo(params: UploadParameters, thumbnailSource: UploadSource?, videoInfo: VideoInfo)throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { uniffi_matrix_sdk_ffi_fn_method_timeline_send_video(self.uniffiClonePointer(), FfiConverterTypeUploadParameters_lower(params), - FfiConverterOptionString.lower(thumbnailPath), - FfiConverterTypeVideoInfo_lower(videoInfo), - FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0 + FfiConverterOptionTypeUploadSource.lower(thumbnailSource), + FfiConverterTypeVideoInfo_lower(videoInfo),$0 ) }) } -open func sendVoiceMessage(params: UploadParameters, audioInfo: AudioInfo, waveform: [UInt16], progressWatcher: ProgressWatcher?)throws -> SendAttachmentJoinHandle { +open func sendVoiceMessage(params: UploadParameters, audioInfo: AudioInfo, waveform: [UInt16])throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message(self.uniffiClonePointer(), FfiConverterTypeUploadParameters_lower(params), FfiConverterTypeAudioInfo_lower(audioInfo), - FfiConverterSequenceUInt16.lower(waveform), - FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0 + FfiConverterSequenceUInt16.lower(waveform),$0 ) }) } @@ -13140,200 +13720,6 @@ public func FfiConverterTypeTimeline_lower(_ value: Timeline) -> UnsafeMutableRa -public protocol TimelineDiffProtocol: AnyObject, Sendable { - - func append() -> [TimelineItem]? - - func change() -> TimelineChange - - func insert() -> InsertData? - - func pushBack() -> TimelineItem? - - func pushFront() -> TimelineItem? - - func remove() -> UInt32? - - func reset() -> [TimelineItem]? - - func set() -> SetData? - - func truncate() -> UInt32? - -} -open class TimelineDiff: TimelineDiffProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! - - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. -#if swift(>=5.8) - @_documentation(visibility: private) -#endif - 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`. -#if swift(>=5.8) - @_documentation(visibility: private) -#endif - 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. -#if swift(>=5.8) - @_documentation(visibility: private) -#endif - public init(noPointer: NoPointer) { - self.pointer = nil - } - -#if swift(>=5.8) - @_documentation(visibility: private) -#endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelinediff(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_timelinediff(pointer, $0) } - } - - - - -open func append() -> [TimelineItem]? { - return try! FfiConverterOptionSequenceTypeTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_append(self.uniffiClonePointer(),$0 - ) -}) -} - -open func change() -> TimelineChange { - return try! FfiConverterTypeTimelineChange_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_change(self.uniffiClonePointer(),$0 - ) -}) -} - -open func insert() -> InsertData? { - return try! FfiConverterOptionTypeInsertData.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_insert(self.uniffiClonePointer(),$0 - ) -}) -} - -open func pushBack() -> TimelineItem? { - return try! FfiConverterOptionTypeTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_back(self.uniffiClonePointer(),$0 - ) -}) -} - -open func pushFront() -> TimelineItem? { - return try! FfiConverterOptionTypeTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_push_front(self.uniffiClonePointer(),$0 - ) -}) -} - -open func remove() -> UInt32? { - return try! FfiConverterOptionUInt32.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_remove(self.uniffiClonePointer(),$0 - ) -}) -} - -open func reset() -> [TimelineItem]? { - return try! FfiConverterOptionSequenceTypeTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_reset(self.uniffiClonePointer(),$0 - ) -}) -} - -open func set() -> SetData? { - return try! FfiConverterOptionTypeSetData.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_set(self.uniffiClonePointer(),$0 - ) -}) -} - -open func truncate() -> UInt32? { - return try! FfiConverterOptionUInt32.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelinediff_truncate(self.uniffiClonePointer(),$0 - ) -}) -} - - -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeTimelineDiff: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer - typealias SwiftType = TimelineDiff - - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineDiff { - return TimelineDiff(unsafeFromRawPointer: pointer) - } - - public static func lower(_ value: TimelineDiff) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineDiff { - 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: TimelineDiff, 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))))) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeTimelineDiff_lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineDiff { - return try FfiConverterTypeTimelineDiff.lift(pointer) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeTimelineDiff_lower(_ value: TimelineDiff) -> UnsafeMutableRawPointer { - return FfiConverterTypeTimelineDiff.lower(value) -} - - - - - - public protocol TimelineEventProtocol: AnyObject, Sendable { func eventId() -> String @@ -14514,6 +14900,97 @@ public func FfiConverterTypeWidgetDriverHandle_lower(_ value: WidgetDriverHandle +/** + * Progress of an operation in abstract units. + * + * Contrary to [`TransmissionProgress`], this allows tracking the progress + * of sending or receiving a payload in estimated pseudo units representing a + * percentage. This is helpful in cases where the exact progress in bytes isn't + * known, for instance, because encryption (which changes the size) happens on + * the fly. + */ +public struct AbstractProgress { + /** + * How many units were already transferred. + */ + public var current: UInt64 + /** + * How many units there are in total. + */ + public var total: UInt64 + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * How many units were already transferred. + */current: UInt64, + /** + * How many units there are in total. + */total: UInt64) { + self.current = current + self.total = total + } +} + +#if compiler(>=6) +extension AbstractProgress: Sendable {} +#endif + + +extension AbstractProgress: Equatable, Hashable { + public static func ==(lhs: AbstractProgress, rhs: AbstractProgress) -> Bool { + if lhs.current != rhs.current { + return false + } + if lhs.total != rhs.total { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(current) + hasher.combine(total) + } +} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeAbstractProgress: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AbstractProgress { + return + try AbstractProgress( + current: FfiConverterUInt64.read(from: &buf), + total: FfiConverterUInt64.read(from: &buf) + ) + } + + public static func write(_ value: AbstractProgress, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.current, into: &buf) + FfiConverterUInt64.write(value.total, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeAbstractProgress_lift(_ buf: RustBuffer) throws -> AbstractProgress { + return try FfiConverterTypeAbstractProgress.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeAbstractProgress_lower(_ value: AbstractProgress) -> RustBuffer { + return FfiConverterTypeAbstractProgress.lower(value) +} + + public struct AudioInfo { public var duration: TimeInterval? public var size: UInt64? @@ -15764,9 +16241,9 @@ public struct GalleryUploadParameters { */ public var mentions: Mentions? /** - * Optional parameters for sending the media as (threaded) reply. + * Optional Event ID to reply to. */ - public var replyParams: ReplyParameters? + public var inReplyTo: String? // Default memberwise initializers are never public by default, so we // declare one manually. @@ -15781,12 +16258,12 @@ public struct GalleryUploadParameters { * Optional intentional mentions to be sent with the gallery. */mentions: Mentions?, /** - * Optional parameters for sending the media as (threaded) reply. - */replyParams: ReplyParameters?) { + * Optional Event ID to reply to. + */inReplyTo: String?) { self.caption = caption self.formattedCaption = formattedCaption self.mentions = mentions - self.replyParams = replyParams + self.inReplyTo = inReplyTo } } @@ -15806,7 +16283,7 @@ extension GalleryUploadParameters: Equatable, Hashable { if lhs.mentions != rhs.mentions { return false } - if lhs.replyParams != rhs.replyParams { + if lhs.inReplyTo != rhs.inReplyTo { return false } return true @@ -15816,7 +16293,7 @@ extension GalleryUploadParameters: Equatable, Hashable { hasher.combine(caption) hasher.combine(formattedCaption) hasher.combine(mentions) - hasher.combine(replyParams) + hasher.combine(inReplyTo) } } @@ -15832,7 +16309,7 @@ public struct FfiConverterTypeGalleryUploadParameters: FfiConverterRustBuffer { caption: FfiConverterOptionString.read(from: &buf), formattedCaption: FfiConverterOptionTypeFormattedBody.read(from: &buf), mentions: FfiConverterOptionTypeMentions.read(from: &buf), - replyParams: FfiConverterOptionTypeReplyParameters.read(from: &buf) + inReplyTo: FfiConverterOptionString.read(from: &buf) ) } @@ -15840,7 +16317,7 @@ public struct FfiConverterTypeGalleryUploadParameters: FfiConverterRustBuffer { FfiConverterOptionString.write(value.caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(value.formattedCaption, into: &buf) FfiConverterOptionTypeMentions.write(value.mentions, into: &buf) - FfiConverterOptionTypeReplyParameters.write(value.replyParams, into: &buf) + FfiConverterOptionString.write(value.inReplyTo, into: &buf) } } @@ -16224,58 +16701,6 @@ public func FfiConverterTypeImageMessageContent_lower(_ value: ImageMessageConte } -public struct InsertData { - public var index: UInt32 - public var item: TimelineItem - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(index: UInt32, item: TimelineItem) { - self.index = index - self.item = item - } -} - -#if compiler(>=6) -extension InsertData: Sendable {} -#endif - - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeInsertData: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> InsertData { - return - try InsertData( - index: FfiConverterUInt32.read(from: &buf), - item: FfiConverterTypeTimelineItem.read(from: &buf) - ) - } - - public static func write(_ value: InsertData, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.index, into: &buf) - FfiConverterTypeTimelineItem.write(value.item, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeInsertData_lift(_ buf: RustBuffer) throws -> InsertData { - return try FfiConverterTypeInsertData.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeInsertData_lower(_ value: InsertData) -> RustBuffer { - return FfiConverterTypeInsertData.lower(value) -} - - /** * An FFI representation of a request to join a room. */ @@ -16776,21 +17201,21 @@ public struct MediaPreviewConfig { /** * The media previews setting for the user. */ - public var mediaPreviews: MediaPreviews + public var mediaPreviews: MediaPreviews? /** * The invite avatars setting for the user. */ - public var inviteAvatars: InviteAvatars + public var inviteAvatars: InviteAvatars? // Default memberwise initializers are never public by default, so we // declare one manually. public init( /** * The media previews setting for the user. - */mediaPreviews: MediaPreviews, + */mediaPreviews: MediaPreviews?, /** * The invite avatars setting for the user. - */inviteAvatars: InviteAvatars) { + */inviteAvatars: InviteAvatars?) { self.mediaPreviews = mediaPreviews self.inviteAvatars = inviteAvatars } @@ -16827,14 +17252,14 @@ public struct FfiConverterTypeMediaPreviewConfig: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MediaPreviewConfig { return try MediaPreviewConfig( - mediaPreviews: FfiConverterTypeMediaPreviews.read(from: &buf), - inviteAvatars: FfiConverterTypeInviteAvatars.read(from: &buf) + mediaPreviews: FfiConverterOptionTypeMediaPreviews.read(from: &buf), + inviteAvatars: FfiConverterOptionTypeInviteAvatars.read(from: &buf) ) } public static func write(_ value: MediaPreviewConfig, into buf: inout [UInt8]) { - FfiConverterTypeMediaPreviews.write(value.mediaPreviews, into: &buf) - FfiConverterTypeInviteAvatars.write(value.inviteAvatars, into: &buf) + FfiConverterOptionTypeMediaPreviews.write(value.mediaPreviews, into: &buf) + FfiConverterOptionTypeInviteAvatars.write(value.inviteAvatars, into: &buf) } } @@ -16854,6 +17279,98 @@ public func FfiConverterTypeMediaPreviewConfig_lower(_ value: MediaPreviewConfig } +/** + * This type represents the progress of a media (consisting of a file and + * possibly a thumbnail) being uploaded. + */ +public struct MediaUploadProgress { + /** + * The index of the media within the transaction. A file and its + * thumbnail share the same index. Will always be 0 for non-gallery + * media uploads. + */ + public var index: UInt64 + /** + * The current combined upload progress for both the file and, + * if it exists, its thumbnail. + */ + public var progress: AbstractProgress + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * The index of the media within the transaction. A file and its + * thumbnail share the same index. Will always be 0 for non-gallery + * media uploads. + */index: UInt64, + /** + * The current combined upload progress for both the file and, + * if it exists, its thumbnail. + */progress: AbstractProgress) { + self.index = index + self.progress = progress + } +} + +#if compiler(>=6) +extension MediaUploadProgress: Sendable {} +#endif + + +extension MediaUploadProgress: Equatable, Hashable { + public static func ==(lhs: MediaUploadProgress, rhs: MediaUploadProgress) -> Bool { + if lhs.index != rhs.index { + return false + } + if lhs.progress != rhs.progress { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(index) + hasher.combine(progress) + } +} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeMediaUploadProgress: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MediaUploadProgress { + return + try MediaUploadProgress( + index: FfiConverterUInt64.read(from: &buf), + progress: FfiConverterTypeAbstractProgress.read(from: &buf) + ) + } + + public static func write(_ value: MediaUploadProgress, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.index, into: &buf) + FfiConverterTypeAbstractProgress.write(value.progress, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMediaUploadProgress_lift(_ buf: RustBuffer) throws -> MediaUploadProgress { + return try FfiConverterTypeMediaUploadProgress.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMediaUploadProgress_lower(_ value: MediaUploadProgress) -> RustBuffer { + return FfiConverterTypeMediaUploadProgress.lower(value) +} + + public struct Mentions { public var userIds: [String] public var room: Bool @@ -18338,22 +18855,14 @@ public struct PredecessorRoom { * The ID of the replacement room. */ public var roomId: String - /** - * The event ID of the last known event in the predecesssor room. - */ - public var lastEventId: String // Default memberwise initializers are never public by default, so we // declare one manually. public init( /** * The ID of the replacement room. - */roomId: String, - /** - * The event ID of the last known event in the predecesssor room. - */lastEventId: String) { + */roomId: String) { self.roomId = roomId - self.lastEventId = lastEventId } } @@ -18367,15 +18876,11 @@ extension PredecessorRoom: Equatable, Hashable { if lhs.roomId != rhs.roomId { return false } - if lhs.lastEventId != rhs.lastEventId { - return false - } return true } public func hash(into hasher: inout Hasher) { hasher.combine(roomId) - hasher.combine(lastEventId) } } @@ -18388,14 +18893,12 @@ public struct FfiConverterTypePredecessorRoom: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PredecessorRoom { return try PredecessorRoom( - roomId: FfiConverterString.read(from: &buf), - lastEventId: FfiConverterString.read(from: &buf) + roomId: FfiConverterString.read(from: &buf) ) } public static func write(_ value: PredecessorRoom, into buf: inout [UInt8]) { FfiConverterString.write(value.roomId, into: &buf) - FfiConverterString.write(value.lastEventId, into: &buf) } } @@ -18687,104 +19190,6 @@ public func FfiConverterTypeReceipt_lower(_ value: Receipt) -> RustBuffer { } -public struct ReplyParameters { - /** - * The ID of the event to reply to. - */ - public var eventId: String - /** - * Whether to enforce a thread relation. - */ - public var enforceThread: Bool - /** - * If enforcing a threaded relation, whether the message is a reply on a - * thread. - */ - public var replyWithinThread: Bool - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init( - /** - * The ID of the event to reply to. - */eventId: String, - /** - * Whether to enforce a thread relation. - */enforceThread: Bool, - /** - * If enforcing a threaded relation, whether the message is a reply on a - * thread. - */replyWithinThread: Bool) { - self.eventId = eventId - self.enforceThread = enforceThread - self.replyWithinThread = replyWithinThread - } -} - -#if compiler(>=6) -extension ReplyParameters: Sendable {} -#endif - - -extension ReplyParameters: Equatable, Hashable { - public static func ==(lhs: ReplyParameters, rhs: ReplyParameters) -> Bool { - if lhs.eventId != rhs.eventId { - return false - } - if lhs.enforceThread != rhs.enforceThread { - return false - } - if lhs.replyWithinThread != rhs.replyWithinThread { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(eventId) - hasher.combine(enforceThread) - hasher.combine(replyWithinThread) - } -} - - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeReplyParameters: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ReplyParameters { - return - try ReplyParameters( - eventId: FfiConverterString.read(from: &buf), - enforceThread: FfiConverterBool.read(from: &buf), - replyWithinThread: FfiConverterBool.read(from: &buf) - ) - } - - public static func write(_ value: ReplyParameters, into buf: inout [UInt8]) { - FfiConverterString.write(value.eventId, into: &buf) - FfiConverterBool.write(value.enforceThread, into: &buf) - FfiConverterBool.write(value.replyWithinThread, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeReplyParameters_lift(_ buf: RustBuffer) throws -> ReplyParameters { - return try FfiConverterTypeReplyParameters.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeReplyParameters_lower(_ value: ReplyParameters) -> RustBuffer { - return FfiConverterTypeReplyParameters.lower(value) -} - - /** * The config to use for HTTP requests by default in this client. */ @@ -19101,54 +19506,6 @@ public func FfiConverterTypeRoomDescription_lower(_ value: RoomDescription) -> R } -public struct RoomDirectorySearchEntriesResult { - public var entriesStream: TaskHandle - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(entriesStream: TaskHandle) { - self.entriesStream = entriesStream - } -} - -#if compiler(>=6) -extension RoomDirectorySearchEntriesResult: Sendable {} -#endif - - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeRoomDirectorySearchEntriesResult: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomDirectorySearchEntriesResult { - return - try RoomDirectorySearchEntriesResult( - entriesStream: FfiConverterTypeTaskHandle.read(from: &buf) - ) - } - - public static func write(_ value: RoomDirectorySearchEntriesResult, into buf: inout [UInt8]) { - FfiConverterTypeTaskHandle.write(value.entriesStream, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeRoomDirectorySearchEntriesResult_lift(_ buf: RustBuffer) throws -> RoomDirectorySearchEntriesResult { - return try FfiConverterTypeRoomDirectorySearchEntriesResult.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeRoomDirectorySearchEntriesResult_lower(_ value: RoomDirectorySearchEntriesResult) -> RustBuffer { - return FfiConverterTypeRoomDirectorySearchEntriesResult.lower(value) -} - - /** * Information about a member considered to be a room hero. */ @@ -19251,7 +19608,7 @@ public func FfiConverterTypeRoomHero_lower(_ value: RoomHero) -> RustBuffer { public struct RoomInfo { public var id: String public var encryptionState: EncryptionState - public var creator: String? + public var creators: [String]? /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. @@ -19334,10 +19691,19 @@ public struct RoomInfo { * Can be missing if the room power levels event is missing from the store. */ public var powerLevels: RoomPowerLevels? + /** + * This room's version. + */ + public var roomVersion: String? + /** + * Whether creators are privileged over every other user (have infinite + * power level). + */ + public var privilegedCreatorsRole: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(id: String, encryptionState: EncryptionState, creator: String?, + public init(id: String, encryptionState: EncryptionState, creators: [String]?, /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. @@ -19389,10 +19755,17 @@ public struct RoomInfo { * This room's current power levels. * * Can be missing if the room power levels event is missing from the store. - */powerLevels: RoomPowerLevels?) { + */powerLevels: RoomPowerLevels?, + /** + * This room's version. + */roomVersion: String?, + /** + * Whether creators are privileged over every other user (have infinite + * power level). + */privilegedCreatorsRole: Bool) { self.id = id self.encryptionState = encryptionState - self.creator = creator + self.creators = creators self.displayName = displayName self.rawName = rawName self.topic = topic @@ -19423,6 +19796,8 @@ public struct RoomInfo { self.joinRule = joinRule self.historyVisibility = historyVisibility self.powerLevels = powerLevels + self.roomVersion = roomVersion + self.privilegedCreatorsRole = privilegedCreatorsRole } } @@ -19441,7 +19816,7 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer { try RoomInfo( id: FfiConverterString.read(from: &buf), encryptionState: FfiConverterTypeEncryptionState.read(from: &buf), - creator: FfiConverterOptionString.read(from: &buf), + creators: FfiConverterOptionSequenceString.read(from: &buf), displayName: FfiConverterOptionString.read(from: &buf), rawName: FfiConverterOptionString.read(from: &buf), topic: FfiConverterOptionString.read(from: &buf), @@ -19471,14 +19846,16 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer { pinnedEventIds: FfiConverterSequenceString.read(from: &buf), joinRule: FfiConverterOptionTypeJoinRule.read(from: &buf), historyVisibility: FfiConverterTypeRoomHistoryVisibility.read(from: &buf), - powerLevels: FfiConverterOptionTypeRoomPowerLevels.read(from: &buf) + powerLevels: FfiConverterOptionTypeRoomPowerLevels.read(from: &buf), + roomVersion: FfiConverterOptionString.read(from: &buf), + privilegedCreatorsRole: FfiConverterBool.read(from: &buf) ) } public static func write(_ value: RoomInfo, into buf: inout [UInt8]) { FfiConverterString.write(value.id, into: &buf) FfiConverterTypeEncryptionState.write(value.encryptionState, into: &buf) - FfiConverterOptionString.write(value.creator, into: &buf) + FfiConverterOptionSequenceString.write(value.creators, into: &buf) FfiConverterOptionString.write(value.displayName, into: &buf) FfiConverterOptionString.write(value.rawName, into: &buf) FfiConverterOptionString.write(value.topic, into: &buf) @@ -19509,6 +19886,8 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer { FfiConverterOptionTypeJoinRule.write(value.joinRule, into: &buf) FfiConverterTypeRoomHistoryVisibility.write(value.historyVisibility, into: &buf) FfiConverterOptionTypeRoomPowerLevels.write(value.powerLevels, into: &buf) + FfiConverterOptionString.write(value.roomVersion, into: &buf) + FfiConverterBool.write(value.privilegedCreatorsRole, into: &buf) } } @@ -19586,15 +19965,15 @@ public struct RoomMember { public var avatarUrl: String? public var membership: MembershipState public var isNameAmbiguous: Bool - public var powerLevel: Int64 - public var normalizedPowerLevel: Int64 + public var powerLevel: PowerLevel + public var normalizedPowerLevel: PowerLevel public var isIgnored: Bool public var suggestedRoleForPowerLevel: RoomMemberRole public var membershipChangeReason: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(userId: String, displayName: String?, avatarUrl: String?, membership: MembershipState, isNameAmbiguous: Bool, powerLevel: Int64, normalizedPowerLevel: Int64, isIgnored: Bool, suggestedRoleForPowerLevel: RoomMemberRole, membershipChangeReason: String?) { + public init(userId: String, displayName: String?, avatarUrl: String?, membership: MembershipState, isNameAmbiguous: Bool, powerLevel: PowerLevel, normalizedPowerLevel: PowerLevel, isIgnored: Bool, suggestedRoleForPowerLevel: RoomMemberRole, membershipChangeReason: String?) { self.userId = userId self.displayName = displayName self.avatarUrl = avatarUrl @@ -19676,8 +20055,8 @@ public struct FfiConverterTypeRoomMember: FfiConverterRustBuffer { avatarUrl: FfiConverterOptionString.read(from: &buf), membership: FfiConverterTypeMembershipState.read(from: &buf), isNameAmbiguous: FfiConverterBool.read(from: &buf), - powerLevel: FfiConverterInt64.read(from: &buf), - normalizedPowerLevel: FfiConverterInt64.read(from: &buf), + powerLevel: FfiConverterTypePowerLevel.read(from: &buf), + normalizedPowerLevel: FfiConverterTypePowerLevel.read(from: &buf), isIgnored: FfiConverterBool.read(from: &buf), suggestedRoleForPowerLevel: FfiConverterTypeRoomMemberRole.read(from: &buf), membershipChangeReason: FfiConverterOptionString.read(from: &buf) @@ -19690,8 +20069,8 @@ public struct FfiConverterTypeRoomMember: FfiConverterRustBuffer { FfiConverterOptionString.write(value.avatarUrl, into: &buf) FfiConverterTypeMembershipState.write(value.membership, into: &buf) FfiConverterBool.write(value.isNameAmbiguous, into: &buf) - FfiConverterInt64.write(value.powerLevel, into: &buf) - FfiConverterInt64.write(value.normalizedPowerLevel, into: &buf) + FfiConverterTypePowerLevel.write(value.powerLevel, into: &buf) + FfiConverterTypePowerLevel.write(value.normalizedPowerLevel, into: &buf) FfiConverterBool.write(value.isIgnored, into: &buf) FfiConverterTypeRoomMemberRole.write(value.suggestedRoleForPowerLevel, into: &buf) FfiConverterOptionString.write(value.membershipChangeReason, into: &buf) @@ -20879,58 +21258,6 @@ public func FfiConverterTypeSessionVerificationRequestDetails_lower(_ value: Ses } -public struct SetData { - public var index: UInt32 - public var item: TimelineItem - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(index: UInt32, item: TimelineItem) { - self.index = index - self.item = item - } -} - -#if compiler(>=6) -extension SetData: Sendable {} -#endif - - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeSetData: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SetData { - return - try SetData( - index: FfiConverterUInt32.read(from: &buf), - item: FfiConverterTypeTimelineItem.read(from: &buf) - ) - } - - public static func write(_ value: SetData, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.index, into: &buf) - FfiConverterTypeTimelineItem.write(value.item, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeSetData_lift(_ buf: RustBuffer) throws -> SetData { - return try FfiConverterTypeSetData.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeSetData_lower(_ value: SetData) -> RustBuffer { - return FfiConverterTypeSetData.lower(value) -} - - /** * A push rule is a single rule that states under what conditions an event * should be passed onto a push gateway and how the notification should be @@ -21052,6 +21379,246 @@ public func FfiConverterTypeSimplePushRule_lower(_ value: SimplePushRule) -> Rus } +/** + * Structure representing a room in a space and aggregated information + * relevant to the UI layer. + */ +public struct SpaceRoom { + /** + * The ID of the room. + */ + public var roomId: String + /** + * The canonical alias of the room, if any. + */ + public var canonicalAlias: String? + /** + * The name of the room, if any. + */ + public var name: String? + /** + * The topic of the room, if any. + */ + public var topic: String? + /** + * The URL for the room's avatar, if one is set. + */ + public var avatarUrl: String? + /** + * The type of room from `m.room.create`, if any. + */ + public var roomType: RoomType + /** + * The number of members joined to the room. + */ + public var numJoinedMembers: UInt64 + /** + * The join rule of the room. + */ + public var joinRule: JoinRule? + /** + * Whether the room may be viewed by users without joining. + */ + public var worldReadable: Bool? + /** + * Whether guest users may join the room and participate in it. + */ + public var guestCanJoin: Bool + /** + * The number of children room this has, if a space. + */ + public var childrenCount: UInt64 + /** + * Whether this room is joined, left etc. + */ + public var state: Membership? + /** + * A list of room members considered to be heroes. + */ + public var heroes: [RoomHero]? + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * The ID of the room. + */roomId: String, + /** + * The canonical alias of the room, if any. + */canonicalAlias: String?, + /** + * The name of the room, if any. + */name: String?, + /** + * The topic of the room, if any. + */topic: String?, + /** + * The URL for the room's avatar, if one is set. + */avatarUrl: String?, + /** + * The type of room from `m.room.create`, if any. + */roomType: RoomType, + /** + * The number of members joined to the room. + */numJoinedMembers: UInt64, + /** + * The join rule of the room. + */joinRule: JoinRule?, + /** + * Whether the room may be viewed by users without joining. + */worldReadable: Bool?, + /** + * Whether guest users may join the room and participate in it. + */guestCanJoin: Bool, + /** + * The number of children room this has, if a space. + */childrenCount: UInt64, + /** + * Whether this room is joined, left etc. + */state: Membership?, + /** + * A list of room members considered to be heroes. + */heroes: [RoomHero]?) { + self.roomId = roomId + self.canonicalAlias = canonicalAlias + self.name = name + self.topic = topic + self.avatarUrl = avatarUrl + self.roomType = roomType + self.numJoinedMembers = numJoinedMembers + self.joinRule = joinRule + self.worldReadable = worldReadable + self.guestCanJoin = guestCanJoin + self.childrenCount = childrenCount + self.state = state + self.heroes = heroes + } +} + +#if compiler(>=6) +extension SpaceRoom: Sendable {} +#endif + + +extension SpaceRoom: Equatable, Hashable { + public static func ==(lhs: SpaceRoom, rhs: SpaceRoom) -> Bool { + if lhs.roomId != rhs.roomId { + return false + } + if lhs.canonicalAlias != rhs.canonicalAlias { + return false + } + if lhs.name != rhs.name { + return false + } + if lhs.topic != rhs.topic { + return false + } + if lhs.avatarUrl != rhs.avatarUrl { + return false + } + if lhs.roomType != rhs.roomType { + return false + } + if lhs.numJoinedMembers != rhs.numJoinedMembers { + return false + } + if lhs.joinRule != rhs.joinRule { + return false + } + if lhs.worldReadable != rhs.worldReadable { + return false + } + if lhs.guestCanJoin != rhs.guestCanJoin { + return false + } + if lhs.childrenCount != rhs.childrenCount { + return false + } + if lhs.state != rhs.state { + return false + } + if lhs.heroes != rhs.heroes { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(roomId) + hasher.combine(canonicalAlias) + hasher.combine(name) + hasher.combine(topic) + hasher.combine(avatarUrl) + hasher.combine(roomType) + hasher.combine(numJoinedMembers) + hasher.combine(joinRule) + hasher.combine(worldReadable) + hasher.combine(guestCanJoin) + hasher.combine(childrenCount) + hasher.combine(state) + hasher.combine(heroes) + } +} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSpaceRoom: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SpaceRoom { + return + try SpaceRoom( + roomId: FfiConverterString.read(from: &buf), + canonicalAlias: FfiConverterOptionString.read(from: &buf), + name: FfiConverterOptionString.read(from: &buf), + topic: FfiConverterOptionString.read(from: &buf), + avatarUrl: FfiConverterOptionString.read(from: &buf), + roomType: FfiConverterTypeRoomType.read(from: &buf), + numJoinedMembers: FfiConverterUInt64.read(from: &buf), + joinRule: FfiConverterOptionTypeJoinRule.read(from: &buf), + worldReadable: FfiConverterOptionBool.read(from: &buf), + guestCanJoin: FfiConverterBool.read(from: &buf), + childrenCount: FfiConverterUInt64.read(from: &buf), + state: FfiConverterOptionTypeMembership.read(from: &buf), + heroes: FfiConverterOptionSequenceTypeRoomHero.read(from: &buf) + ) + } + + public static func write(_ value: SpaceRoom, into buf: inout [UInt8]) { + FfiConverterString.write(value.roomId, into: &buf) + FfiConverterOptionString.write(value.canonicalAlias, into: &buf) + FfiConverterOptionString.write(value.name, into: &buf) + FfiConverterOptionString.write(value.topic, into: &buf) + FfiConverterOptionString.write(value.avatarUrl, into: &buf) + FfiConverterTypeRoomType.write(value.roomType, into: &buf) + FfiConverterUInt64.write(value.numJoinedMembers, into: &buf) + FfiConverterOptionTypeJoinRule.write(value.joinRule, into: &buf) + FfiConverterOptionBool.write(value.worldReadable, into: &buf) + FfiConverterBool.write(value.guestCanJoin, into: &buf) + FfiConverterUInt64.write(value.childrenCount, into: &buf) + FfiConverterOptionTypeMembership.write(value.state, into: &buf) + FfiConverterOptionSequenceTypeRoomHero.write(value.heroes, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoom_lift(_ buf: RustBuffer) throws -> SpaceRoom { + return try FfiConverterTypeSpaceRoom.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoom_lower(_ value: SpaceRoom) -> RustBuffer { + return FfiConverterTypeSpaceRoom.lower(value) +} + + /** * When a room A is tombstoned, it is replaced by a room B. The room A is the * predecessor of B, and B is the successor of A. This type holds information @@ -21284,6 +21851,79 @@ public func FfiConverterTypeTextMessageContent_lower(_ value: TextMessageContent } +/** + * A thread subscription (MSC4306). + */ +public struct ThreadSubscription { + /** + * Whether the thread subscription happened automatically (e.g. after a + * mention) or if it was manually requested by the user. + */ + public var automatic: Bool + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * Whether the thread subscription happened automatically (e.g. after a + * mention) or if it was manually requested by the user. + */automatic: Bool) { + self.automatic = automatic + } +} + +#if compiler(>=6) +extension ThreadSubscription: Sendable {} +#endif + + +extension ThreadSubscription: Equatable, Hashable { + public static func ==(lhs: ThreadSubscription, rhs: ThreadSubscription) -> Bool { + if lhs.automatic != rhs.automatic { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(automatic) + } +} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeThreadSubscription: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ThreadSubscription { + return + try ThreadSubscription( + automatic: FfiConverterBool.read(from: &buf) + ) + } + + public static func write(_ value: ThreadSubscription, into buf: inout [UInt8]) { + FfiConverterBool.write(value.automatic, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeThreadSubscription_lift(_ buf: RustBuffer) throws -> ThreadSubscription { + return try FfiConverterTypeThreadSubscription.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeThreadSubscription_lower(_ value: ThreadSubscription) -> RustBuffer { + return FfiConverterTypeThreadSubscription.lower(value) +} + + public struct ThumbnailInfo { public var height: UInt64? public var width: UInt64? @@ -22187,15 +22827,9 @@ public struct UploadParameters { */ public var mentions: Mentions? /** - * Optional parameters for sending the media as (threaded) reply. + * Optional Event ID to reply to. */ - public var replyParams: ReplyParameters? - /** - * Should the media be sent with the send queue, or synchronously? - * - * Watching progress only works with the synchronous method, at the moment. - */ - public var useSendQueue: Bool + public var inReplyTo: String? // Default memberwise initializers are never public by default, so we // declare one manually. @@ -22213,19 +22847,13 @@ public struct UploadParameters { * Optional intentional mentions to be sent with the media. */mentions: Mentions?, /** - * Optional parameters for sending the media as (threaded) reply. - */replyParams: ReplyParameters?, - /** - * Should the media be sent with the send queue, or synchronously? - * - * Watching progress only works with the synchronous method, at the moment. - */useSendQueue: Bool) { + * Optional Event ID to reply to. + */inReplyTo: String?) { self.source = source self.caption = caption self.formattedCaption = formattedCaption self.mentions = mentions - self.replyParams = replyParams - self.useSendQueue = useSendQueue + self.inReplyTo = inReplyTo } } @@ -22248,10 +22876,7 @@ extension UploadParameters: Equatable, Hashable { if lhs.mentions != rhs.mentions { return false } - if lhs.replyParams != rhs.replyParams { - return false - } - if lhs.useSendQueue != rhs.useSendQueue { + if lhs.inReplyTo != rhs.inReplyTo { return false } return true @@ -22262,8 +22887,7 @@ extension UploadParameters: Equatable, Hashable { hasher.combine(caption) hasher.combine(formattedCaption) hasher.combine(mentions) - hasher.combine(replyParams) - hasher.combine(useSendQueue) + hasher.combine(inReplyTo) } } @@ -22280,8 +22904,7 @@ public struct FfiConverterTypeUploadParameters: FfiConverterRustBuffer { caption: FfiConverterOptionString.read(from: &buf), formattedCaption: FfiConverterOptionTypeFormattedBody.read(from: &buf), mentions: FfiConverterOptionTypeMentions.read(from: &buf), - replyParams: FfiConverterOptionTypeReplyParameters.read(from: &buf), - useSendQueue: FfiConverterBool.read(from: &buf) + inReplyTo: FfiConverterOptionString.read(from: &buf) ) } @@ -22290,8 +22913,7 @@ public struct FfiConverterTypeUploadParameters: FfiConverterRustBuffer { FfiConverterOptionString.write(value.caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(value.formattedCaption, into: &buf) FfiConverterOptionTypeMentions.write(value.mentions, into: &buf) - FfiConverterOptionTypeReplyParameters.write(value.replyParams, into: &buf) - FfiConverterBool.write(value.useSendQueue, into: &buf) + FfiConverterOptionString.write(value.inReplyTo, into: &buf) } } @@ -25786,7 +26408,12 @@ public enum EventSendState { /** * The local event has not been sent yet. */ - case notSentYet + case notSentYet( + /** + * The progress of the sending operation, if the event involves a media + * upload. + */progress: MediaUploadProgress? + ) /** * The local event has been sent to the server, but unsuccessfully: The * sending has failed. @@ -25825,7 +26452,8 @@ public struct FfiConverterTypeEventSendState: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { - case 1: return .notSentYet + case 1: return .notSentYet(progress: try FfiConverterOptionTypeMediaUploadProgress.read(from: &buf) + ) case 2: return .sendingFailed(error: try FfiConverterTypeQueueWedgeError.read(from: &buf), isRecoverable: try FfiConverterBool.read(from: &buf) ) @@ -25841,9 +26469,10 @@ public struct FfiConverterTypeEventSendState: FfiConverterRustBuffer { switch value { - case .notSentYet: + case let .notSentYet(progress): writeInt(&buf, Int32(1)) - + FfiConverterOptionTypeMediaUploadProgress.write(progress, into: &buf) + case let .sendingFailed(error,isRecoverable): writeInt(&buf, Int32(2)) @@ -26061,13 +26690,13 @@ extension FocusEventError: Foundation.LocalizedError { public enum GalleryItemInfo { - case audio(audioInfo: AudioInfo, filename: String, caption: String?, formattedCaption: FormattedBody? + case audio(audioInfo: AudioInfo, source: UploadSource, caption: String?, formattedCaption: FormattedBody? ) - case file(fileInfo: FileInfo, filename: String, caption: String?, formattedCaption: FormattedBody? + case file(fileInfo: FileInfo, source: UploadSource, caption: String?, formattedCaption: FormattedBody? ) - case image(imageInfo: ImageInfo, filename: String, caption: String?, formattedCaption: FormattedBody?, thumbnailPath: String? + case image(imageInfo: ImageInfo, source: UploadSource, caption: String?, formattedCaption: FormattedBody?, thumbnailSource: UploadSource? ) - case video(videoInfo: VideoInfo, filename: String, caption: String?, formattedCaption: FormattedBody?, thumbnailPath: String? + case video(videoInfo: VideoInfo, source: UploadSource, caption: String?, formattedCaption: FormattedBody?, thumbnailSource: UploadSource? ) } @@ -26086,16 +26715,16 @@ public struct FfiConverterTypeGalleryItemInfo: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { - case 1: return .audio(audioInfo: try FfiConverterTypeAudioInfo.read(from: &buf), filename: try FfiConverterString.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf) + case 1: return .audio(audioInfo: try FfiConverterTypeAudioInfo.read(from: &buf), source: try FfiConverterTypeUploadSource.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf) ) - case 2: return .file(fileInfo: try FfiConverterTypeFileInfo.read(from: &buf), filename: try FfiConverterString.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf) + case 2: return .file(fileInfo: try FfiConverterTypeFileInfo.read(from: &buf), source: try FfiConverterTypeUploadSource.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf) ) - case 3: return .image(imageInfo: try FfiConverterTypeImageInfo.read(from: &buf), filename: try FfiConverterString.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf), thumbnailPath: try FfiConverterOptionString.read(from: &buf) + case 3: return .image(imageInfo: try FfiConverterTypeImageInfo.read(from: &buf), source: try FfiConverterTypeUploadSource.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf), thumbnailSource: try FfiConverterOptionTypeUploadSource.read(from: &buf) ) - case 4: return .video(videoInfo: try FfiConverterTypeVideoInfo.read(from: &buf), filename: try FfiConverterString.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf), thumbnailPath: try FfiConverterOptionString.read(from: &buf) + case 4: return .video(videoInfo: try FfiConverterTypeVideoInfo.read(from: &buf), source: try FfiConverterTypeUploadSource.read(from: &buf), caption: try FfiConverterOptionString.read(from: &buf), formattedCaption: try FfiConverterOptionTypeFormattedBody.read(from: &buf), thumbnailSource: try FfiConverterOptionTypeUploadSource.read(from: &buf) ) default: throw UniffiInternalError.unexpectedEnumCase @@ -26106,38 +26735,38 @@ public struct FfiConverterTypeGalleryItemInfo: FfiConverterRustBuffer { switch value { - case let .audio(audioInfo,filename,caption,formattedCaption): + case let .audio(audioInfo,source,caption,formattedCaption): writeInt(&buf, Int32(1)) FfiConverterTypeAudioInfo.write(audioInfo, into: &buf) - FfiConverterString.write(filename, into: &buf) + FfiConverterTypeUploadSource.write(source, into: &buf) FfiConverterOptionString.write(caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(formattedCaption, into: &buf) - case let .file(fileInfo,filename,caption,formattedCaption): + case let .file(fileInfo,source,caption,formattedCaption): writeInt(&buf, Int32(2)) FfiConverterTypeFileInfo.write(fileInfo, into: &buf) - FfiConverterString.write(filename, into: &buf) + FfiConverterTypeUploadSource.write(source, into: &buf) FfiConverterOptionString.write(caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(formattedCaption, into: &buf) - case let .image(imageInfo,filename,caption,formattedCaption,thumbnailPath): + case let .image(imageInfo,source,caption,formattedCaption,thumbnailSource): writeInt(&buf, Int32(3)) FfiConverterTypeImageInfo.write(imageInfo, into: &buf) - FfiConverterString.write(filename, into: &buf) + FfiConverterTypeUploadSource.write(source, into: &buf) FfiConverterOptionString.write(caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(formattedCaption, into: &buf) - FfiConverterOptionString.write(thumbnailPath, into: &buf) + FfiConverterOptionTypeUploadSource.write(thumbnailSource, into: &buf) - case let .video(videoInfo,filename,caption,formattedCaption,thumbnailPath): + case let .video(videoInfo,source,caption,formattedCaption,thumbnailSource): writeInt(&buf, Int32(4)) FfiConverterTypeVideoInfo.write(videoInfo, into: &buf) - FfiConverterString.write(filename, into: &buf) + FfiConverterTypeUploadSource.write(source, into: &buf) FfiConverterOptionString.write(caption, into: &buf) FfiConverterOptionTypeFormattedBody.write(formattedCaption, into: &buf) - FfiConverterOptionString.write(thumbnailPath, into: &buf) + FfiConverterOptionTypeUploadSource.write(thumbnailSource, into: &buf) } } @@ -26788,6 +27417,95 @@ extension KeyDerivationAlgorithm: Equatable, Hashable {} +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. +/** + * Mimic the [`UiLatestEventValue`] type. + */ + +public enum LatestEventValue { + + case none + case remote(timestamp: Timestamp, sender: String, isOwn: Bool, profile: ProfileDetails, content: TimelineItemContent + ) + case local(timestamp: Timestamp, content: TimelineItemContent, isSending: Bool + ) +} + + +#if compiler(>=6) +extension LatestEventValue: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeLatestEventValue: FfiConverterRustBuffer { + typealias SwiftType = LatestEventValue + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LatestEventValue { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .none + + case 2: return .remote(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), isOwn: try FfiConverterBool.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf) + ) + + case 3: return .local(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf), isSending: try FfiConverterBool.read(from: &buf) + ) + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: LatestEventValue, into buf: inout [UInt8]) { + switch value { + + + case .none: + writeInt(&buf, Int32(1)) + + + case let .remote(timestamp,sender,isOwn,profile,content): + writeInt(&buf, Int32(2)) + FfiConverterTypeTimestamp.write(timestamp, into: &buf) + FfiConverterString.write(sender, into: &buf) + FfiConverterBool.write(isOwn, into: &buf) + FfiConverterTypeProfileDetails.write(profile, into: &buf) + FfiConverterTypeTimelineItemContent.write(content, into: &buf) + + + case let .local(timestamp,content,isSending): + writeInt(&buf, Int32(3)) + FfiConverterTypeTimestamp.write(timestamp, into: &buf) + FfiConverterTypeTimelineItemContent.write(content, into: &buf) + FfiConverterBool.write(isSending, into: &buf) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeLatestEventValue_lift(_ buf: RustBuffer) throws -> LatestEventValue { + return try FfiConverterTypeLatestEventValue.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeLatestEventValue_lower(_ value: LatestEventValue) -> RustBuffer { + return FfiConverterTypeLatestEventValue.lower(value) +} + + + + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -29426,6 +30144,87 @@ extension PollKind: 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 PowerLevel { + + /** + * The user is a room creator and has infinite power level. + * + * This power level was introduced in room version 12. + */ + case infinite + /** + * The user has the given power level. + */ + case value(value: Int64 + ) +} + + +#if compiler(>=6) +extension PowerLevel: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypePowerLevel: FfiConverterRustBuffer { + typealias SwiftType = PowerLevel + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PowerLevel { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .infinite + + case 2: return .value(value: try FfiConverterInt64.read(from: &buf) + ) + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: PowerLevel, into buf: inout [UInt8]) { + switch value { + + + case .infinite: + writeInt(&buf, Int32(1)) + + + case let .value(value): + writeInt(&buf, Int32(2)) + FfiConverterInt64.write(value, into: &buf) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypePowerLevel_lift(_ buf: RustBuffer) throws -> PowerLevel { + return try FfiConverterTypePowerLevel.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypePowerLevel_lower(_ value: PowerLevel) -> RustBuffer { + return FfiConverterTypePowerLevel.lower(value) +} + + +extension PowerLevel: Equatable, Hashable {} + + + + + + // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -29525,6 +30324,9 @@ public enum PublicRoomJoinRule { case `public` case knock + case restricted + case knockRestricted + case invite } @@ -29546,6 +30348,12 @@ public struct FfiConverterTypePublicRoomJoinRule: FfiConverterRustBuffer { case 2: return .knock + case 3: return .restricted + + case 4: return .knockRestricted + + case 5: return .invite + default: throw UniffiInternalError.unexpectedEnumCase } } @@ -29561,6 +30369,18 @@ public struct FfiConverterTypePublicRoomJoinRule: FfiConverterRustBuffer { case .knock: writeInt(&buf, Int32(2)) + + case .restricted: + writeInt(&buf, Int32(3)) + + + case .knockRestricted: + writeInt(&buf, Int32(4)) + + + case .invite: + writeInt(&buf, Int32(5)) + } } } @@ -31136,10 +31956,13 @@ public enum RoomListEntriesDynamicFilterKind { ) case any(filters: [RoomListEntriesDynamicFilterKind] ) + case nonSpace case nonLeft case joined case unread case favourite + case lowPriority + case nonLowPriority case invite case category(expect: RoomListFilterCategory ) @@ -31172,28 +31995,34 @@ public struct FfiConverterTypeRoomListEntriesDynamicFilterKind: FfiConverterRust case 2: return .any(filters: try FfiConverterSequenceTypeRoomListEntriesDynamicFilterKind.read(from: &buf) ) - case 3: return .nonLeft + case 3: return .nonSpace + + case 4: return .nonLeft - case 4: return .joined + case 5: return .joined - case 5: return .unread + case 6: return .unread - case 6: return .favourite + case 7: return .favourite - case 7: return .invite + case 8: return .lowPriority - case 8: return .category(expect: try FfiConverterTypeRoomListFilterCategory.read(from: &buf) + case 9: return .nonLowPriority + + case 10: return .invite + + case 11: return .category(expect: try FfiConverterTypeRoomListFilterCategory.read(from: &buf) ) - case 9: return .none + case 12: return .none - case 10: return .normalizedMatchRoomName(pattern: try FfiConverterString.read(from: &buf) + case 13: return .normalizedMatchRoomName(pattern: try FfiConverterString.read(from: &buf) ) - case 11: return .fuzzyMatchRoomName(pattern: try FfiConverterString.read(from: &buf) + case 14: return .fuzzyMatchRoomName(pattern: try FfiConverterString.read(from: &buf) ) - case 12: return .deduplicateVersions + case 15: return .deduplicateVersions default: throw UniffiInternalError.unexpectedEnumCase } @@ -31213,47 +32042,59 @@ public struct FfiConverterTypeRoomListEntriesDynamicFilterKind: FfiConverterRust FfiConverterSequenceTypeRoomListEntriesDynamicFilterKind.write(filters, into: &buf) - case .nonLeft: + case .nonSpace: writeInt(&buf, Int32(3)) - case .joined: + case .nonLeft: writeInt(&buf, Int32(4)) - case .unread: + case .joined: writeInt(&buf, Int32(5)) - case .favourite: + case .unread: writeInt(&buf, Int32(6)) - case .invite: + case .favourite: writeInt(&buf, Int32(7)) - case let .category(expect): + case .lowPriority: writeInt(&buf, Int32(8)) + + + case .nonLowPriority: + writeInt(&buf, Int32(9)) + + + case .invite: + writeInt(&buf, Int32(10)) + + + case let .category(expect): + writeInt(&buf, Int32(11)) FfiConverterTypeRoomListFilterCategory.write(expect, into: &buf) case .none: - writeInt(&buf, Int32(9)) + writeInt(&buf, Int32(12)) case let .normalizedMatchRoomName(pattern): - writeInt(&buf, Int32(10)) + writeInt(&buf, Int32(13)) FfiConverterString.write(pattern, into: &buf) case let .fuzzyMatchRoomName(pattern): - writeInt(&buf, Int32(11)) + writeInt(&buf, Int32(14)) FfiConverterString.write(pattern, into: &buf) case .deduplicateVersions: - writeInt(&buf, Int32(12)) + writeInt(&buf, Int32(15)) } } @@ -33048,6 +33889,165 @@ extension SlidingSyncVersionBuilder: 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 SpaceListUpdate { + + case append(values: [SpaceRoom] + ) + case clear + case pushFront(value: SpaceRoom + ) + case pushBack(value: SpaceRoom + ) + case popFront + case popBack + case insert(index: UInt32, value: SpaceRoom + ) + case set(index: UInt32, value: SpaceRoom + ) + case remove(index: UInt32 + ) + case truncate(length: UInt32 + ) + case reset(values: [SpaceRoom] + ) +} + + +#if compiler(>=6) +extension SpaceListUpdate: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSpaceListUpdate: FfiConverterRustBuffer { + typealias SwiftType = SpaceListUpdate + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SpaceListUpdate { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .append(values: try FfiConverterSequenceTypeSpaceRoom.read(from: &buf) + ) + + case 2: return .clear + + case 3: return .pushFront(value: try FfiConverterTypeSpaceRoom.read(from: &buf) + ) + + case 4: return .pushBack(value: try FfiConverterTypeSpaceRoom.read(from: &buf) + ) + + case 5: return .popFront + + case 6: return .popBack + + case 7: return .insert(index: try FfiConverterUInt32.read(from: &buf), value: try FfiConverterTypeSpaceRoom.read(from: &buf) + ) + + case 8: return .set(index: try FfiConverterUInt32.read(from: &buf), value: try FfiConverterTypeSpaceRoom.read(from: &buf) + ) + + case 9: return .remove(index: try FfiConverterUInt32.read(from: &buf) + ) + + case 10: return .truncate(length: try FfiConverterUInt32.read(from: &buf) + ) + + case 11: return .reset(values: try FfiConverterSequenceTypeSpaceRoom.read(from: &buf) + ) + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: SpaceListUpdate, into buf: inout [UInt8]) { + switch value { + + + case let .append(values): + writeInt(&buf, Int32(1)) + FfiConverterSequenceTypeSpaceRoom.write(values, into: &buf) + + + case .clear: + writeInt(&buf, Int32(2)) + + + case let .pushFront(value): + writeInt(&buf, Int32(3)) + FfiConverterTypeSpaceRoom.write(value, into: &buf) + + + case let .pushBack(value): + writeInt(&buf, Int32(4)) + FfiConverterTypeSpaceRoom.write(value, into: &buf) + + + case .popFront: + writeInt(&buf, Int32(5)) + + + case .popBack: + writeInt(&buf, Int32(6)) + + + case let .insert(index,value): + writeInt(&buf, Int32(7)) + FfiConverterUInt32.write(index, into: &buf) + FfiConverterTypeSpaceRoom.write(value, into: &buf) + + + case let .set(index,value): + writeInt(&buf, Int32(8)) + FfiConverterUInt32.write(index, into: &buf) + FfiConverterTypeSpaceRoom.write(value, into: &buf) + + + case let .remove(index): + writeInt(&buf, Int32(9)) + FfiConverterUInt32.write(index, into: &buf) + + + case let .truncate(length): + writeInt(&buf, Int32(10)) + FfiConverterUInt32.write(length, into: &buf) + + + case let .reset(values): + writeInt(&buf, Int32(11)) + FfiConverterSequenceTypeSpaceRoom.write(values, into: &buf) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceListUpdate_lift(_ buf: RustBuffer) throws -> SpaceListUpdate { + return try FfiConverterTypeSpaceListUpdate.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceListUpdate_lower(_ value: SpaceListUpdate) -> RustBuffer { + return FfiConverterTypeSpaceListUpdate.lower(value) +} + + +extension SpaceListUpdate: Equatable, Hashable {} + + + + + + public enum SsoError: Swift.Error { @@ -33849,109 +34849,135 @@ extension TagName: 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 TimelineChange { +public enum TimelineDiff { - case append + case append(values: [TimelineItem] + ) case clear - case insert - case set - case remove - case pushBack - case pushFront - case popBack + case pushFront(value: TimelineItem + ) + case pushBack(value: TimelineItem + ) case popFront - case truncate - case reset + case popBack + case insert(index: UInt32, value: TimelineItem + ) + case set(index: UInt32, value: TimelineItem + ) + case remove(index: UInt32 + ) + case truncate(length: UInt32 + ) + case reset(values: [TimelineItem] + ) } #if compiler(>=6) -extension TimelineChange: Sendable {} +extension TimelineDiff: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTimelineChange: FfiConverterRustBuffer { - typealias SwiftType = TimelineChange +public struct FfiConverterTypeTimelineDiff: FfiConverterRustBuffer { + typealias SwiftType = TimelineDiff - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineChange { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineDiff { let variant: Int32 = try readInt(&buf) switch variant { - case 1: return .append + case 1: return .append(values: try FfiConverterSequenceTypeTimelineItem.read(from: &buf) + ) case 2: return .clear - case 3: return .insert + case 3: return .pushFront(value: try FfiConverterTypeTimelineItem.read(from: &buf) + ) - case 4: return .set + case 4: return .pushBack(value: try FfiConverterTypeTimelineItem.read(from: &buf) + ) - case 5: return .remove + case 5: return .popFront - case 6: return .pushBack + case 6: return .popBack - case 7: return .pushFront + case 7: return .insert(index: try FfiConverterUInt32.read(from: &buf), value: try FfiConverterTypeTimelineItem.read(from: &buf) + ) - case 8: return .popBack + case 8: return .set(index: try FfiConverterUInt32.read(from: &buf), value: try FfiConverterTypeTimelineItem.read(from: &buf) + ) - case 9: return .popFront + case 9: return .remove(index: try FfiConverterUInt32.read(from: &buf) + ) - case 10: return .truncate + case 10: return .truncate(length: try FfiConverterUInt32.read(from: &buf) + ) - case 11: return .reset + case 11: return .reset(values: try FfiConverterSequenceTypeTimelineItem.read(from: &buf) + ) default: throw UniffiInternalError.unexpectedEnumCase } } - public static func write(_ value: TimelineChange, into buf: inout [UInt8]) { + public static func write(_ value: TimelineDiff, into buf: inout [UInt8]) { switch value { - case .append: + case let .append(values): writeInt(&buf, Int32(1)) - + FfiConverterSequenceTypeTimelineItem.write(values, into: &buf) + case .clear: writeInt(&buf, Int32(2)) - case .insert: + case let .pushFront(value): writeInt(&buf, Int32(3)) + FfiConverterTypeTimelineItem.write(value, into: &buf) + - - case .set: + case let .pushBack(value): writeInt(&buf, Int32(4)) + FfiConverterTypeTimelineItem.write(value, into: &buf) + - - case .remove: + case .popFront: writeInt(&buf, Int32(5)) - case .pushBack: + case .popBack: writeInt(&buf, Int32(6)) - case .pushFront: + case let .insert(index,value): writeInt(&buf, Int32(7)) + FfiConverterUInt32.write(index, into: &buf) + FfiConverterTypeTimelineItem.write(value, into: &buf) + - - case .popBack: + case let .set(index,value): writeInt(&buf, Int32(8)) + FfiConverterUInt32.write(index, into: &buf) + FfiConverterTypeTimelineItem.write(value, into: &buf) + - - case .popFront: + case let .remove(index): writeInt(&buf, Int32(9)) + FfiConverterUInt32.write(index, into: &buf) + - - case .truncate: + case let .truncate(length): writeInt(&buf, Int32(10)) + FfiConverterUInt32.write(length, into: &buf) + - - case .reset: + case let .reset(values): writeInt(&buf, Int32(11)) - + FfiConverterSequenceTypeTimelineItem.write(values, into: &buf) + } } } @@ -33960,21 +34986,18 @@ public struct FfiConverterTypeTimelineChange: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineChange_lift(_ buf: RustBuffer) throws -> TimelineChange { - return try FfiConverterTypeTimelineChange.lift(buf) +public func FfiConverterTypeTimelineDiff_lift(_ buf: RustBuffer) throws -> TimelineDiff { + return try FfiConverterTypeTimelineDiff.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineChange_lower(_ value: TimelineChange) -> RustBuffer { - return FfiConverterTypeTimelineChange.lower(value) +public func FfiConverterTypeTimelineDiff_lower(_ value: TimelineDiff) -> RustBuffer { + return FfiConverterTypeTimelineDiff.lower(value) } -extension TimelineChange: Equatable, Hashable {} - - @@ -34422,6 +35445,10 @@ public enum TraceLogPacks { * Enables all the logs relevant to the notification client. */ case notificationClient + /** + * Enables all the logs relevant to sync profiling. + */ + case syncProfiling } @@ -34447,6 +35474,8 @@ public struct FfiConverterTypeTraceLogPacks: FfiConverterRustBuffer { case 4: return .notificationClient + case 5: return .syncProfiling + default: throw UniffiInternalError.unexpectedEnumCase } } @@ -34470,6 +35499,10 @@ public struct FfiConverterTypeTraceLogPacks: FfiConverterRustBuffer { case .notificationClient: writeInt(&buf, Int32(4)) + + case .syncProfiling: + writeInt(&buf, Int32(5)) + } } } @@ -38107,6 +39140,354 @@ public func FfiConverterCallbackInterfaceSessionVerificationControllerDelegate_l +public protocol SpaceRoomListEntriesListener: AnyObject, Sendable { + + func onUpdate(rooms: [SpaceListUpdate]) + +} + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceSpaceRoomListEntriesListener { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + // + // This creates 1-element array, since this seems to be the only way to construct a const + // pointer that we can pass to the Rust code. + static let vtable: [UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener] = [UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener( + onUpdate: { ( + uniffiHandle: UInt64, + rooms: RustBuffer, + uniffiOutReturn: UnsafeMutableRawPointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> () in + guard let uniffiObj = try? FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.onUpdate( + rooms: try FfiConverterSequenceTypeSpaceListUpdate.lift(rooms) + ) + } + + + let writeReturn = { () } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + }, + uniffiFree: { (uniffiHandle: UInt64) -> () in + let result = try? FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.handleMap.remove(handle: uniffiHandle) + if result == nil { + print("Uniffi callback interface SpaceRoomListEntriesListener: handle missing in uniffiFree") + } + } + )] +} + +private func uniffiCallbackInitSpaceRoomListEntriesListener() { + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener(UniffiCallbackInterfaceSpaceRoomListEntriesListener.vtable) +} + +// FfiConverter protocol for callback interfaces +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterCallbackInterfaceSpaceRoomListEntriesListener { + fileprivate static let handleMap = UniffiHandleMap() +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +extension FfiConverterCallbackInterfaceSpaceRoomListEntriesListener : FfiConverter { + typealias SwiftType = SpaceRoomListEntriesListener + typealias FfiType = UInt64 + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lift(_ handle: UInt64) throws -> SwiftType { + try handleMap.get(handle: handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lower(_ v: SwiftType) -> UInt64 { + return handleMap.insert(obj: v) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func write(_ v: SwiftType, into buf: inout [UInt8]) { + writeInt(&buf, lower(v)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceRoomListEntriesListener_lift(_ handle: UInt64) throws -> SpaceRoomListEntriesListener { + return try FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceRoomListEntriesListener_lower(_ v: SpaceRoomListEntriesListener) -> UInt64 { + return FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.lower(v) +} + + + + +public protocol SpaceRoomListPaginationStateListener: AnyObject, Sendable { + + func onUpdate(paginationState: SpaceRoomListPaginationState) + +} + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceSpaceRoomListPaginationStateListener { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + // + // This creates 1-element array, since this seems to be the only way to construct a const + // pointer that we can pass to the Rust code. + static let vtable: [UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener] = [UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener( + onUpdate: { ( + uniffiHandle: UInt64, + paginationState: RustBuffer, + uniffiOutReturn: UnsafeMutableRawPointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> () in + guard let uniffiObj = try? FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.onUpdate( + paginationState: try FfiConverterTypeSpaceRoomListPaginationState_lift(paginationState) + ) + } + + + let writeReturn = { () } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + }, + uniffiFree: { (uniffiHandle: UInt64) -> () in + let result = try? FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.handleMap.remove(handle: uniffiHandle) + if result == nil { + print("Uniffi callback interface SpaceRoomListPaginationStateListener: handle missing in uniffiFree") + } + } + )] +} + +private func uniffiCallbackInitSpaceRoomListPaginationStateListener() { + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(UniffiCallbackInterfaceSpaceRoomListPaginationStateListener.vtable) +} + +// FfiConverter protocol for callback interfaces +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener { + fileprivate static let handleMap = UniffiHandleMap() +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +extension FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener : FfiConverter { + typealias SwiftType = SpaceRoomListPaginationStateListener + typealias FfiType = UInt64 + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lift(_ handle: UInt64) throws -> SwiftType { + try handleMap.get(handle: handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lower(_ v: SwiftType) -> UInt64 { + return handleMap.insert(obj: v) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func write(_ v: SwiftType, into buf: inout [UInt8]) { + writeInt(&buf, lower(v)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener_lift(_ handle: UInt64) throws -> SpaceRoomListPaginationStateListener { + return try FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener_lower(_ v: SpaceRoomListPaginationStateListener) -> UInt64 { + return FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.lower(v) +} + + + + +public protocol SpaceServiceJoinedSpacesListener: AnyObject, Sendable { + + func onUpdate(roomUpdates: [SpaceListUpdate]) + +} + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceSpaceServiceJoinedSpacesListener { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + // + // This creates 1-element array, since this seems to be the only way to construct a const + // pointer that we can pass to the Rust code. + static let vtable: [UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener] = [UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener( + onUpdate: { ( + uniffiHandle: UInt64, + roomUpdates: RustBuffer, + uniffiOutReturn: UnsafeMutableRawPointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> () in + guard let uniffiObj = try? FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.onUpdate( + roomUpdates: try FfiConverterSequenceTypeSpaceListUpdate.lift(roomUpdates) + ) + } + + + let writeReturn = { () } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + }, + uniffiFree: { (uniffiHandle: UInt64) -> () in + let result = try? FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.handleMap.remove(handle: uniffiHandle) + if result == nil { + print("Uniffi callback interface SpaceServiceJoinedSpacesListener: handle missing in uniffiFree") + } + } + )] +} + +private func uniffiCallbackInitSpaceServiceJoinedSpacesListener() { + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(UniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.vtable) +} + +// FfiConverter protocol for callback interfaces +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener { + fileprivate static let handleMap = UniffiHandleMap() +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +extension FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener : FfiConverter { + typealias SwiftType = SpaceServiceJoinedSpacesListener + typealias FfiType = UInt64 + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lift(_ handle: UInt64) throws -> SwiftType { + try handleMap.get(handle: handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func lower(_ v: SwiftType) -> UInt64 { + return handleMap.insert(obj: v) + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public static func write(_ v: SwiftType, into buf: inout [UInt8]) { + writeInt(&buf, lower(v)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener_lift(_ handle: UInt64) throws -> SpaceServiceJoinedSpacesListener { + return try FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener_lower(_ v: SpaceServiceJoinedSpacesListener) -> UInt64 { + return FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.lower(v) +} + + + + public protocol SyncServiceStateObserver: AnyObject, Sendable { func onUpdate(state: SyncServiceState) @@ -39256,30 +40637,6 @@ fileprivate struct FfiConverterOptionTypeThreadSummary: FfiConverterRustBuffer { } } -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -fileprivate struct FfiConverterOptionTypeTimelineItem: FfiConverterRustBuffer { - typealias SwiftType = TimelineItem? - - public static func write(_ value: SwiftType, into buf: inout [UInt8]) { - guard let value = value else { - writeInt(&buf, Int8(0)) - return - } - writeInt(&buf, Int8(1)) - FfiConverterTypeTimelineItem.write(value, into: &buf) - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { - switch try readInt(&buf) as Int8 { - case 0: return nil - case 1: return try FfiConverterTypeTimelineItem.read(from: &buf) - default: throw UniffiInternalError.unexpectedOptionalTag - } - } -} - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -39451,8 +40808,8 @@ fileprivate struct FfiConverterOptionTypeImageInfo: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeInsertData: FfiConverterRustBuffer { - typealias SwiftType = InsertData? +fileprivate struct FfiConverterOptionTypeMatrixEntity: FfiConverterRustBuffer { + typealias SwiftType = MatrixEntity? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -39460,13 +40817,13 @@ fileprivate struct FfiConverterOptionTypeInsertData: FfiConverterRustBuffer { return } writeInt(&buf, Int8(1)) - FfiConverterTypeInsertData.write(value, into: &buf) + FfiConverterTypeMatrixEntity.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeInsertData.read(from: &buf) + case 1: return try FfiConverterTypeMatrixEntity.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -39475,8 +40832,8 @@ fileprivate struct FfiConverterOptionTypeInsertData: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMatrixEntity: FfiConverterRustBuffer { - typealias SwiftType = MatrixEntity? +fileprivate struct FfiConverterOptionTypeMediaPreviewConfig: FfiConverterRustBuffer { + typealias SwiftType = MediaPreviewConfig? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -39484,13 +40841,13 @@ fileprivate struct FfiConverterOptionTypeMatrixEntity: FfiConverterRustBuffer { return } writeInt(&buf, Int8(1)) - FfiConverterTypeMatrixEntity.write(value, into: &buf) + FfiConverterTypeMediaPreviewConfig.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMatrixEntity.read(from: &buf) + case 1: return try FfiConverterTypeMediaPreviewConfig.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -39499,8 +40856,8 @@ fileprivate struct FfiConverterOptionTypeMatrixEntity: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMediaPreviewConfig: FfiConverterRustBuffer { - typealias SwiftType = MediaPreviewConfig? +fileprivate struct FfiConverterOptionTypeMediaUploadProgress: FfiConverterRustBuffer { + typealias SwiftType = MediaUploadProgress? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -39508,13 +40865,13 @@ fileprivate struct FfiConverterOptionTypeMediaPreviewConfig: FfiConverterRustBuf return } writeInt(&buf, Int8(1)) - FfiConverterTypeMediaPreviewConfig.write(value, into: &buf) + FfiConverterTypeMediaUploadProgress.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMediaPreviewConfig.read(from: &buf) + case 1: return try FfiConverterTypeMediaUploadProgress.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -39640,30 +40997,6 @@ fileprivate struct FfiConverterOptionTypePredecessorRoom: FfiConverterRustBuffer } } -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -fileprivate struct FfiConverterOptionTypeReplyParameters: FfiConverterRustBuffer { - typealias SwiftType = ReplyParameters? - - public static func write(_ value: SwiftType, into buf: inout [UInt8]) { - guard let value = value else { - writeInt(&buf, Int8(0)) - return - } - writeInt(&buf, Int8(1)) - FfiConverterTypeReplyParameters.write(value, into: &buf) - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { - switch try readInt(&buf) as Int8 { - case 0: return nil - case 1: return try FfiConverterTypeReplyParameters.read(from: &buf) - default: throw UniffiInternalError.unexpectedOptionalTag - } - } -} - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -39739,8 +41072,8 @@ fileprivate struct FfiConverterOptionTypeRoomMemberWithSenderInfo: FfiConverterR #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeSetData: FfiConverterRustBuffer { - typealias SwiftType = SetData? +fileprivate struct FfiConverterOptionTypeSuccessorRoom: FfiConverterRustBuffer { + typealias SwiftType = SuccessorRoom? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -39748,13 +41081,13 @@ fileprivate struct FfiConverterOptionTypeSetData: FfiConverterRustBuffer { return } writeInt(&buf, Int8(1)) - FfiConverterTypeSetData.write(value, into: &buf) + FfiConverterTypeSuccessorRoom.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeSetData.read(from: &buf) + case 1: return try FfiConverterTypeSuccessorRoom.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -39763,8 +41096,8 @@ fileprivate struct FfiConverterOptionTypeSetData: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeSuccessorRoom: FfiConverterRustBuffer { - typealias SwiftType = SuccessorRoom? +fileprivate struct FfiConverterOptionTypeThreadSubscription: FfiConverterRustBuffer { + typealias SwiftType = ThreadSubscription? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -39772,13 +41105,13 @@ fileprivate struct FfiConverterOptionTypeSuccessorRoom: FfiConverterRustBuffer { return } writeInt(&buf, Int8(1)) - FfiConverterTypeSuccessorRoom.write(value, into: &buf) + FfiConverterTypeThreadSubscription.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeSuccessorRoom.read(from: &buf) + case 1: return try FfiConverterTypeThreadSubscription.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -40264,6 +41597,30 @@ fileprivate struct FfiConverterOptionTypeShieldState: FfiConverterRustBuffer { } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterOptionTypeUploadSource: FfiConverterRustBuffer { + typealias SwiftType = UploadSource? + + public static func write(_ value: SwiftType, into buf: inout [UInt8]) { + guard let value = value else { + writeInt(&buf, Int8(0)) + return + } + writeInt(&buf, Int8(1)) + FfiConverterTypeUploadSource.write(value, into: &buf) + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + switch try readInt(&buf) as Int8 { + case 0: return nil + case 1: return try FfiConverterTypeUploadSource.read(from: &buf) + default: throw UniffiInternalError.unexpectedOptionalTag + } + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -40456,30 +41813,6 @@ fileprivate struct FfiConverterOptionSequenceString: FfiConverterRustBuffer { } } -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -fileprivate struct FfiConverterOptionSequenceTypeTimelineItem: FfiConverterRustBuffer { - typealias SwiftType = [TimelineItem]? - - public static func write(_ value: SwiftType, into buf: inout [UInt8]) { - guard let value = value else { - writeInt(&buf, Int8(0)) - return - } - writeInt(&buf, Int8(1)) - FfiConverterSequenceTypeTimelineItem.write(value, into: &buf) - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { - switch try readInt(&buf) as Int8 { - case 0: return nil - case 1: return try FfiConverterSequenceTypeTimelineItem.read(from: &buf) - default: throw UniffiInternalError.unexpectedOptionalTag - } - } -} - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -40701,31 +42034,6 @@ fileprivate struct FfiConverterSequenceTypeSessionVerificationEmoji: FfiConverte } } -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -fileprivate struct FfiConverterSequenceTypeTimelineDiff: FfiConverterRustBuffer { - typealias SwiftType = [TimelineDiff] - - public static func write(_ value: [TimelineDiff], into buf: inout [UInt8]) { - let len = Int32(value.count) - writeInt(&buf, len) - for item in value { - FfiConverterTypeTimelineDiff.write(item, into: &buf) - } - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [TimelineDiff] { - let len: Int32 = try readInt(&buf) - var seq = [TimelineDiff]() - seq.reserveCapacity(Int(len)) - for _ in 0 ..< len { - seq.append(try FfiConverterTypeTimelineDiff.read(from: &buf)) - } - return seq - } -} - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -41076,6 +42384,31 @@ fileprivate struct FfiConverterSequenceTypeSimplePushRule: FfiConverterRustBuffe } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterSequenceTypeSpaceRoom: FfiConverterRustBuffer { + typealias SwiftType = [SpaceRoom] + + public static func write(_ value: [SpaceRoom], into buf: inout [UInt8]) { + let len = Int32(value.count) + writeInt(&buf, len) + for item in value { + FfiConverterTypeSpaceRoom.write(item, into: &buf) + } + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [SpaceRoom] { + let len: Int32 = try readInt(&buf) + var seq = [SpaceRoom]() + seq.reserveCapacity(Int(len)) + for _ in 0 ..< len { + seq.append(try FfiConverterTypeSpaceRoom.read(from: &buf)) + } + return seq + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -41451,6 +42784,56 @@ fileprivate struct FfiConverterSequenceTypeSlidingSyncVersion: FfiConverterRustB } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterSequenceTypeSpaceListUpdate: FfiConverterRustBuffer { + typealias SwiftType = [SpaceListUpdate] + + public static func write(_ value: [SpaceListUpdate], into buf: inout [UInt8]) { + let len = Int32(value.count) + writeInt(&buf, len) + for item in value { + FfiConverterTypeSpaceListUpdate.write(item, into: &buf) + } + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [SpaceListUpdate] { + let len: Int32 = try readInt(&buf) + var seq = [SpaceListUpdate]() + seq.reserveCapacity(Int(len)) + for _ in 0 ..< len { + seq.append(try FfiConverterTypeSpaceListUpdate.read(from: &buf)) + } + return seq + } +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterSequenceTypeTimelineDiff: FfiConverterRustBuffer { + typealias SwiftType = [TimelineDiff] + + public static func write(_ value: [TimelineDiff], into buf: inout [UInt8]) { + let len = Int32(value.count) + writeInt(&buf, len) + for item in value { + FfiConverterTypeTimelineDiff.write(item, into: &buf) + } + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [TimelineDiff] { + let len: Int32 = try readInt(&buf) + var seq = [TimelineDiff]() + seq.reserveCapacity(Int(len)) + for _ in 0 ..< len { + seq.append(try FfiConverterTypeTimelineDiff.read(from: &buf)) + } + return seq + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -42055,17 +43438,28 @@ public func sdkGitSha() -> String { ) }) } -public func suggestedPowerLevelForRole(role: RoomMemberRole) -> Int64 { - return try! FfiConverterInt64.lift(try! rustCall() { +/** + * Get the suggested power level for the given role. + * + * Returns an error if the value of the power level is unsupported. + */ +public func suggestedPowerLevelForRole(role: RoomMemberRole)throws -> PowerLevel { + return try FfiConverterTypePowerLevel_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( FfiConverterTypeRoomMemberRole_lower(role),$0 ) }) } -public func suggestedRoleForPowerLevel(powerLevel: Int64) -> RoomMemberRole { - return try! FfiConverterTypeRoomMemberRole_lift(try! rustCall() { +/** + * Get the suggested role for the given power level. + * + * Returns an error if the value of the power level is out of range for numbers + * accepted in canonical JSON. + */ +public func suggestedRoleForPowerLevel(powerLevel: PowerLevel)throws -> RoomMemberRole { + return try FfiConverterTypeRoomMemberRole_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - FfiConverterInt64.lower(powerLevel),$0 + FfiConverterTypePowerLevel_lower(powerLevel),$0 ) }) } @@ -42148,10 +43542,10 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 61777) { + if (uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 29703) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 48532) { + if (uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 13856) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() != 53440) { @@ -42202,6 +43596,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 30834) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() != 10688) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_encryption() != 9657) { return InitializationResult.apiChecksumMismatch } @@ -42250,7 +43647,7 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 55934) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 50489) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 32541) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() != 26427) { @@ -42292,6 +43689,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 32591) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_qr_code() != 3481) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 42911) { return InitializationResult.apiChecksumMismatch } @@ -42334,6 +43734,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_server() != 63276) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() != 51933) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_session() != 8085) { return InitializationResult.apiChecksumMismatch } @@ -42364,6 +43767,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 4957) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_space_service() != 31959) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() != 34571) { return InitializationResult.apiChecksumMismatch } @@ -42394,7 +43800,7 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 51195) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 28386) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 19369) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_client_user_id() != 40531) { @@ -42418,9 +43824,6 @@ private let 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() != 42452) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 46627) { return InitializationResult.apiChecksumMismatch } @@ -42484,7 +43887,7 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 6898) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 33768) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 23935) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 13719) { @@ -42565,6 +43968,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 33501) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() != 37773) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() != 61326) { return InitializationResult.apiChecksumMismatch } @@ -42739,6 +44145,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 9101) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 51696) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 37840) { return InitializationResult.apiChecksumMismatch } @@ -42838,6 +44247,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 45951) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() != 11947) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 39510) { return InitializationResult.apiChecksumMismatch } @@ -42865,7 +44277,7 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 16529) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 8059) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 6449) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 5060) { @@ -42880,12 +44292,6 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 27585) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification() != 43366) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_room_send_call_notification_if_needed() != 52926) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() != 34248) { return InitializationResult.apiChecksumMismatch } @@ -42901,6 +44307,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 52127) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 48337) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 5576) { return InitializationResult.apiChecksumMismatch } @@ -43096,7 +44505,7 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 18179) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 9145) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 50237) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() != 1297) { @@ -43159,6 +44568,30 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 46075) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() != 57707) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() != 33381) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 24664) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 16775) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 55793) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 6768) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() != 10090) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_span_enter() != 8900) { return InitializationResult.apiChecksumMismatch } @@ -43174,6 +44607,9 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 10889) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() != 45579) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 26426) { return InitializationResult.apiChecksumMismatch } @@ -43258,19 +44694,19 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 9553) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 22559) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 36723) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4588) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4740) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() != 61071) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 25436) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 29043) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 57832) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 39080) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() != 7453) { @@ -43279,13 +44715,13 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 31468) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 11149) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 1445) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 52974) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 50042) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 17589) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 46161) { @@ -43297,33 +44733,6 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append() != 8453) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change() != 4562) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_insert() != 26630) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_back() != 53464) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_push_front() != 42084) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_remove() != 74) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_reset() != 34118) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set() != 13334) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_truncate() != 34040) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() != 11088) { return InitializationResult.apiChecksumMismatch } @@ -43504,10 +44913,19 @@ private let initializationResult: InitializationResult = { if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 37905) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() != 31502) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 11960) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 19262) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 62231) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 30147) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 53990) { return InitializationResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 64299) { @@ -43548,6 +44966,9 @@ private let initializationResult: InitializationResult = { uniffiCallbackInitRoomListServiceSyncIndicatorListener() uniffiCallbackInitSendQueueRoomErrorListener() uniffiCallbackInitSessionVerificationControllerDelegate() + uniffiCallbackInitSpaceRoomListEntriesListener() + uniffiCallbackInitSpaceRoomListPaginationStateListener() + uniffiCallbackInitSpaceServiceJoinedSpacesListener() uniffiCallbackInitSyncServiceStateObserver() uniffiCallbackInitTimelineListener() uniffiCallbackInitTypingNotificationsListener() @@ -43555,9 +44976,9 @@ private let initializationResult: InitializationResult = { uniffiCallbackInitVerificationStateListener() uniffiCallbackInitWidgetCapabilitiesProvider() uniffiEnsureMatrixSdkInitialized() + uniffiEnsureMatrixSdkBaseInitialized() uniffiEnsureMatrixSdkCryptoInitialized() uniffiEnsureMatrixSdkCommonInitialized() - uniffiEnsureMatrixSdkBaseInitialized() uniffiEnsureMatrixSdkUiInitialized() return InitializationResult.ok }() diff --git a/swift/matrix_sdk_ui.swift b/swift/matrix_sdk_ui.swift index c02c176..86525dc 100644 --- a/swift/matrix_sdk_ui.swift +++ b/swift/matrix_sdk_ui.swift @@ -397,6 +397,30 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { // Public interface members begin here. +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterBool : FfiConverter { + typealias FfiType = Int8 + typealias SwiftType = Bool + + public static func lift(_ value: Int8) throws -> Bool { + return value != 0 + } + + public static func lower(_ value: Bool) -> Int8 { + return value ? 1 : 0 + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Bool { + return try lift(readInt(&buf)) + } + + public static func write(_ value: Bool, into buf: inout [UInt8]) { + writeInt(&buf, lower(value)) + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -626,6 +650,79 @@ extension RoomPinnedEventsChange: 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 SpaceRoomListPaginationState { + + case idle(endReached: Bool + ) + case loading +} + + +#if compiler(>=6) +extension SpaceRoomListPaginationState: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSpaceRoomListPaginationState: FfiConverterRustBuffer { + typealias SwiftType = SpaceRoomListPaginationState + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SpaceRoomListPaginationState { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .idle(endReached: try FfiConverterBool.read(from: &buf) + ) + + case 2: return .loading + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: SpaceRoomListPaginationState, into buf: inout [UInt8]) { + switch value { + + + case let .idle(endReached): + writeInt(&buf, Int32(1)) + FfiConverterBool.write(endReached, into: &buf) + + + case .loading: + writeInt(&buf, Int32(2)) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoomListPaginationState_lift(_ buf: RustBuffer) throws -> SpaceRoomListPaginationState { + return try FfiConverterTypeSpaceRoomListPaginationState.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSpaceRoomListPaginationState_lower(_ value: SpaceRoomListPaginationState) -> RustBuffer { + return FfiConverterTypeSpaceRoomListPaginationState.lower(value) +} + + +extension SpaceRoomListPaginationState: Equatable, Hashable {} + + + + + + private enum InitializationResult { case ok case contractVersionMismatch diff --git a/ubrn.yaml b/ubrn.yaml index f59acf1..f92f94f 100644 --- a/ubrn.yaml +++ b/ubrn.yaml @@ -1,7 +1,7 @@ --- crate: repo: https://github.com/matrix-org/matrix-rust-sdk - rev: 18b169ca7ec17440f9fa1170026cbc32e20a06d8 # matrix-sdk-0.13.0 + rev: 5ef3ecac8c63d2373d8e45a47807769e602ebd89 # matrix-sdk-base-0.14.1 manifestPath: bindings/matrix-sdk-ffi/Cargo.toml android: cargoExtras: ['--features', 'rustls-tls']